Renderdoc doesn't support TiledResource, as WrappedID3D12Device::CreateReservedResource returns E_NOINTERFACE. This commit reflects the lack of support in WrappedID3D12Device::CheckFeatureSupport.
This allows the application to behave as if the gpu doesn't support
tiled resources.
- Refactor to use common funcs
- Add per fragment depth data
- Rename pixelhistory.frag to pixelhistory_primid.frag
- Fix how some per fragment pipelines are created
For per fragment data we create 3 pipelines
1) Post modification pipeline
changes the stencil state and scissors around the target pixel
2) Shader output pipeline
in addition to above, disables rasterization discard, depth bounds test,
culling and turns off blending
3) Primitive ID pipe
in addition to above, disables depth test and depth write, and changes
the fragment shader to only output primitive ID
* Using a 32-bit integer, signed, gives only 2 billion chunks before it wraps.
With Vulkan/D3D12 creating new chunks even while in the background for
recording commands this is feasible to hit.
* Instead of reserving maxDrawCount number of draws then deleting the ones we
don't have, reserve only one and then duplicate it to patch up as needed. This
makes things much better in the case where maxDrawCount is significantly
higher than the actual draw count (when maxDrawCount is close to the real draw
count, this makes little difference).
When capture is triggered, calls to vkQueueSubmit attempt to flush all
coherent mapped memory. This causes a problem in some cases if
application calls vkUnmapMemory on the memory that is being flushed.
The goal is to only allow vkUnmapMemory to proceed if that memory is not
currently being flushed, and is in one of the records in the copy that
vkQueueSubmit made of m_CoherentMaps.
* This allows persistent config storage and registering tweak variables that
works independent of the UI's configuration.
* Config vars can be debug only, which means they will be compiled out in stable
version releases. This allows for debug-logging tweaks that are available in
all builds (including nightly builds) for diagnostic purposes, but have zero
overhead in stable releases.
* Variables have a loose hierarchy defined with _ or . to separate nodes.