Commit Graph

15312 Commits

Author SHA1 Message Date
Jake Turner 8e69038ebc Extend DXDebug::BindingSlot to support direct access heap bindings
Add new members
HeapDescriptorType heapType;
uint32_t heapIndex;
2024-12-04 09:51:49 +00:00
Jake Turner 140c681e66 DXIL Debugger new struct ResourceReferencceInfo for resource details
Replaces previous use of DXIL::ResourceReference* which is only available for direct bindings
2024-12-04 08:37:21 +00:00
Jake Turner dbe18fc7fe Added ShaderDirectAccess helper struct and ShaderVariable set/get
ShaderDirectAccess is used to reference resources which are accessed directly from the Shader (not via a direct binding). Shader resource references using direct binding are stored in ShaderBindIndex.
2024-12-04 08:37:21 +00:00
baldurk 61a559a944 Expand cases where we don't hook an already loaded module
* Some nv libraries like to do this a *lot* for nvapi.dll.
2024-12-03 17:11:21 +00:00
baldurk d37b0ee00b Fix issue with iterating actions via previous/next in python
* We keep parent references when returning child objects via reference/python
  object wrappers rather than copying. But when iterating a linked list like the
  actions this can produce an incredibly long parent chain and then on
  destruction we can stack overflow if the chain is long enough.
2024-12-03 15:01:58 +00:00
baldurk 8d04479d20 Add additional check on index buffer values being out of bounds 2024-12-03 15:01:58 +00:00
Jake Turner 3de21cd16f DXIL Debugger sort unimplemented DXOp's into three lists
1. Likely to implement when required
2. Don't know if needs to be implemented
3. No plans to implement
2024-12-03 06:20:36 +00:00
Jake Turner dc1a7c57db Update DXIL Global Shader Flags to latest version SM6.8
For the future display any unknown global shader flags as hex value
Make sure the DXIL debugger line numbers match the disassembly output if there are unknown global shader flags
2024-12-03 06:20:36 +00:00
Jake Turner 8b3a5ee826 DXIL Debugger helper methods to clear/set/get AnnotatedHandle property 2024-12-03 05:47:38 +00:00
Jake Turner 9abacbf6ea DXIL Debugger removed unused method DebugAPIWrapper::IsResourceBound()
Also removed associated private helper methods IsUAVBound(), IsSRVBound()
2024-12-03 05:45:50 +00:00
Jake Turner 4532b888ed Add SM 6.2 and StructuredBuffer<int16_t> to D3D12 Shader Debug Zoo test 2024-12-03 05:21:41 +00:00
Jake Turner 56fffb5dc2 D3D12 Tests add uint32_t compileOptions to Compile()
Current options are:
SkipOptimie : the default
Enable16BitTypes
2024-12-03 05:21:41 +00:00
baldurk 6d3e08a285 Don't check for transient file's existence 2024-12-02 13:57:41 +00:00
baldurk 06bc5818c2 32-bit compile fix 2024-12-02 13:54:52 +00:00
baldurk 537a19f639 Verify callable shaders (assuming anyone ever uses them) 2024-12-02 13:54:45 +00:00
baldurk 8ed3ff4db3 Increase D3D12 text rendering ring size
* The RT overlay can use a lot of lines per frame
2024-12-02 13:39:28 +00:00
baldurk 9d3d253642 Don't encode PNG extended thumbnail by default 2024-12-02 13:39:28 +00:00
baldurk 9af1de5d35 Avoid O(N^2) cascade removing many AS builds at once 2024-12-02 13:39:28 +00:00
baldurk 4fa0532719 Use transient self-deleting file handles for AS cache
* This avoids the problem where an application exits so fast on shutdown that we
  don't have time to execute any cleanup functions to delete cached ASs.
* To avoid opening a huge number of file handles we also collate cached ASs into
  batched files
2024-12-02 13:39:28 +00:00
baldurk 097ac429f6 Don't process separate debug info during capture 2024-12-02 13:39:28 +00:00
baldurk e3a3a502bc Serialise AS initial contents before all others
* This will be important for replay-time reallocation, so their VAs can be
  remapped before any serialised descriptor heaps look them up.
2024-12-02 13:39:28 +00:00
baldurk aa242a5be7 Do disk caching on background thread 2024-12-02 13:39:28 +00:00
baldurk 514e0b0d78 Reduce time searching for suballocs 2024-12-02 13:39:28 +00:00
baldurk 1f2855a4ea Stringise D3D12_FEATURE 2024-12-02 13:39:28 +00:00
baldurk 6a75b73e1f Don't sync for each capture text overlay render 2024-12-02 13:39:28 +00:00
baldurk a19b7ea3c4 Use more efficient storage for forced references on D3D12 2024-12-02 13:39:27 +00:00
baldurk f6f4bc9558 Add stat tracking of GPU overhead during capture 2024-12-02 13:39:27 +00:00
baldurk 9bff5fe29f Disallow compaction entirely
* Although we intercept size queries to return the current size instead of
  compacted size, this size can still leak out if a compacted AS is used as the
  source of a subsequent update-build. Also in theory an application could just
  compact then query the current size (possibly for defrag? though you'd expect
  that size to be cached on the CPU from the original compact).
2024-12-02 13:39:27 +00:00
baldurk 3c3ff89e06 When auditing verify that known AS sizes are not exceeded 2024-12-02 13:39:27 +00:00
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