Commit Graph
944 Commits
Author SHA1 Message Date
baldurk 205b627dd4 Bump version to v1.34 2024-05-31 20:23:54 +01:00
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 25f7eff9a3 Add support for AS copies on D3D12
* Most of these - all but a clone - require us to wait for the GPU execution to
  finish to get the size of the resulting AS to update our tracking. We issue a
  fence from the queue at submission time and then leave the RT manager to check
  for updates on each submission to get the latest information.
2024-05-09 15:00:30 +01:00
baldurk f076105548 Add missing docstrings for ShaderStageMask 2024-04-26 14:43:31 +01:00
baldurk 7e7bbf58a8 Reflect multiple entry points & ray properties from DXIL shaders 2024-04-26 13:55:19 +01:00
baldurk 89bea3ea8b Add new shader enums for RT shader stages 2024-04-26 13:55:18 +01:00
baldurk bdc06af0de Add reflection of acceleration structures in DXIL & new descriptor type 2024-04-19 10:04:26 +01:00
baldurk 334611fa88 Fix some docstring errors 2024-04-10 21:49:18 +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 acc533ec60 Update Vulkan pipeline state viewer to use new descriptor access 2024-04-10 18:58:52 +01:00
baldurk e08107ebe8 Update D3D11 pipeline state viewer to use new descriptor access 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 2bbe1a8cd9 Update shader viewer and debugging with new reporting for shader binds
* This shifts from reporting from the old style bindset/bind to the new system
  of only referencing by shader interface and index (independent of binding
  model).
* The vulkan shader debugger re-uses the replay interface to cache descriptor
  access and descriptor contents in a fashion friendly to interface-index
  lookup.
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 ff821b25c8 Create fake descriptor storage objects for GL and D3D11 2024-04-10 15:17:38 +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
baldurk 7ef216ad35 Add common descriptor type for all APIs
* Separated into normal descriptors and sampler descriptors, since they are
  almost equal in size so there's no need to inflate the descriptor size for
  non-sampler descriptors which are much rarer.
2024-04-10 14:55:32 +01:00
baldurk cc52e31657 Add overload to search array with a different type without casting
* Provided a compatible operator== overload exists, this can still be used to
  search the array.
2024-04-10 14:47:52 +01:00
baldurk 314415be57 Bump version to v1.33 2024-04-05 16:08:48 +01:00
Jake Turner 7934d1d16e Change DebugPixel() to take a DebugShaderInputs struct
DebugShaderInputs struct contains existing the parameters:

sample
primitive

and a new parameter

view

Default constructor for DebugShaderInputs sets the parameters to NoPreference (~0U).
2024-03-13 07:58:48 +00:00
baldurk b9fd432d11 Report and handle source-level entry point name from exported name
* The compiler could compile an entry point "foo" into an export "bar". We use
  the exported name in most places as that's guaranteed to be unique by the API
  and used for cross-referencing, but when recompiling we pass the original
  source name as in the debug info.
2024-03-05 11:38:19 +00:00
baldurk 3e2340fe16 Add identified support for slang (the language and the tool) 2024-03-01 12:11:37 +00:00
Amit Prakashandbaldurk 6254393bdf Add serialisation & replay of Acceleration structure build calls
* Add patching of BLAS address in TLAS
* Add a compute shader to patch the BLAS address
* Adds a pipeline, and root signature for patching the BLAS
2024-03-01 12:11:37 +00:00
Cam MannettandBaldur Karlsson fa70f8fa87 Ray Query API interception and serialisation
Ignoring acceleration structure host-build for now, and by extension deferred operation handle functions are pass-though (i.e. ignored on replay).
2024-02-27 11:15:01 +00:00
Jake Turner 226bf7071b Add ShaderBuiltin::MultiViewIndex
Mapped to:
SPIR-V ViewIndex (which was previously mapped to ShaderBuiltin::ViewportIndex)
GL gl_ViewIndex
2024-02-14 11:10:15 +00:00
Jake Turner a62634717e Vulkan BDA debugging force m_BufferAddresses to be sorted
The implementation usage of m_BufferAddresses assumes the container is sorted and requires the use of lower_bound() API

Added rdcsortedflatmap subclass of rdcflatmap
Only expose upper_bound(), lower_bound() APIs in rdcsortedflatmap
The upper/lower bound APIs require a sorted container
2024-02-13 17:03:42 +00:00
baldurk 9f4f0e6aa1 Update copyright years to 2024 2024-02-12 11:04:52 +00:00
baldurk 8d065f389e Bump version to v1.32 2024-01-29 12:34:17 +00:00
baldurk 6fdea16fd1 Propagate subgroup size properly when recreating graphics pipelines
* Also add an additional indicator in the pipeline state view.
2024-01-10 13:59:29 +00:00
Dan HawsonandBaldur Karlsson 442b48bb77 Mesh exploder
New 'Exploded' visualisation mode in BufferViewer with new exploder controls
hidden when not in 'Exploded' mode.

Change 'solidShading' and 'solidShadeMode' to 'visualisation' and
'visualisationMode'.

Hide the 'highlightVerts' widget when using 'Exploded' vis for both
real-estate and practical implementation reasons.
2023-12-09 11:40:30 +00:00
baldurk 4bccf2dac3 For indirect mesh shaders fetch up-to-date dispatch arguments
* This doesn't work for whole-pass mesh fetch, but and will cause
  inconsistencies between single draws due to non-determinism, but should avoid
  crashes.
2023-12-07 12:18:43 +00:00
Jake Turner 6ce881d5da UI and Config support for dec/hex display option for Offsets or Sizes
Used when fields are marked as being an Offset or Size
Include simple latch to trigger a UI refresh when closing the settings dialog.
Currently only connected to if the Offset/Size format option is altered
2023-12-06 17:19:05 +00:00
baldurk 9057f0d2a2 Bump version to v1.31 2023-12-04 17:19:46 +00:00
baldurk 98dd806298 Remove duplicate docstring 2023-11-17 01:59:18 +00:00
baldurk 3976bba298 Add missing documentation strings 2023-11-17 01:43:19 +00:00
baldurk b0c97182f6 Implement baseline mesh shader on D3D12 2023-11-16 18:20:24 +00:00