From b4bf8be5470d54381878bf97750d958281a7c9c3 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 23 Oct 2009 17:54:49 +0800 Subject: intel: Correct support for GL_BGRA. --- src/mesa/drivers/dri/i915/i915_texstate.c | 2 ++ src/mesa/drivers/dri/intel/intel_tex_format.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri') diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c index 32d4b30cf9..aaf50069fa 100644 --- a/src/mesa/drivers/dri/i915/i915_texstate.c +++ b/src/mesa/drivers/dri/i915/i915_texstate.c @@ -60,6 +60,8 @@ translate_texture_format(GLuint mesa_format, GLuint internal_format, return MAPSURF_32BIT | MT_32BIT_XRGB8888; else return MAPSURF_32BIT | MT_32BIT_ARGB8888; + case MESA_FORMAT_ARGB8888_REV: + return MAPSURF_32BIT | MT_32BIT_ABGR8888; case MESA_FORMAT_YCBCR_REV: return (MAPSURF_422 | MT_422_YCRCB_NORMAL); case MESA_FORMAT_YCBCR: diff --git a/src/mesa/drivers/dri/intel/intel_tex_format.c b/src/mesa/drivers/dri/intel/intel_tex_format.c index 3322a71130..a734c0db08 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_format.c +++ b/src/mesa/drivers/dri/intel/intel_tex_format.c @@ -34,7 +34,7 @@ intelChooseTextureFormat(GLcontext * ctx, GLint internalFormat, case GL_COMPRESSED_RGBA: if (format == GL_BGRA) { if (type == GL_UNSIGNED_BYTE || type == GL_UNSIGNED_INT_8_8_8_8_REV) { - return &_mesa_texformat_argb8888; + return &_mesa_texformat_argb8888_rev; } else if (type == GL_UNSIGNED_SHORT_4_4_4_4_REV) { return &_mesa_texformat_argb4444; -- cgit v1.2.3