Skip to content

d3d12: fix for upside-down multisample stencil blit

Mesa's d3d12 implementation performs multisample stencil blit using a stencil_resolve_fs fragment shader. Non-multisample stencil blit operations are handled using by drawing a rectangle with y-coordinates flipped (when necessary) using a vertex shader. This technique does not work for multisample stencil blit since the pixel shader ignores u/v coordinates and uses the target pixel coordinate to select the source texel coordinate.

The fix is to split the fragment shader into stencil_resolve_fs and stencil_resolve_fs_no_flip, predicated by the height of the source rectangle being negative.

Edited by Bill Kristiansen

Merge request reports