Commit Graph

15269 Commits

Author SHA1 Message Date
baldurk c43db5a64d Try to serialise ASs as their own IDs not as a buffer+offset
* Preallocate IDs for builds and pass via a new serialise sideband key-value
  storage. It's ugly and warty but less ugly than trying to pack the data in
  directly.
* Descriptor references to ASs may not be right as a descriptor could be written
  before a build is even known about, or at least before it has fully resolved
  on the CPU timeline.
2024-12-02 13:39:26 +00:00
baldurk 5d3f966cb8 Check BLASs comprising a TLAS are actually BLASs and are older (by id)
* If the same AS is re-used for a new BLAS, consider the TLAS invalid/stale and
  0 out its address. Similarly if a TLAS somehow ends up there (though it should
  always fail the age check first)
2024-12-02 13:39:26 +00:00
baldurk 3a422fa92d Serialise the AS type with its creation info 2024-12-02 13:39:26 +00:00
baldurk fd53c0f14f Ensure build data doesn't leak if lists are reset/freed without submit 2024-12-02 13:39:26 +00:00
baldurk 9cc10b9307 Always give new ASs a new ID, never re-use an ID
* For ease of tracking this is simpler as there is currently no situation where
  we need to know the providence of an AS and what ID it was before if it's
  rebuilt in place with the same size (e.g. an in-place update). On the other
  hand it is useful to know when an AS is a new build for potential TLAS
  invalidation or lifetime checking.
2024-12-02 13:39:25 +00:00
JorenJoestar 33008e3203 m_cleanupImageBarriers in WrappedVulkan does not update its size 2024-12-02 10:40:14 +00:00
Jake Turner 642a9954f4 DXIL Debugger refactor resource access to use DXIL metadata
Remove use of DXBC Reflection from DXIL Debugger
2024-11-28 17:33:26 +00:00
Jake Turner eab144bd3f DXIL disassembly use correct int type name for resource type dislpay
Previously all integer types were shown as "int" including "int16_t" typed buffers
2024-11-28 17:33:26 +00:00
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