* 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.
Output "ViewIndex" into the pixel shader hits array
Select the pixel shader input which matches the viewIndex to the passed in view
Ignore the view parameter if set to ~0U (rd.ReplayController.NoPreference)
Ignore the view parameter if any subpass has empty multiviews
DebugShaderInputs struct contains existing the parameters:
sample
primitive
and a new parameter
view
Default constructor for DebugShaderInputs sets the parameters to NoPreference (~0U).
* The enums are given after compute, to preserve indices for the normal vertex
pipeline.
* Mesh dispatches are considered a new action type, rather than being bundled
into the `Drawcall` type. This will allow them to be distinguished by API
backends as needed. The UI treats them as drawcalls
* We apply this universally even though it's not relevant to D3D11/GL. It means
a couple of empty array entries but it should not cause any significant
issues.
* Shader messages will be identified by group and thread as with compute
shaders. For mesh shaders there is an additional subdivision to identify them
by task group, since each task group can submit a grid of mesh groups.
* This is only relevant when using a custom shader since otherwise nothing is
'updated', though could also affect overlays potentially. If we don't then the
custom shader texture may not have been re-rendered before we fetch the
histogram data and we'll get stale information.
* This distinction unfortunately does not exist in SPIR-V so we have to carry
around this metadata ourselves. Rather than allowing free specification of
tools based on API, instead pretend that Vulkan and GL SPIR-V are separate
format, and duplicate all SPIR-V tools to handle "both" types. This allows
appropriate tool selection based on the encoding.
* Previously we iterated over each bind, and found the matching resources. Now
we iterate over resources and find the matching bind. This matters when there
are multiple overlapping binds so they are only found once (we don't
disambguate which bind was used, as we don't elsewhere currently)
* There seems to be a significant slowdown when using real swapchains, both for
creation and display. Since thumbnails don't update often (only on event
change, or if the panel is resized which is not a regular occurence)
counterintuitively it's better to render and readback the image offscreen and
re-upload it on the CPU.
* We store the compiler used (when known) in shader debug info and use that to
select the compiler for editing as even higher priority than the default for a
given language/encoding combination.
* We also ensure that for known tools we add the input and output parameters
last, after any custom parameters, so that they are always present regardless
of what the user puts in.
* Most of the main entry points that can fail with relevant reasons now has a
way of specifying a message to return with it. This message can be displayed
to the user to give more information or context about an error.
* Newly written shaders and any updated shaders can now use pre-defined macros
to abstract away binding differences between APIs, so custom shaders will be
more portable in particular shaders written in HLSL for D3D or GLSL on OpenGL
won't break on vulkan because they refer to incorrect binds.
* We need to update the scrollbar bounds first based on the current zoom level,
then change the scroll position. Otherwise the scroll will be visually correct
but the scrollbars won't match.
* There's not a good accepted terminology for this kind of event, and for
historical reasons 'drawcall' has been the accepted term, even though
that can be quite confusing when a dispatch or a copy is a 'drawcall'.
* This is particularly highlighted by the event browser filters where
$draw() includes draws and dispatches, but $dispatch() only includes
dispatches, it's hard to intuitively understand why $draw() matches all
of these calls.
* As a result we've defined the term 'action' to cover these types of
events in the same way that we defined 'event' in the first place to
mean a single atomic API call.
* This is a minor optimisation when there are large numbers of bound resources
that are available (duplicated) to all shader stages. There's no point
fetching them when there's no shader bound there.
* This is a holdover from simpler binding times, these days it makes more sense
to omit buffers than try to hold onto those bindings even when they don't
contain textures.
* These map more naturally to python tuples and are easier to wrap in and out.
* We also tidy up the FloatVecVal etc and standardise the members of
ShaderValue.