gallium/st: add non-CSC lowering of I420 as PIPE_FORMAT_R8_G8_B8_420

This new format is similar to PIPE_FORMAT_G8_B8_R8_420, but with R as Y, G as U
and B as V. The need for two diferent formats here is because gallium maps the
YUV channels differently from vulkan.

Some hardware, e.g. Mali GPUs, can sample from I420 but need CSC in shader,
this patch implements that.

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:27:48 +00:00
committed by Marge Bot
parent 06495f11da
commit 60ebef430a
9 changed files with 65 additions and 2 deletions
+1
View File
@@ -114,6 +114,7 @@ def has_access(format):
'y16_u16_v16_444_unorm',
'r8_g8b8_420_unorm',
'g8_b8r8_420_unorm',
'r8_g8_b8_420_unorm',
'g8_b8_r8_420_unorm',
'r8_g8_b8_unorm',
'y8_unorm',