From 36e7c01101b5610b432befcf45e54260a78a67c9 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 21 Mar 2013 09:45:20 -0700 Subject: [PATCH] mesa: Add ChooseTexFormat support for the new XBGR formats. --- src/mesa/main/texformat.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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: -- 2.30.2