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.
* The spec says that you can only have one push constant range per stage, so
don't promote all push ranges to compute (as only one will be used in the
vertex shader).
Made the API filters inclusive, so that if any are checked, only the
selected ones are shown. If none are selected, then all tests are
shown as before. Moved the test name filter to the top pane, so that
it is always visible - before if you scrolled down in the test list,
it would be hidden. Added more room for test descriptions in the bottom
pane - long descriptions were previously truncated.
D3D11 may default to a different adapter than D3D12. For the sharing
test, both adapters must be D3D12 compatible. Tell D3D11 to use the
adapter that D3D12 is using to ensure compatibility.
Also fixed a memory leak in the test.
On laptops with integrated+discrete adapters, adapter 0 may not
support D3D12, so a default create device call will fail. Adapters
other than the 0th one need to be specified explicitly.
* It's required for replay applications to call InitialiseReplay() before doing
any work, and to call ShutdownReplay() once they're finished.
* This lets us do more heavyweight shutdown work before global destructors are
being invoked and the RenderDoc instance is being destroyed.
* Anything that needs to be shut down during capture still has to happen in
RenderDoc::~RenderDoc since we obviously can't get the application to call a
shutdown function in that situation.
* This fixes the case where no context is current on the thread starting and
ending the frame capture, but also all existing contexts are current on other
threads and can't be temporarily used.
* This struct might be passed without the parent bufferDeviceAddress feature
being enabled, e.g. if capture replay wasn't supported and we claimed no
support, or if there's really no support. We can't unconditionally enable
capture replay like we can with the extension structs (which are only passed
if the extension is available, and we only allow it to be available if the
feature is available).
Constant buffers store some additional state when parsed from DXBC
to make it easier to fix the match and know the correct size. The
debug trace still stores a simple array of CBuffers, but the shader
debug code provides a BindingSlot and uses the ShaderBindpointMapping
to find the logical identifier that shader instructions will use to
reference the constant buffer.
* The actual offsets will be overridden when client side buffers are used -
these marker values are left-over from client side buffers being present when
preparing a VAO's initial contents.