Commit Graph
756 Commits
Author SHA1 Message Date
baldurk 26cf7d3d7f Ensure shader reflection information is stored as const
* Avoids accidental modifications
2025-09-22 11:58:56 +01:00
baldurk 1e0f960635 Don't allow implicit scalar to vector casts in Vec helpers
* With all default parameters in the constructor `Vec4f foo = 1.0f` would be
  legal by implicit constructor.
2025-09-19 14:13:01 +01:00
baldurk 858cfab281 Improve positioning for pixel context highlight for NPOT textures 2025-09-19 14:13:01 +01:00
baldurk c25161a759 Allow aliasing between different descriptor types silently
* Also make the error about duplicate keys less severe - this can happen in
  practice as different views boil down to the same descriptor bytes and
  applications don't use only one view.
2025-09-08 16:35:41 +01:00
Jake Turner 7b404168eb trie test: keys with common prefixes, added in all possible orders 2025-09-08 08:15:23 +01:00
baldurk 283432a5dd Add test of trie key that is pure prefix of unique previous key
* We already test this later when the prefix is in an already split node.
2025-09-03 09:37:08 +01:00
Hans-Kristian Arntzen c800a59159 Fix bad merge for aliased descriptors. 2025-09-01 01:46:51 +09:00
baldurk dbeeb67459 Display a specific message for resources with no usage tracked
* Currently we only track usage for buffers and textures.
2025-07-31 17:10:14 +01:00
baldurk 799a9a8452 Report and display descriptor buffer state in pipeline view 2025-07-30 22:10:25 +01:00
baldurk ceb062b658 Add a DescriptorType to GetDescriptors query
* This will be optional in many cases but for some situations might be required
  when type information is not implicitly available in the descriptor store.
  Generally it should always be available unless the descriptor store is being
  viewed 'blank' purely from its contents with no other context.
2025-07-30 22:10:23 +01:00
baldurk a7378e525e Merge descriptor ranges correctly in GetDescriptors calls 2025-07-29 21:43:31 +01:00
baldurk 279379c3be Fix potential trample in trie re-using leaf 2025-07-10 17:52:30 +01:00
baldurk 0293487eb8 Properly handle D3D11 constant buffers with a 0 range specified 2025-07-04 14:10:51 +01:00
baldurk 6be083f66a Display space and register for root parameters in root signature viewer 2025-06-30 11:06:13 +01:00
baldurk 81d5ca7c35 Add a trie lookup handler from a byte sequence key
* This is intended for write-only so does not support removing keys at all.
2025-06-06 12:16:54 +01:00
Tristan Ritchie 2eade4650b Add support for VK_KHR_maintenance5 2025-03-19 15:43:08 +00:00
baldurk 2322e165de Update copyright years to 2025 2025-03-14 18:54:37 +00:00
baldurk 78d67d334a Fix out of bounds destruction in rdcarray insert
* Update unit tests to catch this case (ideally/practically).
2025-03-04 11:33:43 +00:00
baldurk 31d29fcea1 Add python function to clear replay cache 2025-02-21 14:19:12 +00:00
baldurk 3c5ce8a84a Remove unused API function
* Headless windows are used as immutable in tests so allowing resizing is
  unnecessary complication
2025-01-13 11:09:10 +00:00
baldurk cd84566b1c Fix case where PreprocessLineDirectives could eat preamble before #line
* This would happen if a #line referenced the file it was already in - we would
  only start outputting lines starting from the first one. Normally in this case
  there's a #line before any text, but that's not guaranteed.
2025-01-10 15:51:26 +00:00
Honeybunch 3ea9735866 Mesh Shader Debugging 2024-11-20 10:50:14 +00:00
Shahbaz Youssefi 76b6d47f9c Support VK_KHR_dynamic_rendering_local_read
Fixes #3341
2024-11-04 16:58:03 +00:00
Aras Pranckevicius 8917bc5416 Refactor: rename dds_data -> tex_data
And move it out into a tex_data.h header. This is in preparation
for getting mipmaps out of EXR files, where read_dds_data for
that would be a bit confusing.
2024-11-04 15:52:30 +00:00
Jake Turner 84c7906a7a DXIL Debugger support for DXOps: IsNan, IsInf, IsFinite, IsNormal 2024-10-24 16:24:41 +01:00
baldurk 5d0a85e8ca Allow 'expected errors' in tests for RDResult returns
* This fixes the issue that tests of out-of-bounds and error behaviour trigger
  debugbreaks. We don't apply this to RDCERR (currently) as it would generate
  more code overall and it's easier to convert any new deliberate test errors.
