Commit Graph

13405 Commits

Author SHA1 Message Date
Jake Turner 14d74e4dd3 Improve tracking of MTLDrawables (swapchains)
Serialize the presented texture (presentedImage) as part of "presentDrawable" serialization.
Use the present texture resource ID in the action name ie. "presentDrawable(Texture 23219)"
Track the most recently presented image and use that in SystemChunk::CaptureEnd if the PresentedImage serialized data is empty resource.
Track the CAMetalDrawable's created via the hooked CAMetalLayer::nextDrawable() method.

Implements TODO in WrappedMTLCommandBuffer::presentDrawable
"remove the (CA::MetalDrawable*) cast. Associate created texture and layer in hooked nextDrawable with MTL::Drawable*"
2022-09-06 16:03:54 +01:00
baldurk e169df5d88 Fix backwards masking of SECONDARY_COMMAND_BUFFERS_BIT in dyn rendering 2022-09-05 15:30:56 +01:00
Shahbaz Youssefi edc61e621f Refactor dynamic rendering setup code
Deduplicating code between BeginRenderPassAndApplyState and
FinishSuspendedRenderPass.  Fixes a bug where FinishSuspendedRenderPass
was using the depth attachment for stencil.
2022-09-05 10:14:08 +01:00
Jake Turner 20d3c9812d Add "empty_map" unit tests for rdcflatmap
Validate expected behaviour on an empty sorted and unsorted container

begin() == end()
find(*) == end()
lower_bound(*) == 0
upper_bound(*) == 0
2022-09-05 10:10:48 +01:00
John Cortell 3a5ac5859a Enable AMD perf counter support for Samsung GPUs
This change, along with changes in the GPA library, allows the user
to collect AMD counters from a Samsung Xclipse GPU. Previous to this,
the AMD counters could be collected only from GPUs with an AMD PCI
vendor ID.

Most of the changes are related to the fact that the Xclipse GPU has
a unique (Samsung) PCI vendor ID, but is ultimately an AMD
(RDNA2) derivative. So, we need the code to take the AMD path
while technically being its own (non-AMD) GPU.
2022-09-02 17:10:10 +01:00
baldurk 6d4257fcf5 Handle extensions on dynamic rendering when manually managing RPs 2022-09-02 14:03:39 +01:00
baldurk 0fc35e966f Fix Draw_Zoo tests for strip restart index changes 2022-09-02 14:03:39 +01:00
Jake Turner b997bd2f16 Add case for all MetalChunk in ProcessChunk switch
Add the case manually and remove it from the METAL_CHUNK_NOT_HANDLED() helper macro
PR Feedback
2022-08-31 09:57:48 +01:00
Jake Turner 0f4c280f72 Added Metal Replay ProcessChunk()
bool WrappedMTLDevice::ProcessChunk(ReadSerialiser &ser, MetalChunk chunk)

SystemChunk::InitialContentsList is handled but not implemented

Added declarations for dummy objects used for serialization replay

WrappedMTLBuffer *m_DummyBuffer;
WrappedMTLCommandBuffer *m_DummyReplayCommandBuffer;
WrappedMTLCommandQueue *m_DummyReplayCommandQueue;
WrappedMTLLibrary *m_DummyReplayLibrary;
WrappedMTLRenderCommandEncoder *m_DummyReplayRenderCommandEncoder;
WrappedMTLBlitCommandEncoder *m_DummyReplayBlitCommandEncoder;

The dummy objects are not created in this commit.
2022-08-31 09:57:48 +01:00
Shahbaz Youssefi 75c1d37a45 Expose Vulkan depth clip range in the UI
This change exposes the
VkPipelineViewportDepthClipControlCreateInfoEXT::negativeOneToOne
pipeline state in the UI.  While not a per-viewport state, this state is
output alongside viewport information.

