- Separate the pixel history copy pixel shader into two separate
shaders, one for colour copy and one for depth
- Allocate and update descriptor sets on demand
- Add another compute shader for pixel history depth copy
Add support for requesting pixel history for depth/stencil images.
Also, adjust which index is used to patch primitive ID and fixed
fragment color shaders. Before it was using the index of the target
image in the framebuffer attachments. But it should be the index of the
corresponding color attachment.
Add support for other depth/stencil formats (other than D32_SFLOAT).
Remember the depth/stencil attachment format to correctly update the
values.
- For counting the number of fragments, also need to disable the depth
bounds test, since we are not initializing the depth value currently
- Reset depth to 0.0f for shader out, and set it to always pass. So that
we can get depth values from just one fragment.
- Initialize premod value for individual fragment events. This is not
surfaced in the UI, but available from the python API and checked in
tests.
* This also fixes a case where pipelines with dynamic stencil masks wouldn't
have the masks properly set for stencil counting and we wouldn't get shader
output properly.
Use a separate compute shader module for MSAA copy, and output
directly into the destination buffer instead of creating
staging resources.
Support case where there is no depth stencil attachment to get post mod
values in per fragment reporting. Previously used the original
framebuffer that might not have had depth/stencil view, so couldn't
count the fragments. Now use the sub image.
To get the post mod color, we need to blend with the premod color, so
we use vkCmdCopyImage to copy from the original image.
Colour only, depth/stencil copy not supported.
This means that we only report pre-mod and post-mod colour values for
events. Since stencil copy is not supported, number of fragments is
not reported, and shader output is not queried.
Also:
- support for choosing mip level and slice
- tests for secondary command buffers
- adds a callback around vkCmdExecuteCommands
- refactors pixel history occlusion callback into its own
callback. Allows processing fewer events later on, and getting colour
information separately.
- keep track of subpassContents for vkCmdBeginRenderPass (inline or
secondary)
+ a small pixel history fix for figuring out if depth test failed
- the test demo is based on overlay demo, with a few modifications so
far: added a draw that will fail on culling, added shader discard for
any pixel with x = 150
- tests some basic failed tests: stencil, depth, culling, shader discard
* This is a very big blunt hammer for fixing the problem of multithreaded
submission from GL. Every GL call checks to see if the context changed (which
would only happen from a thread switch to a different context) and if detected
it inserts a manual MakeCurrent call equivalent.
* It's slow to capture (when this happens - checking is not particularly slow)
and slow to replay, but it's functional which is an improvement.
* 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.
When getting read only resources from the pipe state, stitch back up
according to the bindpoint mappings. When displaying resources in UI,
don't traverse unbounded arrays. Fix resource swizzle on load/sample/
gather instructions, which happens on fetch result, not on the source
operand. Added more tests for unbounded arrays and different ways to
index into arrays.
The assignment of logical identifiers is not guaranteed to match the
order of appearance in the shader bytecode. Adjusted D3D12_CBuffer_Zoo
to exercise this for testing.
* 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.