Commit Graph

15261 Commits

Author SHA1 Message Date
Jake Turner 2c55fcac93 DXIL ControlFlow put debug logging behind a config option
"D3D12_DXILShaderDebugger_Logging"
2024-11-28 17:33:22 +00:00
Jake Turner 82825fdf90 DXIL Debugger get PS inputs' interpolation mode from DXIL metadata 2024-11-27 15:00:05 +00:00
Jake Turner dbf3569d26 DXIL Program added GetEntryPointInterface()
Returns the parsed entry point metadata (Inputs, Outputs, Resources, etc.)
2024-11-27 13:26:44 +00:00
Jake Turner 2c42c1dac2 DXIL Disassembly show the interpolation mode on Input/Output variables 2024-11-27 13:22:59 +00:00
Jake Turner a39c4cf1db D3D12 Pixel History do not copy depth for non-raster events
This can be invalid i.e. a ClearRenderTarget() no guarantee what/if a depth target is bound
2024-11-27 11:24:45 +00:00
Jake Turner 9271dde9e8 D3D12 Pixel History do not crash when processing an unknown fragment
This could happen with non-deterministic replay
2024-11-27 08:50:06 +00:00
Jake Turner 0c5c642e29 D3D12 Pixel History scale minimum number of fragments with event count
Increased the buffer storage to support a minimum of 1024 fragments
2024-11-27 08:48:49 +00:00
Jake Turner 7fe7c3d4ff DXIL Debugger align up to 16-bytes the constant buffer data size 2024-11-27 08:47:50 +00:00
Jake Turner 67ae25575c DXIL ControlFlow Optimisations 2024-11-27 08:46:03 +00:00
baldurk 4edd76ed5b Patch BDA feature in 1.2 promoted feature struct query
* If BDA capture/replay is not supported we patched the feature query for the
  vulkan 1.2 struct, but if an application used the promoted KHR extension
  struct we weren't patching that because it was previously invalid to query on
  the extension itself.
2024-11-26 14:49:07 +00:00
Jake Turner 39eb3f1537 DXIL Debugger improve the detection of when threads are diverged
Discount threads which have finished which could include helper threads which have called discard
2024-11-26 11:18:47 +00:00
Jake Turner bca09b1126 DXIL Control Flow added a simple if/then test case 2024-11-26 11:17:23 +00:00
Jake Turner c24d82f55d DXIL Debugger error if no threads are marked as active
Run all threads which haven't finished
2024-11-26 07:00:13 +00:00
Jake Turner e7a8ad4614 DXIL Control Flow Change FindUniformBlocks to ignore blocks in a loop 2024-11-26 07:00:13 +00:00
Cam Mannett 7b767c9e6e Preliminary Vulkan AS/RQ test
This test renders a small triangle that casts a shadow from a point light, onto a larger triangle.  The test runner then checks that various pixels in the final output are the correct colour.

There is also an arbitrary AS copy in the render loop just to hit more API coverage when manually capturing, but the test runner doesn't check its output.

Core test work originally done by martyn.jacques@arm.com
2024-11-25 13:09:22 +00:00
baldurk 4cc7b48fd8 Fix mac 2024-11-24 17:56:17 +00:00
baldurk 0d98c979e7 Add NV project on all platforms, only include aftermath stubs 2024-11-24 14:48:17 +00:00
baldurk 97c7586758 Make nv aftermath files compile on linux (as a no-op) 2024-11-24 01:34:59 +00:00
baldurk ca8ad9c3aa Add NV aftermath integration for replay-time crash detection
* As the aftermath headers can't be distributed currently this requires putting
  those headers in the right place. Then the resulting build can load the
  aftermath dll if it exists in the plugins folder.
2024-11-24 00:58:51 +00:00
baldurk e2b05eca1f Add missing files to NV VS project 2024-11-24 00:58:51 +00:00
baldurk 1c58364627 Update version of nvapi to R560 from github 2024-11-24 00:58:51 +00:00
baldurk 5d81d0b612 Enable debug for internal shaders when GPUVA is enabled 2024-11-24 00:58:50 +00:00
baldurk d5b4f78abf Add option to block nvapi 2024-11-24 00:58:50 +00:00
baldurk 20d76052ee Fix incorrect parameter in D3D12 demos project 2024-11-24 00:58:50 +00:00
baldurk fa03d19088 Treat an AsyncInvoke with empty tag like no tag
* Otherwise such an invoke could delete untagged events out of the queue which
  is definitely not what we want. Where is my draw? was doing this and it caused
  internal untagged events which must not be dropped to be removed.
2024-11-24 00:58:50 +00:00
Jake Turner 12a60875db DXIL Debugger CBufferLoadLegacy now loads data directly from buffer
Support the case where cbuffer load is out of bounds from the declared constant buffer structure but within bounds of the attached data i.e. shader reads outside of array bounds
2024-11-21 09:10:04 +00:00
Jake Turner 497f7c36c4 DXIL Debugger memory handling improvements
Moved memory tracking into struct MemoryTracking
Global variables go into global memory
All threads memory tracking is populated with global memory tracking
2024-11-21 06:48:29 +00:00
Jake Turner 7136385bb1 DXIL support for LLVM lifetime, invariant LLVM intrinsics
Treated as nops by the debugger and disassembler

Extended Function call classification to support LLVM intrinsics
Renamed enum LLVMDbgOp -> LLVMIntrinsicOp
Extended the enum to handle LLVM intrinsics:
* llvm.lifetime.start
* llvm.lifetime.end
* llvm.invariant.start
* llvm.invariant.end
2024-11-21 06:32:09 +00:00
Jake Turner 8019491356 DXIL Debugger fix an off by one error when matching resource binds 2024-11-20 16:28:33 +00:00
Jake Turner 2a4c88f9f7 DXIL Debugger support for DXOp::LegacyF32ToF16, DXOp::LegacyF16ToF32 2024-11-20 16:28:33 +00:00
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