Commit Graph

15791 Commits

Author SHA1 Message Date
Jake Turner fa22effc77 Add DXIL Debugger Support for Quad Operations
HLSL
QuadReadLaneAt()
QuadReadAcrossDiagonal()
QuadReadAcrossX()
QuadReadAcrossY()

DXIL
DXOp::QuadReadLaneAt
DXOp::QuadOp
2025-04-06 14:39:49 +01:00
Jake Turner 038aee2459 Add D3D12_Workgroup_Zoo unit tests for Quad Shuffle operations
QuadReadLaneAt()
QuadReadAcrossDiagonal()
QuadReadAcrossX()
QuadReadAcrossY()
2025-04-06 14:38:13 +01:00
Jake Turner 7240cf8c57 Add VK_Workgroup_Zoo unit tests for Quad Shuffle operations
subgroupQuadBroadcast()
subgroupQuadSwapDiagonal()
subgroupQuadSwapHorizontal()
subgroupQuadSwapVertical()
2025-04-06 14:00:52 +01:00
Jake Turner e9f5c93062 Add DXIL Debugger Support for workgroup query functions
HLSL
WaveGetLaneCount()
WaveIsFirstLane()

DXIL
DXOp::WaveGetLaneCount
DXOp::WaveIsFirstLane
2025-04-06 12:55:52 +01:00
Jake Turner 5e6cfd73a0 Add D3D12_Workgroup_Zoo unit tests for workgroup query functions
WaveGetLaneCount()
WaveGetLaneIndex()
WaveIsFirstLane()
2025-04-06 12:55:29 +01:00
Jake Turner 88a9bde2f9 Add SubgroupSize to global_builtins for Vulkan shader debugging
Added for all stages (Vertex, Compute, Pixel)
2025-04-06 12:50:18 +01:00
Jake Turner e0f8f29fa7 Add VK_Workgroup_Zoo unit tests for workgroup query functions
gl_SubgroupSize
gl_SubgroupInvocationID
subgroupElect()
2025-04-06 12:50:08 +01:00
Jake Turner fdc2125e7b Add D3D12_Workgroup_Zoo convergence test with dynamic for loop
A different number of iterations per thread
2025-04-06 12:49:34 +01:00
Jake Turner 2af9015e04 Add VK_Workgroup_Zoo convergence test with dynamic for loop
A different number of iterations per thread
2025-04-06 12:49:16 +01:00
Jake Turner b7a40e644a Ignore Constant initialiser data that is undefined 2025-04-06 10:21:56 +01:00
Jake Turner 30fbb6b0f5 Switch to previous behaviour for finding Uniform Blocks
Use paths including loops
2025-04-06 10:21:51 +01:00
Jake Turner c83be4088a Change DXIL debugger control flow to use rdcshaders::ControlFlow
This emulates maximal re-convergence behaviour and matches how the SPRIV shader debugger control flow works.

Remove the quick fix for discard to skip over degenerate branches
Remove StepOverDegenerateBranch() method
2025-04-04 11:42:58 +01:00
Jake Turner ee4a2c40a9 Added OutputGraph to output control flow as a graphvis text file 2025-04-04 11:42:58 +01:00
Jake Turner 744c9a2899 Added GetDivergentBlocks(), GetConvergentBlocks() to DXIL::ControlFlow 2025-04-04 11:42:58 +01:00
Jake Turner 99260a9c9b Add d3d12_subgroup_zoo tests for maximal reconvergence behaviour
Diverged threads which re-converge at expected points
The tests copied over from vk_subgroup_zoo
2025-04-04 11:42:58 +01:00
Jake Turner ac5162d44c Fix DXIL Debugger WaveActiveOp ShaderVariable UI result
The result variable name was being set to the input variable name
The simulation was correct.
2025-04-04 11:42:58 +01:00
Jake Turner 6435986d2a Remove spammy warning about no callstack entry found for instruction 2025-04-04 11:42:18 +01:00
Jake Turner d7025e6bf7 Remove error "DXIL GlobalVar initialiser"
Valid for a DXIL global var to be uninitialized (treat it as zero initialized)
2025-04-04 11:41:48 +01:00
Jake Turner 59454dbecc ControlFlow do not add duplicate merge points on the top of the stack 2025-04-04 07:20:21 +01:00
Jake Turner 8eba23875e Specific DXIL disassembly handling for WaveActiveOp
After
  int _WaveActiveOp11 = WaveActiveSum(_WaveGetLaneIndex); // Unsigned

Before
  int _WaveActiveOp11 = WaveActiveOp(/*value*/ _WaveGetLaneIndex, /*op*/ 0, /*sop*/ 1);
2025-04-03 15:40:02 +01:00
Jake Turner 88752e2c20 Rename workgroundSize parameter to threadsInWorkgroup 2025-04-03 10:01:17 +01:00
Jake Turner 820b3afb4f Added helper function ThreadState::JumpToBlock(const Block* target)
Centralize branch handling for Operation::Branch and Operation::Switch
2025-04-03 10:00:40 +01:00
Jake Turner b31b0cc8db Add explicit namespace scope for DXIL::ControlFlow usage
Avoids a name clash with rdcshaders::ControlFlow
2025-04-03 09:55:15 +01:00
Jake Turner 75c0e506da Rename DXIL::ExecutionPoint to DXIL::ExecPointReference
To avoid name clash with rdcshaders::ControlFlow::ExecutionPoint
2025-04-03 09:54:31 +01:00
Jake Turner d42d867be4 Minor tidyup of SPIRV controlflow setup
Use the first instruction as the starting point not the first block
2025-04-03 09:54:13 +01:00
Jake Turner 368db48054 Fix Android building with cmake 4.0
Set cmake policies to 3.5 when building with cmake 4.0

