Commit Graph

16504 Commits

Author SHA1 Message Date
Jake Turner 323cc5838f Fix D3D12 shader feedback of EI which does not need a root signature
Do not include argument types:

D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW
D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW

when checking if need to create and set a new command signature
2025-11-20 15:45:25 +13:00
Jake Turner a9056f1eca Add a D3D12 EI test case for an EI which does not need a root signature
EI with:

D3D12_VERTEX_BUFFER_VIEW
D3D12_DRAW_ARGUMENTS
2025-11-20 15:41:32 +13:00
Jake Turner 67fc8618a7 Move the recent D3D12_Shader_Debug_Zoo tests to the noResources shader 2025-11-19 10:44:18 +13:00
Jake Turner ae927151c6 Tweak to compute the vk_workgroup_group pipename from GROUP_SIZE_XYZ 2025-11-19 10:44:18 +13:00
baldurk 00ec7c3fd9 Use correct texture dimension to check for 3D texture copies 2025-11-18 18:12:28 +00:00
baldurk ccbe3c8cce Propagate up failure through expand sections in test results 2025-11-18 17:59:12 +00:00
Jake Turner 0d695da164 Set the d3d12path for d3d12 tests before caching the d3d12 capabilities 2025-11-18 11:40:04 +13:00
Jake Turner a9c2f082bc Moved new DXIL shader debug zoo tests from CS to PS
Guarded use of double by testing against D3D runtime : DoublePrecisionFloatShaderOps
2025-11-18 09:48:07 +13:00
Jake Turner 9c36c319af DXIL Debug simplified result assignment 2025-11-18 09:46:50 +13:00
Jake Turner 4ec8e969bc Extra DXIL shader debug zoo tests
float64, float32, float16 Tests for:

min
max
abs
fmad
frac
dot2/3/4
saturate

sint64, sint32, sint16, uint64, uint32, uint16, Tests for:

min
max
mulitply
division (UDiv)
imad
dot2/3/4
2025-11-17 15:52:27 +13:00
Jake Turner fc30d97244 Tweak DXIL disassembly for global variables to show friendly addrspace
Groupshared instead of addrspace(3)
2025-11-17 11:51:16 +13:00
Jake Turner bc1504bd74 Get the base type form the encoded GPUPointer for DXIL Atomic operations 2025-11-17 11:42:57 +13:00
Jake Turner 48a23a0ddb Store the baseType with DXIL encoded GPUPointers 2025-11-17 11:42:22 +13:00
Jake Turner c864e87fbb Reorder the D3D12 DebugData Zoo shader work around bad DXC debug data
Put the early return case as the first case in the switch statement
2025-11-17 07:13:34 +13:00
Jake Turner 759a738cd1 Add DXIL compute shader builtin inputs to the UI Inputs
Parse the compute shader instructions to see which CS builtins are accessed
SV_DispatchThreadID
SV_GroupID
SV_GroupIndex
SV_GroupThreadID
2025-11-17 06:28:53 +13:00
Jake Turner dbbd9ba010 Added MSAA tests for SM6.0 and SM6.
Disabled in the python because the RenderDoc does not currently support DXIL debugging of MSAA instructions or SV_Barycentrics
2025-11-17 05:47:55 +13:00
Jake Turner 046fa76328 Implement DXIL Debugger support UAV Counter (DXOp::BufferUpdateCounter) 2025-11-17 05:38:15 +13:00
baldurk 15a1587ca0 Fix accidentally removed subobject case 2025-11-14 10:20:13 +00:00
baldurk 647f3850a1 Disable conservative rasterization in wireframe overlay. Closes #3730 2025-11-14 10:19:42 +00:00
Jake Turner ccbb516610 Simplify DXIL Disassembler/Debugger SSA ID name strings and aliases
Store SSA ID name strings in a container which is shared between the disassembler and the debugger.
The SSA ID name strings are guaranteed to be unique by appending the SSA ID value.

Do not use resource names for SSA ID names, only show resource names when a DXIL handle is created i.e. DXOp::CreateHandle, DXOp::CreateHandleFromBinding & DXOp::CreateHandleFromHeap

This means the debugger now has a unique name for each ShaderVariable generated.

Revert the ShaderViewer consistency changes which were only required because the DXIL debugger did not generate unique names for ShaderVariables.
2025-11-13 13:10:44 +13:00
Jake Turner edf9ddacf0 Use ENABLED(RDOC_RELEASE), ENABLED(RDOC_DEVEL) instead of #if defined 2025-11-13 03:34:55 +13:00
Jake Turner 0194951bca Fix D3D12_Resource_Mapping_Zoo false failure if no SM6.6 action to test
Apply the same fix for no SM6.0 action to test
2025-11-12 17:42:03 +13:00
Jake Turner 8a2ca8e14d Convert GetNextUniformBlock() to use graph instead of path
Added:
int32_t BlockInAnyPath(uint32_t from, uint32_t to) const;
which replaces path API BlockInAnyPathSlow()

Removed:
All path related data and functions

Added unit tests for GetNextUniformBlock()
2025-11-12 17:24:20 +13:00
Jake Turner 61262d26f1 Treat vectors of size one as scalars for DXIL debug mapping 2025-11-12 11:42:19 +13:00
Jake Turner 637626638c Fix D3D Shader Debugger source variable mapping for matrix
If the matrix was mapped to a single register (i.e. special SSA ID -1) then it was expanded because a single element was mapped to different register the expansion was not happening because the matrix row was being set to be emitted in the code which tries to recombine rows

