* The ShaderDebugTrace now only sets up the initial state of an opaque
ShaderDebugger handle.
* This handle can then be passed to a new function - ContinueDebug - to
iteratively return N more states. The number of states is implementation
defined and may be a fixed number or it may run for a fixed time.
* The states themselves no longer contain a complete snapshot of all variables,
but instead only the changed variables for that iteration. The changes are
stored as before and after value to make it easier to step forwards and
backwards (only the ShaderDebugState is needed to move forward or backwards,
you don't have to search back for the last set value of a variable to 'undo' a
change).
* This means the quad doesn't have a trace per thread. All per-thread data is in
the State itself, and anything that's not per-thread is in the GlobalState.
* The shader viewer shouldn't handle specifics of D3D bytecode, instead it now
works generally with whatever the debug and source variables are.
* VarType::Unknown is used for D3D registers which are typeless.
* cbuffer and input registers no longer have any names elided into them, they
are 'raw' registers. The source mapping provides the information of where they
come from as best as possible.
* Since we're now using source-mapping for constants, fix some source mapping
issues with arrays, nested structs/arrays, and matrix major-ness.
* Moving away from 'registers' explicitly being stored, we now have a single
variable array where the shader representation is responsible for allocating
it.
* In DXBC we calculate the number of each type of mutable variable (temps,
indexable temps, and outputs) and assign slots linearly.
* We also update some naming - high-level variables aren't "locals" since they
could be globals too, and debugging variables aren't "registers" but simply
the variables we use for debugging which may be more complex than float4 for
other APIs.
* The local variable matching by string name is unnecessary for this change
but will be more useful in future after further refactors where there isn't
a single list of variables to index into at the upper level.
* This avoids having the UI need to do a scan and expecting to find
"instruction:" on the start of a line.
* We also move the callstack to be stored per-step, and not in the line info
mapping.
This mimics the D3D11 shader debugging test, but performs the draws
twice - once with SM 5.0 and once with SM 5.1. The python test performs
the same checks as the D3D11 version, but is explicitly disabled since
D3D12 shader debugging is not yet enabled by default.
* This cannot be replayed, as the memory type selected will be invalid on replay
for the buffer. However this lets us at least capture and if the buffer is
destroyed or not used in the capture, the capture would succeed, so it's at
least no worse.
* This is kind of what VK_Parameter_Zoo is intended to test, but I don't want to
add conditional extension tests in there unless there's nowhere else to put
it, since it adds mental overhead to reading the code.
* We need to make sure we can still look up GPU addresses for buffers that were
destroyed during the frame, otherwise we might get the wrong contents for
descriptors.