With cmake policies set to 4.0 Android fails to link correctly.
It is fixed by running the cmake command twice before doing the make build or setting the cmake policies to 3.5
2025-04-03 06:40:38 +01:00
Jake Turner 6ed8b4670f Moved SPIRV Shader Debugger control flow class to renderdoc/shaders
Renamed files from: spirv_controlflow -> controlflow

Preparation for sharing the shader debugger control flow code between SPIRV and DXIL debuggers
2025-04-02 13:48:21 +01:00
Jake Turner 4af5b27521 cmakefile support for building with cmake 4.0 2025-04-02 12:52:58 +01:00
Jake Turner f50c85173b Unified Subgroup_Zoo VK and D3D12 python
Improved test failure reporting
2025-04-02 08:43:30 +01:00
Jake Turner fa9bc127b1 Add early return test case to D3D12_Shader_DebugData
Change python to search backwards through the instruction info to find the value for a source variable
2025-04-02 08:39:49 +01:00
Jake Turner 061ef29a91 Remove unused DXBC::IDebugInfo::HasSourceMapping()
Never called from anywhere, not implemented for DXIL
2025-04-02 08:37:05 +01:00
Cam Mannett c3c1afbfdd VK_EXT_image_compression_control_swapchain 2025-03-29 08:36:55 +00:00
Cam Mannett 8d340d5fe4 VK_EXT_image_compression_control 2025-03-29 08:36:55 +00:00
baldurk eb35bbee68 Improve handling of 16-bit output from vertex shaders on Vulkan
* We now promote all I/O variables to 32-bit minimum when converting them to
  private since we might not have the capabilities available to leave them as
  16-bit. We instead snoop on any reads/writes to the private variables and
  insert the necessary width-expansions or contractions to convert between the
  stored & private 32-bit types and the shader's expected type.
2025-03-28 17:09:51 +00:00
baldurk c98a1c3042 Properly initialise generated parameter data in SPIR-V 2025-03-28 17:09:51 +00:00
baldurk 0ccec22757 Fix handling of sub-32-bit inputs in PS debugging. Closes #3569 2025-03-28 17:09:51 +00:00
baldurk b353bbdc66 For sparse MSAA textures ignore queried heap props. Closes #3561 2025-03-28 17:09:51 +00:00
baldurk e4af8bcf39 Only close texture goto when focus is lost
* Previously this closed as soon as the mouse left the bounds.
2025-03-28 17:09:51 +00:00
Amit Prakash 00381637a7 Update GPA Integration for 4.0
* Use gpa session instead of gpa context for counter interrogation.
2025-03-28 17:09:32 +00:00
Amit Prakash 9b5b58225d Update GPA 4.0 headers 2025-03-28 17:09:32 +00:00
baldurk 2d006eaa7b Ensure newlines are stripped from command line input
* These can be inserted via copy-paste even though Qt says that QLineEdit only
  does single line editing :(
2025-03-24 13:05:59 +00:00
baldurk d55a1c2412 Fix GL quad overdraw overlay when using renderbuffer for depth 2025-03-24 10:57:48 +00:00
baldurk e5f034bbba Fix SPIR-V editing with Intel driver workaround 2025-03-24 10:43:31 +00:00
Jake Turner c1013a1b82 Change SPIRV debugger control flow to emulate maximal reconvergence 2025-03-23 12:02:55 +00:00
Jake Turner 7ca6c741ca SPIRV ControlFlow helper class
Implements maximal reconvergence
2025-03-23 12:00:57 +00:00
Jake Turner 7f4098d835 Add vk_subgroup_zoo tests for maximal reconvergence behaviour
Diverged threads which re-converge at expected points
2025-03-23 12:00:53 +00:00
Jake Turner 593e57f65b DXIL debugger discard should not terminate helper lanes
Active lane is demoted to helper invocation which for pixel debug terminates the debug.

Non-active lanes skip over a degenerate branch if that is the next instruction after the discard.

This is a quick fix until maximal re-convergence style control flow is implemented, where quads reconverge at local uniform block
2025-03-20 15:00:37 +00:00
Jake Turner 673caa32a7 Add the input variables to DXIL debugger sourcevars 2025-03-20 13:52:21 +00:00
Jake Turner e8665926cc DXIL Disassembly match bindings with upperBound = -1
i.e.

Texture2DArray<float> resArray[] : register(t0);
2025-03-20 13:52:21 +00:00
Jake Turner d7fa6c9df0 Improve DXIL Debugger support for cbuffer arrays
Resolve the cbuffer resource names correctly to show the correct data in the "Constants" view in the Shader Viewer UI
Add a cbuffer reference mapping from SSA Id handles to: constantBufferIndex and arrayIndex
Change constantBlocksDatas to be a map from a cbuffer reference to a bytebuf
2025-03-20 13:52:21 +00:00