Apply similar fix for vector recombining code, do not emit the whole vector by default when assigning a single element and let the recombining code mark if the whole vector should be emitted
2025-11-12 11:42:19 +13:00
Jake Turner 0e84176738 Handle float3 packing and arrays in D3D11/12 shader debug input fetcher
Packing float with a float3

float TEXCOORD0
int   TEXCOORD1
float3 COLOR

Packing float with a float3[1]

float TEXCOORD0
int   TEXCOORD1
float3[1] COLOR

Not packing float with a float3[2]

float TEXCOORD0
int   TEXCOORD1
float3[2] COLOR
2025-11-12 11:42:19 +13:00
Jake Turner a9edce59ea New D3D11/D3D12 shader linkage tests for float3 packing/not packing
Packing float with a float3

float TEXCOORD0
int   TEXCOORD1
float3 COLOR

Packing float with a float3[1]

float TEXCOORD0
int   TEXCOORD1
float3[1] COLOR

Not packing float with a float3[2]

float TEXCOORD0
int   TEXCOORD1
float3[2] COLOR
2025-11-12 11:42:19 +13:00
Jake Turner 95a6f13730 Fix DXIL Debugger support for structs in the input structure
i.e. matrices

Fixed incorrect asserts in LoadInput
Fixed source variable mapping
Fixed input data copying from fetcher results
2025-11-12 11:42:19 +13:00
Jake Turner f858b2320f Extend D3D12_Shader_DebugData_Zoo tests to include matrix
Check matrix in the outputs from Vertex Shader
Check matrix in the inputs to Pixel Shader
Check matrix debug data source values from debugger trace
2025-11-12 11:10:32 +13:00
Jake Turner 9598abb266 D3D12 Shader Debug Zoo simple test for matrix output/input 2025-11-12 10:57:13 +13:00
Jake Turner 4d180eecfa Tweak D3D12_Resource_Mapping_Zoo test to mark as failed in all cases 2025-11-12 10:57:13 +13:00
baldurk 4e215518df Force evaluation of any lazy structured data on fatal error 2025-11-11 16:59:42 +00:00
baldurk 8128ea0e0f Fix vulkan descriptor lazy serialising 2025-11-11 16:52:33 +00:00
baldurk ff00b85ae0 Update SPIR-V headers and grammar
* Add an extension tracker to list which extensions/capabilities are supported
  by the debugger.
2025-11-11 15:48:38 +00:00
baldurk 039ae9fa35 Avoid crash if invalid internal image copy happens in pixel history 2025-11-11 13:43:24 +00:00
baldurk 9e6ca9f649 Disable logic ops for shader out and primitive ID PSOs 2025-11-11 13:29:16 +00:00
baldurk 75175ce8d9 Ensure only one thread at a time uses GPU readbacks during capture
* This was already done on D3D12 but Vulkan was missing the appropriate locks
2025-11-11 12:25:36 +00:00
baldurk 4a3447af78 Fix vkCmdDrawIndexedIndirectCount not properly using patched arguments 2025-11-11 12:25:36 +00:00
baldurk 9521122e18 Don't crash on binding a NULL index buffer 2025-11-11 12:25:35 +00:00
baldurk 75acc706f7 Try to create descriptor buffer buffer if failing to create wholeMemBuf
* On some drivers such as radv there are memory types only accessible via
  descriptor buffer usage flags, and it's important to have a wholeMemBuf to
  readback both for maps (quite possible/likely) as well as initial contents.
2025-11-11 12:25:35 +00:00
baldurk 7cd77b5812 Reset descriptor access when moving to dummy driver after fatal error 2025-11-11 12:25:35 +00:00
Jake Turner c534b41eb6 Tune the ShaderVariable consistency checks for resources
Do not check before/after equals existing value for ReadOnlyResource and ReadWriteResource
In the DXIL debugger for resources the same SSA ID might have different names
2025-11-11 10:53:15 +13:00
Jake Turner e2449b9eaf Comment the unsupported DXIL DXOp instructions 2025-11-11 09:54:59 +13:00
baldurk d00c563e89 Fix initial state creation for CPU upload heaps on D3D12 2025-11-10 17:03:52 +00:00
baldurk eee1268a9f Fix handling of test failure cases in test results page 2025-11-10 16:43:05 +00:00
baldurk 23748c0089 Fix validation issues with D3D12 test 2025-11-10 16:43:05 +00:00
baldurk ea368a631e Allow GPU upload heaps to be enabled in D3D12. Closes #3724
* We attempt to enable the experimental feature since this allows the use of the
  feature on a much wider set of OS versions, at the time of this commit support
  seems quite rare/narrow.
2025-11-10 16:43:05 +00:00
baldurk a533832c2c Fix query for supported root signature version 2025-11-10 16:43:05 +00:00
baldurk d20295cf41 Don't wrap queue readback buffer
* This can fix a potential race condition during capture if capture ends while
  the readback buffer is being resized/created.
2025-11-10 16:43:05 +00:00
baldurk 7cf68de074 Update D3D12 headers to 1.618.2
* This includes some support for the new serialised-root signature
  representation for precompilation which also affects runtime.
  GetRootSignature*() functions in pipeline state and state object are not
  implemented as it's unclear if they are supported.
* The interfaces for the precompilation are *not* supported as there is no need.
2025-11-10 16:43:05 +00:00