If the extension is not used, or if this flag is false, [0, 1] is shown
as the depth clip range.  If the flag is true, [-1, 1] is shown.
2022-08-31 09:55:12 +01:00
Shahbaz Youssefi 390e610687 Support VK_EXT_depth_clip_control
This extension adds a viewport pipeline state: negativeOneToOne
2022-08-31 09:55:12 +01:00
baldurk 1f530a2564 Report UAVBindSlot feature as supported in AGS. Refs #2700 2022-08-30 15:12:26 +01:00
Hans-Kristian Arntzen 7bad9214a8 Export correct range for binary dumps as well. 2022-08-29 19:42:41 +01:00
Hans-Kristian Arntzen 033bcb2a11 Export correct CSV range and fixup element counts. 2022-08-29 19:42:41 +01:00
Turánszki János 5773660e0a added missing unwrap for src and dst resolve resources for depthstencil
Follow up for this issue which was partly fixed, but the same crash started appearing after using depth resolve inside renderpass: https://github.com/baldurk/renderdoc/issues/2622
2022-08-29 16:19:19 +01:00
Shahbaz Youssefi 392073abe6 Support VK_EXT_primitives_generated_query
This extension introduces a new query to aid GL emulation (equivalent to
GL_PRIMITIVES_GENERATED)
2022-08-29 15:08:51 +01:00
Shahbaz Youssefi ed4c3756d0 Enable primitive restart for list topologies
This is supported by OpenGL, and on Vulkan with
VK_EXT_primitive_topology_list_restart.  On Vulkan, all drivers are
known to support this even without
VK_EXT_primitive_topology_list_restart.  On D3D, primitive restart is
only supported for strip topologies.

Previously, RenderDoc specifically disabled primitive restart for
non-strip topologies.  In this change, that is no longer done.  If the
app enables primitive restart, so will RenderDoc behave accordingly.  It
would be the responsibility of the app to avoid primitive restart if the
API doesn't allow it.
2022-08-29 14:59:14 +01:00
Shahbaz Youssefi 50526c44f1 Support VK_EXT_primitive_topology_list_restart
This extension exposes a capability that pretty much all devices already
had.  It allows list topologies to be used with primitive restart.
2022-08-29 14:59:14 +01:00
baldurk be674c012b Handle variable length string in OpEntryPoint correctly. Closes #2697 2022-08-22 16:47:57 +01:00
Jake Turner 08d07ddc0d Set MTL::TextureUsageShaderRead during capture
To be consistent with replay created textures set MTL::TextureUsageShaderRead on textures created during capture. This override is not serialized.

PR Feedback
2022-08-22 15:52:03 +01:00
Jake Turner ce51361c83 Metal Replay resource creation of a few base types
MTLCommandQueue
MTLLibrary
MTLBuffer
MTLRenderPipelineState
MTLTexture
MTLFunction
2022-08-22 15:52:03 +01:00
Jake Turner 34b6f47362 Metal Replay resource creation helper methods
Added WrappedMTLDevice
void AddResource(ResourceId id, ResourceType type, const char *defaultNamePrefix);
void DerivedResource(ResourceId parentLive, ResourceId child);
template <typename MetalType> void DerivedResource(MetalType parent, ResourceId child);

Start of MetalReplay implementation to support replay resource creation:
ResourceDescription &GetResourceDesc(ResourceId id);

MetalReplay instance is not created in this commit
2022-08-22 15:52:03 +01:00
baldurk 3448195d8e Handle implicitly-enabled promoted extensions. Refs #2695 2022-08-19 18:43:40 +01:00
baldurk f3f9c416fc Count arrayed dynamic descriptors correctly 2022-08-19 11:00:22 +01:00
baldurk c7bfba2c1c Tweak wording of message about writing indirect args during renderpass 2022-08-19 11:00:09 +01:00
baldurk 84c824e573 Tweak colour used for 'view details' highlighting in pipeline state view
* This helps those who have chosen the dark theme where rich resource text uses
  the default window text colour assuming it's a contrasting colour against the
  background (except when highlighted).
2022-08-18 16:39:42 +01:00
baldurk 9bb25f4652 Switch web IRC links from kiwiirc to webchat.oftc.net 2022-08-18 15:54:46 +01:00
baldurk fbd0f3ee15 Ensure that fixed data over 10k bytes is fetched in buffer viewer
* We need to calculate the fixed data length properly even when there is no
  repeated data, so that pagination doesn't kick in on the data that is needed
  for the fixed region.
