Commit Graph

15487 Commits

Author SHA1 Message Date
Jake Turner 80e4d5e1a6 Support for DXIL Constants created using GetElementPtr
Stop ignoring DXIL global variables which start with "dx.nothing."
Do not process constants from instructions which are counted as a nop by the simulation
2025-01-06 07:35:29 +00:00
Jake Turner 853097d554 Ignore member tags that are not DW_TAG_member
Defensive code for in case member->name is NULL
2025-01-03 15:20:41 +00:00
Jake Turner 03826a748b Fix wrong format specifier in DXIL debugger error message 2025-01-02 16:35:48 +00:00
Jake Turner 8ba666f0a9 Improve DXIL BufferStore/TextureStore out of bounds handling
For texture data the maximum number of components to store comes from the format
For non-texture data the maximum number of components is four which is then clamped to stop buffer overrun (by data size or offset)
2025-01-02 13:09:24 +00:00
Jake Turner 75aeb4820a Add a D3D12 Shader Debug Zoo test for writing to an int[1] buffer
Extends debugger coverage for handling read/write buffer bounds
2025-01-02 13:09:24 +00:00
Jake Turner f3bb7523b5 Reset the controlType current index to 0 in the BufferViewer constructor
This keeps the UI display in sync with the code internal settings for camera choice i.e. FlyCam/ArcBall. During the constructor, the UI setup for the different axis mappings will call on_resetCamera_clicked() and that can change the controlType current index value to be different from the expected/desired default value of 0.

Closes#3509
2025-01-02 09:44:54 +00:00
Jake Turner 5cda9752e0 Display the D3D12 IA indexStripCutValue in UI control "Restart Idx"
Previously "Restart Idx" was hardcoded to 0xFFFFFFFF
Show "Disabled" if the indexStripCutValue is D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_DISABLED (0)

Similar UI behaviour to the GL pipeline state viewer

Closes#3508
2025-01-02 09:44:10 +00:00
Jake Turner 71b6ed09e5 Improve DXIL ControlFlow detection of loop blocks
Now handles finding all loop blocks in a loop where a block (2) in the loop is only in a single path:

0 -> 1 -> 3 - 1
0 -> 1 -> 2 -> 3
3 -> 4 -> END
2024-12-30 12:07:24 +00:00
Jake Turner da9207bc13 DXIL ControlFlow Unit Test for specific loop construction
A loop where a block (2) in a loop is only in a single path
0 -> 1 -> 3 - 1
0 -> 1 -> 2 -> 3
3 -> 4 -> END
2024-12-30 12:07:23 +00:00
Jake Turner 06cf587041 Defensive code fix to prevent out of bounds memory during DXIL debugging
GetElementPtr and UpdateMemoryVariableFromBackingMemory
2024-12-30 12:07:23 +00:00
baldurk 3bafceb97e Bump version to v1.37 2024-12-20 17:23:33 +00:00
baldurk e690587683 Update docs for D3D12 shader debugging v1.36 2024-12-20 12:03:34 +00:00
baldurk 47dcef3062 Remove spammy debug log 2024-12-20 10:45:15 +00:00
Jake Turner 48e73fbca7 Improve handling of Matrix and Vector debug source mappings 2024-12-19 21:20:22 +00:00
Jake Turner 02c187fa26 Reserve locals space of average of one source var per instruction 2024-12-19 20:47:30 +00:00
Jake Turner 2dda3e2f03 Limit BufferStore to maximum of the number of components in the format 2024-12-19 19:46:18 +00:00
Jake Turner 4ab1d61f29 Defensively copy ResourceReference as it is a ptr to container element 2024-12-19 19:31:10 +00:00
Jake Turner 2481208ba4 Defensive code when walking meta data scopes 2024-12-19 19:30:42 +00:00
Jake Turner 57e875e866 Ignore any non DerivedType debug data when iterating type members 2024-12-19 18:06:26 +00:00
Jake Turner 850b92a279 Create ShaderVariables for DXIL Constants for use in source mappings 2024-12-19 18:05:54 +00:00
Jake Turner 0cdad7bd8e Allocate SSA IDs for DXIL Constants 2024-12-19 18:05:15 +00:00
Jake Turner 2aaac27f75 AtomicStore, Atomic* fixes
Use the allocation size of the pointer argument not the allocation size of the memory backing variable (stack or global)

