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:
@@ -408,6 +408,7 @@ PIPE_FORMAT_Y8_400_UNORM , other , 1, 1, 1, un8, , , , x0
|
||||
PIPE_FORMAT_R8_G8B8_420_UNORM , planar2, 1, 1, 1, un8, , , , xyzw, rgb
|
||||
PIPE_FORMAT_G8_B8R8_420_UNORM , planar2, 1, 1, 1, un8, , , , xyzw, rgb
|
||||
PIPE_FORMAT_R8_G8_B8_420_UNORM , planar3, 1, 1, 1, un8, , , , xyzw, rgb
|
||||
PIPE_FORMAT_R8_B8_G8_420_UNORM , planar3, 1, 1, 1, un8, , , , xyzw, rgb
|
||||
PIPE_FORMAT_G8_B8_R8_420_UNORM , planar3, 1, 1, 1, un8, , , , xyzw, rgb
|
||||
PIPE_FORMAT_R8_G8_B8_UNORM , planar3, 1, 1, 1, un8, , , , xyzw, rgb
|
||||
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 8 and column 3.
|
@@ -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',
|
||||
|
||||
@@ -513,6 +513,7 @@ enum pipe_format {
|
||||
PIPE_FORMAT_R8_G8B8_420_UNORM,
|
||||
PIPE_FORMAT_G8_B8R8_420_UNORM,
|
||||
PIPE_FORMAT_R8_G8_B8_420_UNORM,
|
||||
PIPE_FORMAT_R8_B8_G8_420_UNORM,
|
||||
PIPE_FORMAT_G8_B8_R8_420_UNORM,
|
||||
PIPE_FORMAT_R8_G8_B8_UNORM,
|
||||
PIPE_FORMAT_Y8_UNORM,
|
||||
|
||||
Reference in New Issue
Block a user