v3dv: fix color border clamping with specific formats
authorIago Toral Quiroga <itoral@igalia.com>
Fri, 3 Jul 2020 08:06:28 +0000 (10:06 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Oct 2020 21:21:31 +0000 (21:21 +0000)
commit3bd02a729a63513cd8f44e766b47ef4ddbc08c20
treea2e925ffc4883163ac44a66a05b08d789bc22059
parentf156c5dc4d60464722fe6f1a589b0061b47a2d47
v3dv: fix color border clamping with specific formats

For some reason, CTS expects E5B9G9R9 and B10G11R11 with
transparent black border clamping produce alpha 1 instead of 0.

Since border color takes precedence over the texture state swizzle,
the only way to fix this is to lower the texture swizzle in the shader
to set alpha to 1.

Fixes:
dEQP-VK.pipeline.sampler.view_type.*b10g11r11*clamp_to_border_transparent_black
dEQP-VK.pipeline.sampler.view_type.*e5b9g9r9*.clamp_to_border_transparent_black

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
src/broadcom/vulkan/v3dv_cmd_buffer.c
src/broadcom/vulkan/v3dv_device.c
src/broadcom/vulkan/v3dv_private.h