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.
* 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.
* 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.
* 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.
* 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
* 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.
* 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.
* 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)
* 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.