Commit Graph

15953 Commits

Author SHA1 Message Date
baldurk 3aaf08c903 Add workflow for inactivity lock 2025-05-30 11:05:10 +01:00
baldurk 6111affe33 Update to latest vulkan headers
* VK_KHR_robustness2 is supported as a trivial promotion
2025-05-26 21:44:24 +01:00
baldurk cafa6acc64 Update to latest SPIR-V core grammar 2025-05-26 16:52:28 +01:00
baldurk 435956cf4d Format VK_WHOLE_SIZE properly on texel buffers in pipeline state 2025-05-26 15:00:00 +01:00
baldurk d7236e0d91 Fix reads & writes to storage texel buffers in vulkan shader debugging 2025-05-26 14:59:46 +01:00
baldurk 58a9f3cce1 Tweak naming of images particularly storage images in SPIR-V disasm 2025-05-26 13:21:34 +01:00
baldurk 6263c7100c Avoid problems with windows 11 hotpatch DLLs not behaving properly 2025-05-26 13:18:49 +01:00
baldurk e070de60ad Improve disassembly of SPIR-V where a function's last block isn't return
* In this case the last block in the function was part of a loop continuing, and
  the merge return block was inside the loop.
2025-05-26 10:56:54 +01:00
Jake Turner d4c1919a9c Fix assert check on format number of components for AtomicBinOp on UAV
Tweak error message about AtomicBinOp storing to out of bounds or unbound resource
2025-05-22 14:01:14 +01:00
Jake Turner f79b95c8db Update active thread DXIL global pointers to the local backing memory 2025-05-22 12:12:09 +01:00
Jake Turner 1881b26fef Test for DXIL constant global pointers 2025-05-22 12:12:09 +01:00
Jake Turner f152c2b585 Fix incorrect assert in DXBC debugger GetGroupsharedSrc 2025-05-22 11:56:36 +01:00
baldurk 42e1ecef5f Ensure unformatted internal details aren't displayed for RT calls 2025-05-21 22:41:49 +01:00
baldurk 367ec41fa2 Reset D3D11 offset/counts to default if NULL is passed. Closes #3614
* These make the 1 bind functions behave like the normal bind functions
2025-05-19 22:08:11 +01:00
Jake Turner 962c1cdcf6 Enable Python shader trace validation by default 2025-05-19 16:57:22 +01:00
Jake Turner 4539ff5c43 DXIL Debugger GroupShared simulation changes
On the active thread
* GSM reads come from the local GSM cache (not the global GSM data)
* GSM writes go to the local GSM cache and the global GSM data
* Workgroup Memory barrier populates the local GSM cache with the data from the global GSM data

On the non-active threads:
* GSM reads/write always operate on the global GSM data
* Workgroup Memory barrier is ignored
2025-05-19 16:56:03 +01:00
Jake Turner 9523f98b8a Python implementation of ShaderDebugTrace validation
Similar to the validation that is performed in ShaderViewer UI
Disabled by default pass True to process_trace to enable the validation
Includes validate_shadervariable() and shadervariable_equal()
2025-05-19 16:44:45 +01:00
Jake Turner f120f46b45 ShaderViewer UI validation for ShaderVariable construction
if members.size() == 0
rows * columns must be between 1 and 15
type must not be Struct

if members.size() > 0
type must be Struct or Unknown or ConstantBlock
rows must be 0
columns must be 0
then recurse and check construction of each element of members array
2025-05-19 16:44:25 +01:00
Jake Turner fe53dd874e Ignore void return values in the SPIRV debugger
Do not call SetDst() which won't create a ShaderVariableChange
Would also prevent a non-null return value being used for the next void return function
2025-05-19 16:42:38 +01:00
Jake Turner 8133364057 Update DXIL constant buffer ShaderVariable columns count 2025-05-19 16:41:34 +01:00
Jake Turner 04e476d54a Simplify DXIL Disassembly for global variable pointers
Unify the name generation with the DXIL debugger name generation
2025-05-19 16:41:20 +01:00
Jake Turner 4a50e28a78 Spirv debug set rows = 0, columns = 0 for helper Struct ShaderVariable's 2025-05-19 16:40:55 +01:00
Jake Turner 890f80b6d8 Set DXIL arrays to type Unknown 2025-05-19 16:40:36 +01:00
Jake Turner f457a5194e Fixups to make DXIL Debugger ShaderVariables correctly formed 2025-05-19 16:40:22 +01:00
Jake Turner 915339042e Set DXBC GSM and Temp registers to have rows = 0 and columns = 0 2025-05-19 16:39:41 +01:00
Jake Turner f8b25203dc Fix D3D12 Pixel History ExecuteIndirect with multiple draws
Update m_IndirectData.argsOffset inside the loop
Clear the m_IndirectData outside of the loop

