gallium/st: lower NV21 to R8_B8G8 instead of G8_B8R8

When NV21 lowering with hardware sampling and shader CSC was added, the
incorrect PIPE_FORMAT_G8_B8R8_UNORM was used. That format is supposed to
represent vulkan NV12 instead.

This commit introduces PIPE_FORMAT_R8_B8G8_UNORM, which correctly describes the
gallium mapping for YUV CSC, with R as Y, instead of G as Y.

Fixes: 26e3be513d ("gallium/st: add support for PIPE_FORMAT_NV21 and PIPE_FORMAT_G8_B8R8_420")
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24266>
This commit is contained in:
Italo Nicola
2023-07-10 23:09:44 +00:00
committed by Marge Bot
parent 4eb0a98e5a
commit 2dc883eb37
10 changed files with 19 additions and 18 deletions
+1
View File
@@ -113,6 +113,7 @@ def has_access(format):
'y16_u16v16_422_unorm',
'y16_u16_v16_444_unorm',
'r8_g8b8_420_unorm',
'r8_b8g8_420_unorm',
'g8_b8r8_420_unorm',
'r8_g8_b8_420_unorm',
'r8_b8_g8_420_unorm',