summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorJulien Isorce <j.isorce@samsung.com>2015-11-06 09:45:19 +0000
committerJulien Isorce <j.isorce@samsung.com>2015-11-06 17:33:38 +0000
commit42a5e143a8d58a0ad15dd5747449eb4b57c87177 (patch)
tree33e2bc5653781c00f0cbe5a7b14320b6bde1b6f1 /src/gallium/auxiliary
parentbf6acbb2db4baaf18ae5a139142acf06e84d1b9c (diff)
downloadexternal_mesa3d-42a5e143a8d58a0ad15dd5747449eb4b57c87177.zip
external_mesa3d-42a5e143a8d58a0ad15dd5747449eb4b57c87177.tar.gz
external_mesa3d-42a5e143a8d58a0ad15dd5747449eb4b57c87177.tar.bz2
vl/buffers: add RGBX and BGRX to the supported formats
Useful is one wants to create RGBX or BGRX surfaces. The infrastructure is such that it required just a few definitions to support these formats. Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Christian K<C3><B6>nig <christian.koenig@amd.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/vl/vl_video_buffer.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c
index 5e0ae0e..6cd2557 100644
--- a/src/gallium/auxiliary/vl/vl_video_buffer.c
+++ b/src/gallium/auxiliary/vl/vl_video_buffer.c
@@ -62,6 +62,18 @@ const enum pipe_format const_resource_formats_VUYA[3] = {
PIPE_FORMAT_NONE
};
+const enum pipe_format const_resource_formats_YUVX[3] = {
+ PIPE_FORMAT_R8G8B8X8_UNORM,
+ PIPE_FORMAT_NONE,
+ PIPE_FORMAT_NONE
+};
+
+const enum pipe_format const_resource_formats_VUYX[3] = {
+ PIPE_FORMAT_B8G8R8X8_UNORM,
+ PIPE_FORMAT_NONE,
+ PIPE_FORMAT_NONE
+};
+
const enum pipe_format const_resource_formats_YUYV[3] = {
PIPE_FORMAT_R8G8_R8B8_UNORM,
PIPE_FORMAT_NONE,
@@ -102,6 +114,12 @@ vl_video_buffer_formats(struct pipe_screen *screen, enum pipe_format format)
case PIPE_FORMAT_B8G8R8A8_UNORM:
return const_resource_formats_VUYA;
+ case PIPE_FORMAT_R8G8B8X8_UNORM:
+ return const_resource_formats_VUYX;
+
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
+ return const_resource_formats_VUYX;
+
case PIPE_FORMAT_YUYV:
return const_resource_formats_YUYV;