summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texformat.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-03-21 09:45:20 -0700
committerEric Anholt <[email protected]>2013-05-21 15:20:28 -0700
commit36e7c01101b5610b432befcf45e54260a78a67c9 (patch)
tree7c6060c65ce73180c8144a804ed9a4e428f9dd5a /src/mesa/main/texformat.c
parentb29381567a83b47ef92e6e4e8e7c402550f467cb (diff)
mesa: Add ChooseTexFormat support for the new XBGR formats.
Diffstat (limited to 'src/mesa/main/texformat.c')
-rw-r--r--src/mesa/main/texformat.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index ed40b7eae09..362e210954b 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -142,6 +142,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
case GL_RGB10:
case GL_RGB12:
case GL_RGB16:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16);
RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
@@ -424,12 +425,14 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
break;
case GL_RGB16F_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_FLOAT);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT32);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
break;
case GL_RGB32F_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR32323232_FLOAT);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT16);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
@@ -555,6 +558,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
break;
case GL_RGB16_SNORM:
RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGB_16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_SNORM);
/* FALLTHROUGH */
case GL_RGBA16_SNORM:
RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA_16);
@@ -740,26 +744,32 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
switch (internalFormat) {
case GL_RGB8UI_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UINT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR8888_UINT);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8);
break;
case GL_RGB16UI_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UINT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_UINT);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16);
break;
case GL_RGB32UI_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UINT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR32323232_UINT);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
break;
case GL_RGB8I_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_INT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR8888_SINT);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
break;
case GL_RGB16I_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_INT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_SINT);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
break;
case GL_RGB32I_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_INT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR32323232_SINT);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
break;
case GL_RGBA8UI_EXT: