diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h index fd3cf5b3236..b39695a6198 100644 --- a/src/gallium/include/pipe/p_format.h +++ b/src/gallium/include/pipe/p_format.h @@ -488,6 +488,8 @@ enum pipe_format { PIPE_FORMAT_AYUV, PIPE_FORMAT_XYUV, + PIPE_FORMAT_R8_G8B8_420_UNORM, + PIPE_FORMAT_COUNT }; diff --git a/src/util/format/u_format.csv b/src/util/format/u_format.csv index 3ed5bb8aaaa..3209b42e1c3 100644 --- a/src/util/format/u_format.csv +++ b/src/util/format/u_format.csv @@ -386,6 +386,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 +# 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_Y8_U8_V8_422_UNORM , planar3, 1, 1, 1, , , , , xyzw, yuv PIPE_FORMAT_Y8_U8V8_422_UNORM , planar2, 1, 1, 1, , , , , xyzw, yuv PIPE_FORMAT_Y8_U8_V8_444_UNORM , planar3, 1, 1, 1, , , , , xyzw, yuv diff --git a/src/util/format/u_format_table.py b/src/util/format/u_format_table.py index e3bbe1d27e6..fa681b716f8 100644 --- a/src/util/format/u_format_table.py +++ b/src/util/format/u_format_table.py @@ -104,6 +104,7 @@ def has_access(format): 'y16_u16_v16_422_unorm', 'y16_u16v16_422_unorm', 'y16_u16_v16_444_unorm', + 'r8_g8b8_420_unorm', ] if format.short_name() in noaccess_formats: return False