Commit Graph

15231 Commits

Author SHA1 Message Date
Jake Turner cb3bc8b528 D3D12 Shader Debug Zoo: added a test case for f32tof16() & f16tof32() 2024-11-20 16:28:33 +00:00
baldurk dea24cd5d8 Add BDA support to AllocatedBuffer in demos
* This requires setting vmaBDA to true, which is opt-in as it applies
  universally to all memory allocations in the test. We don't know if there are
  driver impacts from enabling BDA and it may also mess with our tests.
2024-11-20 15:49:53 +00:00
baldurk 9916defb14 Update VMA to v3.1.0
* We make BDA opt-in as it applies to all memory allocations.
2024-11-20 15:49:53 +00:00
baldurk 030f3430ee Workaround AcquireNextImage being awful
* Apparently the spec allows drivers to do extremely stupid things with
  swapchain images and return them even when it's not valid for you to use them
  yet because last frame's work to the image is still ongoing, which leads to a
  validation warning about using a semaphore when it might technically still be
  in flight.
* To get around this because AcquireNextImage doesn't actually block until an
  image is ready inspite of having a timeout and being expected to return a
  usable image it doesn't, we use a manual fence to do what AcquireNextImage
  should be doing.
2024-11-20 15:49:53 +00:00
Jake Turner 2daffaee4a DXIL Disassembly prefix phi SSA with the block
Highlight that the SSA value used as the phi result is captured from the block branched from, not the SSA value in the current block

i.e.
_label7:                      // preceded by _label9, _label6
  float _375 = phi float [ _label9::_404, _label9 ], [ 1.00000, _label6 ];
  float _376 = phi float [ _label9::_375, _label9 ], [ 1.00000, _label6 ];
2024-11-20 11:49:42 +00:00
Honeybunch 3ea9735866 Mesh Shader Debugging 2024-11-20 10:50:14 +00:00
Jake Turner a48f11d2b5 DXIL Disassembly show input/output signature details 2024-11-20 09:10:38 +00:00
Jake Turner badc91fc2a DXIL Debugger capture Phi referenced SSA IDs at branch point
If control reached the current block from Parent i, Result Id gets the value that Variable i had at the end of Parent i.
2024-11-20 09:07:45 +00:00
Jake Turner 2f298090ad DXIL Debugger hook up DXOp::DeriveFindX/Y 2024-11-20 08:59:09 +00:00
Jake Turner 5a5371e733 DXIL Debugger gather argument is Int, set flushDenorm = false
Fixes assert found during testing
2024-11-20 08:58:54 +00:00
baldurk 91c935ffde Fix verify-docstrings to handle rdcfixedarray tuples
* Removes a couple of exceptions from functions it can't verify.
2024-11-18 11:31:12 +00:00
baldurk 630d13a48e Fix descriptor race against ongoing GPU work in test 2024-11-15 17:22:32 +00:00
baldurk 322a0698f7 Fix use before build in demos project 2024-11-15 16:48:03 +00:00
Jake Turner c3287ee4fa DXIL Debugger support for Control Flow
Step over nop instructions when entering a function
Step over nop instructions after a simulation step
Changed ThreadsAreConverged() -> ThreadsAreDiverged()
2024-11-15 13:25:15 +00:00
Jake Turner d498f11258 DXIL Debugger merge Live, Dormant variable containers 2024-11-15 13:21:39 +00:00
Jake Turner 2d0ce14633 Iter Test skip pixel debug when no pixel shader bound at mod event 2024-11-15 13:19:00 +00:00
Jake Turner f11db57d68 Function to compute uniform blocks from DXIL unstructured control flow
New files dxil_controlflow.{cpp,h}
2024-11-15 11:59:01 +00:00
Cam Mannett 59cc12ff3f Incorrect command buffer used on Vulkan AS copy replay 2024-11-15 10:48:24 +00:00
baldurk 83ac6d3697 Ensure resources created mid-frame are properly forced referenced 2024-11-14 10:21:10 +00:00
baldurk 1b39f2676b Add proper sync of all queues (vkDeviceWaitIdle equivalent) when needed 2024-11-13 15:50:19 +00:00
baldurk 52d62bb7de Try to minimise redundant barriers with resources with many subresources 2024-11-13 15:33:21 +00:00
baldurk 38c52c3367 Add config options to enable GPU VA & DRED at runtime 2024-11-13 15:25:20 +00:00
Jake Turner 0d8190e5e1 DXIL Debugger improve AnnoteHandle handling
Store the DXIL::ResourceKind to detect the buffer type
2024-11-13 09:08:47 +00:00
Jake Turner ed3ed86ede DXIL Debug GetShaderVariable() handling of DXIL Constant comound types
Fixed incorrect assert in ConvertDXILConstantToShaderVariable()
Handle DXIL Constant compound types in GetShaderVariable() using:
ConvertDXILTypeToShaderVariable()
ConvertDXILConstantToShaderVariable()
2024-11-13 09:07:45 +00:00
Jake Turner 8da03d8401 Improve DXIL Resource reflection buffer return type
Detect buffers of a single scalar/vector type
2024-11-13 09:07:01 +00:00
Jake Turner 49bb258ccc Added Stringise for DXIL::ResourceKind 2024-11-13 09:05:49 +00:00
Jake Turner b4a86958e2 DXIL Debugger added ThreadsAreConverged()
Current implementation of ThreadsAreConverged()
* must be in the same basic block
* must be on the same active instruction

