Commit Graph

13432 Commits

Author SHA1 Message Date
baldurk aa412ddf89 Don't hard-fail on results of undefined tests in shader debug zoo 2022-09-19 16:44:56 +01:00
baldurk 00d7827d06 Allow a ~500 difference between PS invocations and samples passed
* This can be caused by overshading/rasterization differences
2022-09-19 16:44:56 +01:00
baldurk 1fa4fed24a Check for shader 64-bit support before using them in tests 2022-09-19 16:44:56 +01:00
baldurk 4e4a7518fa Ensure inline uniform blocks have descriptor pool space allocated 2022-09-19 16:44:56 +01:00
baldurk c851c44a1b Get new cmake for building glslang in spirv plugins 2022-09-19 12:35:33 +01:00
baldurk bc5aef5447 Add a separate PanelMenu item for extensions in non-mesh buffer viewers 2022-09-19 11:24:38 +01:00
baldurk 58b96be4f2 Mark memory as dirty when bound to sparse resources 2022-09-15 14:49:42 +01:00
baldurk d61f10d27c Insert command buffer references after descriptor references on vulkan
* During capture we don't insert references as we're recording descriptor binds,
  just once at queue submit time, as an optimisation. However this loses
  ordering relative to more direct references. Since descriptor binds are more
  conservative (either read, or read before write) we ensure to insert them
  first before any direct references like copies or fills which could mark the
  resource as completely written before read.
2022-09-15 14:49:28 +01:00
baldurk b375efdb3c Use selected range of buffer not total object length when exporting
* Same fix as #2703 but with a fix not to be limited by the pagination size
2022-09-15 13:36:16 +01:00
baldurk 6643687ac6 Revert "Export correct CSV range and fixup element counts."
This reverts commit 033bcb2a11.
2022-09-15 13:26:47 +01:00
baldurk ceb2e81ab2 Revert "Export correct range for binary dumps as well."
This reverts commit 7bad9214a8.
2022-09-15 13:26:15 +01:00
baldurk 4fbd1a08ac Prefer DebugFunction name over function OpName when available 2022-09-15 11:20:49 +01:00
baldurk 58437e426f Handle missing DebugEntrypoint information 2022-09-13 17:24:42 +01:00
baldurk 305eb33204 Show better tooltips for constant buffers & structs
* { ... } is clearer than having just ??? show up which looks like an error.
2022-09-13 17:24:42 +01:00
baldurk b49d7982d6 When looking for the start of an line, ignore if there's no debug info
* When searching for the start of a range of instructions mapped to a single
  line when stepping backwards, we need to ignore instructions that don't have
  any debug info because they will look like a 'different' smaller stack.
2022-09-13 17:24:42 +01:00
baldurk 3013be8d52 Fix use of wrong instruction counter when instruction info is sparse 2022-09-13 17:24:42 +01:00
baldurk 6ed5ac046b Don't list a partial callstack for code without debug info 2022-09-13 17:24:42 +01:00
baldurk bc867681a1 Fix internal pointers leaking out in change lists when debugging SPIR-V 2022-09-13 12:19:46 +01:00
baldurk 336e90d412 Display special D3D quality levels in texture viewer 2022-09-12 13:54:07 +01:00
baldurk 4d632dd81e Coalesce adjacent contiguous sparse buffer binds on vulkan 2022-09-12 13:54:06 +01:00
baldurk 53c529fdaf Handle OpAccessChain only for a global resource array index
* If we have an OpAccessChain which only looks up a resource index and not
  anything else, we need to ensure that both we don't consume the first index
  next time, AND that we preserve the resource index for future access chains.
2022-09-12 13:54:06 +01:00
baldurk 0a6368f777 Ignore function-local OpUndef for stepping 2022-09-12 13:54:06 +01:00
baldurk 6d38a9dc12 Update extension_support.md with recently added extensions 2022-09-12 13:54:06 +01:00
baldurk c060bff562 Use bigger batches for discard patterns on D3D12 2022-09-12 13:54:06 +01:00
baldurk 54b8c7b89f Don't add usage if pCountBuffer is omitted on ExecuteIndirect 2022-09-12 13:54:06 +01:00
Shahbaz Youssefi 8f14374b52 Support VK_EXT_multisampled_render_to_single_sampled
This extension greatly simplifies MSAA rendering on TBR hardware.
2022-09-07 14:47:59 +01:00
baldurk 8e2e0b6bb5 Disable -Wunused-value on gcc as it's buggy on gcc 12 it seems 2022-09-06 17:45:29 +01:00
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