For Atomic* operations:
* use the pointer argument as the variable input instead of the memory backing variable (static or global)
* copy just the res value into the result variable instead of the whole res variable
* use the pointer argument variable as the source pointer argument instead of the memory backing variable
* record changes to the pointer argument variable as well as to the memory backing variable
2024-12-19 16:47:11 +00:00
Jake Turner 2759ebff97 Update TODO comments for DXIL Debugger 2024-12-19 16:47:11 +00:00
Jake Turner 68d38734e1 Defensive coding to prevent crashes when accessing invalid SSAD IDs
Variable, Resource, CBuffer, Pointer Ids
2024-12-19 16:47:11 +00:00
baldurk 4b527239ae Fix making QTreeView function public in RDTreeView 2024-12-19 15:46:42 +00:00
baldurk c9a621a812 List registers last in shader viewer tables 2024-12-19 15:13:52 +00:00
baldurk 5c73842332 Fix source variables not properly propagating updateID 2024-12-19 14:08:02 +00:00
Jake Turner 65ce7ff127 Use the function name if no callstack is generated 2024-12-19 13:43:31 +00:00
Jake Turner c331152916 Extend scope lifetime to match how SSA IDs variables get extended
If the scope is in a loop block, use the next uniform block instead
2024-12-19 13:09:07 +00:00
Jake Turner b7ffeb8675 Mark HLSL debug matrix mappings as row major
Matches the source language
2024-12-19 13:09:03 +00:00
Jake Turner 13fd0eb294 Always emit debug vectors (including vectors inside matrices)
Even if only some of the elements are mapped, the UI will handle elements which are not mapped
2024-12-19 13:08:59 +00:00
Jake Turner 4121262581 Include DXC Nop instructions as steppable instructions
Helps with source level debugging stepping particular around inlined functions
2024-12-19 13:08:55 +00:00
Jake Turner 06b13f5ff6 Handle source variable mapping of sub-parts of matrix
single element
single row or column
2024-12-18 18:18:27 +00:00
Jake Turner d76d0c34e1 Improve handling of Load and Atomic operations on global memory
Remove assert about bool being 8-bits
2024-12-18 16:44:26 +00:00
Jake Turner ed9c24aaea Use debug location scope to find current debug scope 2024-12-18 16:43:45 +00:00
Jake Turner a3708cfc52 Ignore DXC Nop instructions when setting instruction disassemblyLine 2024-12-18 15:52:21 +00:00
Jake Turner 4096ba9eaf DXC disassembly should not set the disassemblyLine values
That is required by the DXIL debugger which uses the RD disassembly
2024-12-18 15:47:42 +00:00
Jake Turner b5ba9bde12 Detect vector and matrix debug types from DXIL template params 2024-12-18 15:43:16 +00:00
Jake Turner 86ff77ade8 Remove DXIL:: from function definitions already in the DXIL namespace 2024-12-18 15:41:17 +00:00
Jake Turner e96d1b6c1a Fix reading off the end of the instructionToBlock array 2024-12-18 15:39:29 +00:00
Jake Turner aee9013a8f Iterate over the debug scopes downwards 2024-12-18 15:05:49 +00:00
Jake Turner faaf12f383 Remove use of activeInstructionIndex for debug instruction tracking 2024-12-18 15:05:00 +00:00
Jake Turner 7f35d5a83f Extend the lifetime of SSA IDs which are mapped to source variables
Extend the lifetime to the end of the scope where they are mapped
2024-12-18 14:06:14 +00:00
Jake Turner 141b86ac70 Update the UI debug state after all lanes have executed and skipped nops
This keeps UI nextInstruction in sync with m_ActiveGlobalInstructionIdx
2024-12-18 14:06:14 +00:00
Jake Turner f6829299ba Ignore source variables making later than the current instruction 2024-12-18 14:06:14 +00:00
Jake Turner de70f5b4b2 DXIL Debugger remove incorrect assert for byte addressing and stride 2024-12-18 08:40:04 +00:00
baldurk 4ac6b7765c Fix invalid encoded character 2024-12-17 17:40:30 +00:00
baldurk 663ae9bc94 Update tip about attaching to running instances 2024-12-17 17:36:27 +00:00
baldurk 624a2cdb4d Disable queried GPU upload heap feature 2024-12-17 17:36:07 +00:00
baldurk 13ba321e4a Add note to docs about nvidia driver support 2024-12-17 15:33:02 +00:00