Commit Graph

15505 Commits

Author SHA1 Message Date
baldurk 898e4e0028 Fix missing queue use in FlushLists call 2025-01-08 10:25:50 +00:00
Elliot Saba e6b4de8138 Android: Automaticaly add MANAGE_EXTERNAL_STORAGE permission to apps
This prevents the user from needing to click through a permission
granting screen on their device before the agent is able to run on the
device, but only does so if the API level is >= 30 (where this
permission has effect at all [0]) and if a particular property is set on
the device (`debug.renderdoc.autograntpermissions`) so as to avoid
potential pitfalls on unusual Android devices.

[0] https://developer.android.com/reference/android/Manifest.permission#MANAGE_EXTERNAL_STORAGE
2025-01-07 20:28:26 +00:00
baldurk 64c77e917e Be more consistent and conservative with GPU syncing on D3D12
* In some cases we were only syncing one queue when we needed to flush and sync
  the whole GPU. Rename functions to be more clear about what is being synced,
  and only sync one queue/our internal queue when we know that's the only work
  we need to wait on.
2025-01-07 16:54:52 +00:00
baldurk 74a6e28f5a Improve ability to redeclare buffer formats from struct definitions 2025-01-07 16:11:32 +00:00
baldurk 7edcbfbdbc Fix bitfields not being resolved before structure uses 2025-01-07 15:10:44 +00:00
baldurk 79be74a8ec Only modify bitfield properties if bitfields are active 2025-01-07 14:43:19 +00:00
baldurk 980b6a8bf0 Add test of SM6.7 bitfield reflection 2025-01-07 13:43:45 +00:00
baldurk 2d86fe6b12 Ensure log output is clean when listing available demos 2025-01-07 13:43:45 +00:00
baldurk 4d4fbdcaa3 Demos project loads D3D12.dll relative to exe not CWD 2025-01-07 13:43:45 +00:00
baldurk f04e574cda Recalculate offsets for structured buffers on DXIL
* The offsets provided in the reflection data are garbage :(
2025-01-07 13:19:28 +00:00
baldurk 73b52dafb8 Resolve pending bitfield packing before applying specified field offsets 2025-01-07 13:19:28 +00:00
baldurk 55d939cdd8 Respect bitfield packing when generating format string for struct 2025-01-07 13:19:28 +00:00
baldurk 6261cb42d3 Fix missing indent for declared buffer structures 2025-01-07 13:19:28 +00:00
baldurk 49b2d16616 Reflect bitfield information out from DXIL data 2025-01-07 13:19:28 +00:00
baldurk ada407ca56 Fix breakpad compilation on recent VS2022 2025-01-07 11:49:18 +00:00
Jake Turner 233f7d1b97 DXIL Disassembly include DebugValue, DebugDeclare parsing 2025-01-06 19:53:29 +00:00
Jake Turner ab9db02608 Make unsupported DXIL Constant Op be an error instead of log 2025-01-06 14:44:13 +00:00
Jake Turner b370ba10d6 Ignore source mapping for LLVM debug, lifetime, invariant instructions 2025-01-06 14:44:13 +00:00
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