gallium/util: add shader for stencil-blits
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 9 Sep 2020 13:07:00 +0000 (15:07 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 23 Sep 2020 06:48:50 +0000 (06:48 +0000)
commit2970d388a2a956b6c2571dccc2612d71aa666612
treecaea66464253fb9cceefe49d8c08098c0de518a0
parent924e27647e47d51111bca12bce470aba4fd85e37
gallium/util: add shader for stencil-blits

This shader is useful to replicate single bit from a stencil buffer even
when there's no support for PIPE_CAP_SHADER_STENCIL_EXPORT.

This is useful for the D3D12 driver, where the graphics pipeline is the
only way of writing to MSAA stencil-buffers, and not all drivers support
exporting the stencil-value from the shader.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6681>
src/gallium/auxiliary/util/u_simple_shaders.c
src/gallium/auxiliary/util/u_simple_shaders.h