2024-10-04 10:31:12 +01:00
Jake Turner 66a43b3d45 Moved var_dispatch_helpers.h to replay/common folder
To enable sharing ShaderVariable helpers for the SPIRV and DXIL Shader Debuggers
2024-09-20 17:44:41 +01:00
Jake Turner 811ec2a5bd Do not crash in OpenCapture if m_RDC is NULL
The NULL case was being handled for setting the return code and then Error() was being called on a NULL m_RDC
2024-08-05 17:50:37 +01:00
Jake Turner a711d219d1 Serialise ShaderDebugInfo::entrySourceName Closes #3353
Required to get the correct entry point when working with remote captures
2024-06-12 15:22:56 +01:00
Jasmine HansenandJames Sumihiro 0dcd19c43d Add support for binding shader object state in replay.
Co-authored-by: James Sumihiro <james.sumihiro@ntd.nintendo.com>
2024-05-22 11:30:20 +01:00
baldurk 0dfb8474c1 Re-use ray dispatch patching on replay 2024-04-30 18:28:33 +01:00
baldurk 7e7bbf58a8 Reflect multiple entry points & ray properties from DXIL shaders 2024-04-26 13:55:19 +01:00
baldurk 153cd2aa16 Expose queries for descriptor stores and D3D12 root signature range
* This will allow a UI viewer or consumer of the replay API to more easily query
  'all' descriptors for a given store.
2024-04-10 18:58:53 +01:00
baldurk 0284d551ea Switch from specific Attachment structs to using Descriptor for outputs 2024-04-10 18:58:52 +01:00
baldurk 6194d5a5a0 Rename resType to textureType in ShaderResource to be more accurate 2024-04-10 18:58:52 +01:00
baldurk 205ed0e6fa Remove old shader bindpoint mapping handling entirely 2024-04-10 18:58:52 +01:00
baldurk f00ab9dee8 Store descriptor type directly in shader resources for shader reflection 2024-04-10 18:58:51 +01:00
baldurk 292bb596dc Add GL input attribute dynamic binding information to pipe state 2024-04-10 18:58:51 +01:00
baldurk 2a41eb54dd Add new common pipeline state accessors for descriptor-based accesses
* These are temporarily given separate names, to allow them to exist in parallel
  with the existing helpers, but in future these will be renamed when the older
  helpers are removed.
2024-04-10 18:58:51 +01:00
baldurk bbbfb5f3d2 Add fixed bindpoint information to shader reflection data
* Previously this was provided by the ShaderBindpointMapping, but since we plan
  to remove that we add the information here. These will be purely for
  informational purposes and will not be used to look up bound resources etc.
  They exist for display only, or for API-specific interpretation if e.g. the
  bindpoint is known ahead of time it can be identified here without having to
  jump through hoops to get which descriptor a given bind accesses and get the
  register number for that descriptor.
* On OpenGL this information will not be present because bindings are mutable
  (even if they are declared in the shader). The only way to identify a
  particular binding by register will be with those hoops
2024-04-10 18:58:50 +01:00
baldurk d88aad8fc2 Add a query to determine logical identifiers for descriptors
* This is a consideration for any cases where binding numbers are relevant -
  primarily D3D11 and GL - where the offset into an arbitrary (and possibly
  fake) descriptor storage is not helpful but knowing the register binding
  definitely is.
* If someone wants to look at the raw descriptor contents without respect to a
  particular shader access they can use this query to determine a more useful
  'name' for any given descriptor. On D3D11 and GL this gives the register
  number, on Vulkan it gives the binding number (and array element). On D3D12 it
  just repeats the offset effectively.
2024-04-10 18:58:50 +01:00
baldurk b9787606ea Add reported descriptor access from vulkan and D3D12 bindless feedback 2024-04-10 16:31:17 +01:00
baldurk 1f803add1e Declare input attachments in shader reflection
* This avoids the need to communicate this information in the descriptor type.
  Since descriptors must match the shader in this area, it's easier to
  communicate this through shader reflection.
2024-04-10 16:22:42 +01:00
baldurk fa22c7c7fc Report vulkan dynamic offsets separately for manual application
* Baking these into descriptors when we get arbitrary 'GetDescriptor' queries
  independent of the bound descriptor sets is not possible - a descriptor set
  could be in theory bound twice to two places with different dynamic offsets.
* Instead we report these as part of the pipeline states and the abstraction &
  replay API consumer will need to manually apply them to get the true buffer
  offset.
* The offsets are indexed by descriptor storage byte offset for easier
  processing (the dynamic offset struct can be turned into a pair and used to
  initialise a dict)
2024-04-10 16:12:32 +01:00
baldurk 50091dcffc Generate baked per-pipeline static descriptor access on Vulkan 2024-04-10 15:57:48 +01:00
baldurk 58c3dc52a7 Add reporting of GL texture completeness and conflicts for descriptors 2024-04-10 15:51:10 +01:00
baldurk 227842a295 Add a structure and query for reporting descriptor accesses 2024-04-10 15:33:36 +01:00
baldurk c1d07f6bc3 Implement Get*Descriptor for virtual descriptor storage in D3D11 & GL 2024-04-10 15:24:03 +01:00
baldurk 7e359ee4ab Implement D3D12 descriptor fetching contents directly from heaps 2024-04-10 15:07:32 +01:00
baldurk b94e6ff90c Add a stubbed out query for pulling descriptor contents out of a store 2024-04-10 15:01:26 +01:00