Commit Graph

15283 Commits

Author SHA1 Message Date
baldurk 671cca2a98 Remove unused code 2024-12-02 13:39:27 +00:00
baldurk a77c8fc13b Rename and group RT debug options 2024-12-02 13:39:27 +00:00
baldurk 250c448ebc Add verification of AS init contents 2024-12-02 13:39:27 +00:00
baldurk 7e3bbcc7a3 Add verbose logging for audit mode 2024-12-02 13:39:27 +00:00
baldurk 081345fccf Add verification of TLAS build inputs 2024-12-02 13:39:27 +00:00
baldurk 9e65af1a8c Don't submit any RT work while auditing
* We're probably crashing if this mode is enabled - try to avoid the crash.
  Don't build or copy ASs, and don't dispatch rays. Still do all the patching
  prep though.
* To remove ray query work, force-write all AS descriptors as NULL both with
  dynamic writes and initial contents.
2024-12-02 13:39:27 +00:00
baldurk 9c6d21cc6b Add CPU-side verification of ray dispatch patching 2024-12-02 13:39:27 +00:00
baldurk 131a5227e9 Save the whole patched ray dispatch with heap IDs, not just resources
* This is unused normally but will be helpful for doing CPU-side verifies of ray
  dispatches.
2024-12-02 13:39:26 +00:00
baldurk 6b8ef1232b Use helper for managing buffers referenced by dispatch resources 2024-12-02 13:39:26 +00:00
baldurk 269fa0e036 Add debug names for internal RT pipelins 2024-12-02 13:39:26 +00:00
baldurk 20ade651dd Fix local root signature default association in subobjects 2024-12-02 13:39:26 +00:00
baldurk c01b6d1f1d Handle global root signatures created from libraries with embedded RDAT 2024-12-02 13:39:26 +00:00
baldurk e19869239b Cache ASs to disk after a number of seconds 2024-12-02 13:39:26 +00:00
baldurk 5a9f200f94 Track when GPU work for build inputs has completed 2024-12-02 13:39:26 +00:00
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