gallium/st: add non-CSC lowering of YV12 as PIPE_FORMAT_R8_B8_G8_420

YV12 is the same as DRM_FORMAT_YVU420.
We lower it to PIPE_FORMAT_R8_B8_G8_420, which is equivalent to
PIPE_FORMAT_R8_G8_B8_420 with U/V planes swapped.

This is used for hardware that can sample from YUV but need CSC in shader.

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-21 00:31:48 +00:00
committed by Marge Bot
parent 60ebef430a
commit b890a5ff61
9 changed files with 49 additions and 13 deletions
+1
View File
@@ -115,6 +115,7 @@ def has_access(format):
'r8_g8b8_420_unorm',
'g8_b8r8_420_unorm',
'r8_g8_b8_420_unorm',
'r8_b8_g8_420_unorm',
'g8_b8_r8_420_unorm',
'r8_g8_b8_unorm',
'y8_unorm',