Swizzle of 8-bit stencil format is defined as _x__ but the hw expects
BC_SWIZZLE_XYZW.
Fixes dEQP-VK.pipeline.monolithic.sampler.border_swizzle.*s8_uint*.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21482>
{
unsigned bc_swizzle = V_008F20_BC_SWIZZLE_XYZW;
+ if (desc->format == PIPE_FORMAT_S8_UINT) {
+ /* Swizzle of 8-bit stencil format is defined as _x__ but the hw expects XYZW. */
+ assert(desc->swizzle[1] == PIPE_SWIZZLE_X);
+ return bc_swizzle;
+ }
+
if (desc->swizzle[3] == PIPE_SWIZZLE_X) {
/* For the pre-defined border color values (white, opaque
* black, transparent black), the only thing that matters is