2022-08-18 15:54:45 +01:00
Danylo Piliaiev 6bd7e7cc1a Add support for VK_EXT_attachment_feedback_loop_layout
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
2022-08-18 15:54:33 +01:00
baldurk dd47f5a341 Fix event debug messages not being associated with the correct EIDs 2022-08-16 18:39:26 +01:00
baldurk 59a7be898a Fix new-issue link not going to chooser properly
* Also bump the config.yml just to see if it starts enforcing a redirect.
2022-08-16 18:39:25 +01:00
baldurk 39456bceba Bake in Vulkan_Debug_StepToDebugValue
* The behaviour with this set to true is significantly better for lightly-
  optimised code as comes out of HLSL legalisation, with little penalty for
  other code.
2022-08-16 18:39:25 +01:00
Remi Palandri a1ee4428ce add bicubic support to OpenGL pipeline state 2022-08-12 08:15:49 +01:00
baldurk 2a519bbe70 Use fabs for floating point abs 2022-08-11 15:13:58 +01:00
baldurk 0d10f3c992 Switch CI to ubuntu 20.04 2022-08-11 15:13:58 +01:00
Jake Turner 959d8e2e08 Capture and serialise MTLBuffer contents
MTLBuffer initial state chunks.
CPU modified buffers chunks (MTLBuffer_InternalModifyCPUContents) stored in the command buffer record.
2022-08-11 11:33:26 +01:00
Jake Turner 424f910bfc WrappedMTLObject::AddEven() & AddAction()
Trampoline calls to m_Device->AddEvent() & AddAction()
WrappedMTLDevice::AddAction() & AddAction() are currently empty stubs
2022-08-11 11:30:35 +01:00
baldurk e63f41ff1f Add missing header 2022-08-11 11:28:11 +01:00
baldurk 84b9a0842d Block trying to get GCN ISA disassembly on OpenGL drivers 22.7.1+
* In this version the disassembly is no longer available from the driver via
  this method. While it currently gives a normal error message, in future
  versions it may start crashing so we block it now.
2022-08-11 10:49:55 +01:00
baldurk c3c791be55 When editing a shader, default to the edit base file
* In the case of a munged file with #line directives, we want to edit that file,
  not the split-out view of the file containing the entry point.
2022-08-11 10:23:48 +01:00
baldurk 605f8a0566 Fix documentation issues 2022-08-10 23:52:24 +01:00
baldurk 52909cd090 Use proper base file for editing shader files 2022-08-10 21:28:00 +01:00
baldurk 7286da50dc Fix compilation error 2022-08-10 21:27:48 +01:00
baldurk cbb8399d3e Fix incorrect offset reading integer texture sampling results on D3D 2022-08-10 14:56:44 +01:00
baldurk 855ad1afed Fix instruction number on DXBC instruction info 2022-08-10 14:56:44 +01:00
baldurk e061ea3b2e Improve handling of compilers & command line for edited shaders
* We store the compiler used (when known) in shader debug info and use that to
  select the compiler for editing as even higher priority than the default for a
  given language/encoding combination.
* We also ensure that for known tools we add the input and output parameters
  last, after any custom parameters, so that they are always present regardless
  of what the user puts in.
2022-08-10 14:56:44 +01:00
baldurk e29d48a2a8 Propagate command line arguments from DebugEntryPoint 2022-08-10 14:56:44 +01:00
baldurk 8bf0c22d66 Don't deserialise an array that's NULL
* This should only happen if serialisation corruption is detected, but in that
  case we don't want to crash.
2022-08-10 14:56:44 +01:00
James0124 2354d656db Fix duplicate vkQueueSubmit2 events when commandBufferInfoCount == 0
Add a "No Command Buffers" virtual label action, preventing `WrappedVulkan::ContextProcessChunk` from adding a duplicate event.
2022-08-08 16:21:07 +01:00
baldurk c64406b18f Accumulate timings for fake markers last. Closes #2679
* Fake markers have higher EIDs than their children, unlike normal markers.
2022-08-08 10:18:04 +01:00