This adds some of the D3D12 pixel history framework, with creation
of resources that will be needed during pixel history, and a helper
function and shader to copy pixels from MSAA resources.
Fixes rare problem of current draw not displaying when switching from Stencil overlay to None overlay and the current draw uses the stencil buffer contents
* Worst case this is just as invalid as an application, if it uses a totally
bogus VA. However in D3D12 it is apparently valid to refer to VAs out of
bounds of any resource as long as it's within bounds of an underlying heap. To
handle this without serialising VAs as Heap+offset we instead just allow the
address lookup to run out of bounds and pick the next lowest buffer. If the
offset is greater than the buffer size then we're probably no worse than the
application.
In replay/entry_points.cpp RENDERDOC_RunFunctionalTests(..), it uses a simple char-replacement algorithm for finding the Python modules depending on the Python minor version.
Unfortunately that mechanism relies on there being only a single character to replace which doesn't work once we reach double figures.
* If we only garbage collect after a successful create, applications which
deliberately leak state objects and only free them when they see a failed
create will not have a change to garbage collect.
ie.
struct A {
vec3 m1;
vec3 m2;
vec3 m2;
};
uniform A a[1];
with a[0] being passed to a function.
Previously it would look for "a.m1", if that is not found then it looks for "a[0].m1" etc.
Include the discarded offset when indexing to get the post mod data per fragment
Do not include the discarded offset when indexing to get the primitive ID per fragment (primitive ID uses a replacement shader which is not affected by discards in the original shader)
Store the post mod depth data in slot 1 of the depth output to make the indexing simpler to keep track of discarded fragments
Set the post mod data for discarded fragments (excluding the final fragment) to be the known texture after (which starts as the pre mod data and is updated for non-discarded fragments).
Instead of GPUVendorFromPCIVendor() which returns Unknown for the llvm_pipe driver.
This then prevents being able to force replay to run on llvm_pipe when opening a capture.