util/format: Add an RGB planar format for YV12, like we have for NV12.
Turnip will use this for mapping the to the corresponding hardware format, and we could also extend mesa/st to avoid adding extra samplers for external image sampling of YV12 on freedreno. Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
This commit is contained in:
@@ -504,6 +504,7 @@ enum pipe_format {
|
||||
PIPE_FORMAT_XYUV,
|
||||
|
||||
PIPE_FORMAT_R8_G8B8_420_UNORM,
|
||||
PIPE_FORMAT_R8_G8_B8_420_UNORM,
|
||||
|
||||
PIPE_FORMAT_B8G8R8X8_SNORM,
|
||||
PIPE_FORMAT_B8G8R8X8_UINT,
|
||||
|
||||
@@ -397,9 +397,10 @@ PIPE_FORMAT_IYUV , planar3, 1, 1, 1, , , , , xy
|
||||
PIPE_FORMAT_NV12 , planar2, 1, 1, 1, , , , , xyzw, yuv
|
||||
PIPE_FORMAT_NV21 , planar2, 1, 1, 1, , , , , xyzw, yuv
|
||||
|
||||
# RGB version of NV12 for hardware that supports sampling from
|
||||
# RGB version of NV12 and YV12 for hardware that supports sampling from
|
||||
# multiplane textures but needs color-space conversion in the shader.
|
||||
PIPE_FORMAT_R8_G8B8_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_Y8_U8_V8_422_UNORM , planar3, 1, 1, 1, , , , , xyzw, yuv
|
||||
PIPE_FORMAT_Y8_U8V8_422_UNORM , planar2, 1, 1, 1, , , , , xyzw, yuv
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 8 and column 3.
|
@@ -109,6 +109,7 @@ def has_access(format):
|
||||
'y16_u16v16_422_unorm',
|
||||
'y16_u16_v16_444_unorm',
|
||||
'r8_g8b8_420_unorm',
|
||||
'r8_g8_b8_420_unorm',
|
||||
]
|
||||
if format.short_name() in noaccess_formats:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user