Skip to content

d3d12: stencil resolve

Erik Faye-Lund requested to merge d3d12-stencil_resolve into msclc-d3d12

We can't really resolve stencil buffers using the D3D12 resolve API, as that's not supported. So this MR implements a custom resolve-path where we use util_blitter to a temporary R8_UINT-texture that we copy into the stencil-plane of the texture.

The last patch is the juicy one.

The reason why I don't reuse the existing CopyTextureRegion-infrastructure, is that it doesn't deal correctly with blitting stencil into depth-stencil, and it's not obvious to me how to fix that. I'd like to fix that at some point later, but for now this seems to get us to the OpenGL 3.3 CTS tests passing for this on NVIDIA (once a certain driver-bug has been fixed).

This also contains !289 (merged), so if we land that first, we need to rebase. But we can also land it as part of this one, as long as it gets reviewed.

Merge request reports