Assert that the threads are converged in:
* sampling operations that use derivatives
* derivative instructions
* sync thread group
2024-11-12 16:19:28 +00:00
Jake Turner 96ac592995 DXIL Debugger refactopred high level thread step loop
For all active threads: skip over nop instructions and update the active instruction index
For all active threads execute a single instruction (guaranteed not to be a nop instruction)
2024-11-12 16:18:47 +00:00
Jake Turner cd84b7b6c0 DXIL Disassembly support for Barrier 2024-11-12 16:18:47 +00:00
Jake Turner 3877803a16 Compute and return usedInputs from GatherPSInputDataForInitialValues
Ignored for DXBC.
For DXIL this is used instead of searching the generated HLSL shader source
2024-11-12 16:13:43 +00:00
Jake Turner 0b11018eae DXIL Debugger support for initialised constant global variables
Includes improvements to UpdateBackingMemoryFromVariable() to support more complex variable types
2024-11-12 10:37:15 +00:00
Jake Turner be24fc8aaa DXIL Disassembly and Debug sanitise global variable names
Using newly added DXIL::SanisiseName()

Current implementation converts '.' -> '_'
2024-11-12 10:21:37 +00:00
Jake Turner f896599620 Added Strinise for DXIL::ValueKind 2024-11-12 10:20:37 +00:00
Jake Turner d63be95b45 DXIL Disassembly fix spelling mistake in variable name 2024-11-12 07:45:08 +00:00
baldurk ec8bfeafb3 Ensure dedicated resources in D3D12 buffer allocator don't get reused
* If we don't call SubAlloc (which will consume the whole resource) then it is
  pushed into the same free list as is used to allocate non-dedicated buffers
  from.
2024-11-11 18:20:37 +00:00
baldurk bd2f8a5d14 Only disable validation without SDKLayers dll when not using config
* If we have a config, enabling the debug layer will fail gracefully if we don't
  have a ID3D12Debug. This allows overridden D3D12 dll folders to use validation
  even if the capture doesn't include a validation DLL.
2024-11-11 18:19:41 +00:00
baldurk bfa9ab1687 Fall back to queried version directly from adapter if not found
* This is better for WARP which will not be enumerated by setupapi as a physical
  device.
2024-11-11 18:17:51 +00:00
Jake Turner 46893c5d6b DXIL Debugger small tweak to AnnotateHandle properties data 2024-11-09 13:32:38 +00:00
Jake Turner af1ea65dde DXIL Debugger support for AnnotateHandle
Get the resource access properties from the properties defined by AnnotateHandle
2024-11-09 12:58:44 +00:00
Jake Turner 4c990e6209 DXIL Disassembly and Debugger unify inputs/outputs/resources names 2024-11-09 09:01:31 +00:00
Jake Turner ebe32ec1dc DXIL DebugVertex set the updated constant block data in the trace 2024-11-09 08:56:57 +00:00
Jake Turner 2443dbcb55 Shader Editing: Fix problem where single Replace didn't work
Use the same findHash string in performReplace() as in performFind() by including the find direction in the findHash in performReplace()
2024-11-09 07:07:11 +00:00
baldurk 94b01feb22 Fix missing include for std::hash 2024-11-08 13:57:12 +00:00
baldurk 634e74793a Add recursive search of shader debug paths for debug files
* This doesn't seem to be documented anywhere but some applications rely on it
  and it seems like PIX behaves this way, so it is as with many things in D3D
  the defacto standard
2024-11-08 12:00:23 +00:00
baldurk 991b8c3a01 Add std::hash overload for rdcstr to allow it to be used in hashmaps 2024-11-08 11:57:24 +00:00
baldurk e9a6e0ebd0 When disabling XFB after replay, note if it was enabled. Closes #3478 2024-11-08 10:49:05 +00:00
baldurk 90411d50ed Refuse to read contents of AS buffers on D3D12 2024-11-08 10:49:05 +00:00
baldurk c427a3f85f Handle NULL AS descriptors correctly 2024-11-08 10:49:05 +00:00
Jake Turner d1663d9be7 D3D12 Pixel History fix device removed with large number of fragments
Destination copy buffer was sized to the number of events, this did not guarantee enough storage for the per fragment data i.e. small number of events with large of fragments per event

Reserve space for at least 256 fragments or 128 events in the buffer
Do not get data for fragments if the buffer does not have enough space

In the problem case the buffer went from 4KB to 28KB
2024-11-07 15:27:38 +00:00
Jake Turner 0be2b866a9 DXIL Debugger fix up argument indexes for DXOp::IMul, UMul, UDiv 2024-11-07 15:27:17 +00:00