Add not NULL assert for argsBuffer in ReplayDraw() helper
2025-05-19 15:41:45 +01:00
Jake Turner be6cc2d324 Verify pixel history succeeds as part of D3D12_Execute_Indirect tests 2025-05-18 12:52:56 +01:00
Jake Turner 66aabcaba3 Set the correct type for DXIL constant buffer array ShaderVariables
Change the name of constant buffer array elements to match access to match SRV and UAV naming i.e. cbvArray[3] instead of cbvArray_3_0
2025-05-18 09:25:44 +01:00
Jake Turner 72ff41656f Fix incorrect assert for result.type in DXIL SetResult
Want to assert if members.empty() && type == Unknown
2025-05-18 09:25:34 +01:00
Jake Turner 3f8df6b589 Spirv Debugger GroupShared simulation changes
On the active thread
* GSM reads come from the local GSM cache (not the global GSM data)
* GSM writes go to the local GSM cache and the global GSM data
* Workgroup Memory barrier populates the local GSM cache with the data from the global GSM data

On the non-active threads:
* GSM reads/write always operate on the global GSM data
* Workgroup Memory barrier is ignored
2025-05-16 17:54:44 +01:00
baldurk 0fb918909e Fix ordered list editor to look up row instead of caching
* The widget was persistent so caching the row in the callback could lead to an
  invalid (or wrong) row being used.
2025-05-16 16:01:28 +01:00
baldurk ea19a5d20b Update build-shaderc to properly build on VS2022 with x64
* Add a helper script to build demos with VS2022 in release for shipping that
  link to shaderc. By default VS2015 won't link to it.
2025-05-16 16:00:56 +01:00
baldurk 1564c7f44e Handled typed pointers with bare scalar types not structs 2025-05-16 16:00:55 +01:00
baldurk 16ab38abde Set up array stride for BDA pointers in push space 2025-05-16 16:00:55 +01:00
Jake Turner 0ee04850c1 Spirv debugger ShaderViewer UI consistency fixes
* use a NULL before value when variables are recreated after going out of scope i.e. in a loop
* only add to the live list if m_State is not NULL (m_State can be NULL in EnterFunction() if HasDebugInfo() is false i.e. when called from EnterEntryPoint())

When generating variable changes from pointers:
* only include variables which are live
* do not include the base variable change in the list of extra changes
2025-05-14 18:11:05 +01:00
Jake Turner 8dcf051d99 Fine grained ShaderVariable comparison for ShaderViewer UI consistency 2025-05-14 18:11:05 +01:00
Jake Turner 47c64f607d ShaderVariable UI consistency check for duplicated variable change
Detect if a ShaderVariable has multiple changes per step
2025-05-14 16:28:37 +01:00
Jake Turner b53bd38828 Use correct nextInstruction value when generating callstack for inlines 2025-05-14 13:45:51 +01:00
baldurk b19c5b9f73 Prevent crash if programmatic capture happens after deleting swapchain 2025-05-13 15:16:42 +01:00
baldurk 2665c1f65c Add decoding of V2 pix markers 2025-05-13 14:11:42 +01:00
baldurk 71e607cf0e Use internal printf for decoding PIX event formats. Closes #3607
* The internal printf was already used for all numeric types but PIX of course
  has special encoding for strings so this was manually handled. Instead use the
  callback-based formatter and decode strings for there, so that varargs string
  length and string padding formatters are supported.
2025-05-13 14:11:42 +01:00
baldurk fc9999d67c Add support for varargs length in utf8 printf 2025-05-13 14:11:42 +01:00
zllangty 9fab650555 Add LoongArch64 support
With addition macros project able to build and run on LoongArch64 machine
2025-05-13 12:18:06 +01:00
Jake Turner 0e2cfde411 D3D11 GroupShared simulation changes
* On the active thread GSM reads come from the local GSM cache (not the global GSM data)
* This brings consistency in debugger UI when seeing the GSM data as variables (which is populated from the local GSM cache) and seeing the results of reading from the GSM data

GSM writes already populated the local GSM cache and the global GSM data
GSM Sync populates the local GSM cache with the data from the global GSM data
2025-05-10 12:00:05 +01:00
Jake Turner fc956fee61 Improvements to *_Groupshared tests
More checking of GSM local/global cache behaviour when debugging
One test is not GPU stable and its results are verified against hard coded expectation (this is to test the expected behaviour of the local GSM cache on the active thread)
2025-05-10 11:49:43 +01:00
Jake Turner 370334ca6e Do not do ShaderViewer UI consistency checks in RELEASE builds 2025-05-09 13:27:10 +01:00
Jake Turner 3408a3be86 Null out "before" change completely not just clear the name 2025-05-08 16:08:25 +01:00
Jake Turner 6b39f8de88 ShaderViewer UI error checks for consistency in ShaderVariableChanges
Step Forwards: first appearance of a variable must have "before" = {}
Step Forwards: not-first appearance of a variable "before" must equal currently known value

Step Backwards: first appearance of a variable must have "after" = {}
Step Backwards: not-first appearance of a variable "after" must equal currently known value
2025-05-08 16:06:35 +01:00
Jake Turner 1598abfa3b Manually record ShaderVariableChange's for Load/Store/Atomic operations 2025-05-08 16:06:35 +01:00
Jake Turner 28a5ae4b01 Do not record ShaderVariableChanges or any results from DXC nop's 2025-05-08 16:06:35 +01:00