* This doesn't test every edge case, but it is a simple smoke test that ensures
any format can at least get consistent accurate results out.
* Further work is needed to test the different failures, overdraws, primitive
IDs, and all the other specific checks in the history.
SV_PrimitiveID is only valid as a pixel shader input if there's either
no geometry shader, or the geometry shader emits SV_PrimitiveID. With
D3D11, the debug layer will complain but rendering will proceed. With
D3D12, the PSO fails to compile. For both APIs, pixel shader debugging
now checks whether this is true, and disables its usage if it isn't.
Added tests for various valid scenarios with SV_PrimitiveID.
* It's not particularly scalable and can be brittle to driver changes, and we
can use targeted specific pixel tests to check what we really want - to see if
the output has rendered correctly.
* Overlay tests still check files directly - this is a future refactor to
remove.
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.
* On some GPUs the stencil output comes in all channels, not just green, and
it's unclear if this is legal or not. To be safe just mask out the green we
expect.
* On all APIs structs are aligned up to 16-byte alignment, and on D3D as with
arrays then elements coming after the struct can be packed into the padding
after the last struct element.
* These tests ensure that texture rendering works correctly for all different
types of texture types, and for all formats, across different APIs, including
across a remote-proxy connection.
* We assume that fxc won't output a denormalised float in the bytecode, and this
prevents us from flushing integer inputs to otherwise flushable float-type
operations
* Visual assist comes with a pre-defined interpretation of TEST() for
googletest, which conflicts with ours. We can't seem to override it with a
va_stdafx.h even
* If a buffer has been marked as dirty mid-frame but wasn't dirty at the start
of the frame then it won't have initial contents. We have to treat it as if it
wasn't dirty and fall back to using our existing data for it, assuming that is
a valid way to pre-populate the map's shadow buffer.
* This is better than testing by platform/platform version, because we can check
specifically for extensions and avoid running a test we know will fail because
extensions aren't supported.