summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915/i915_texstate.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2009-03-22 12:01:21 +1000
committerDave Airlie <airlied@linux.ie>2009-03-22 12:01:21 +1000
commit2d26d4ac66e8c3e48b73d3e172d0e0d2a2ad31a5 (patch)
tree6b0d899db605b28e10b9b953d181b09bf40bb472 /src/mesa/drivers/dri/i915/i915_texstate.c
parent407e8ae5b167b0193e1e5b1266a5d61ed836dfb5 (diff)
parent699897e81c623e53be51fba0488f535b0a8d7761 (diff)
Merge remote branch 'origin/master' into HEAD
Diffstat (limited to 'src/mesa/drivers/dri/i915/i915_texstate.c')
-rw-r--r--src/mesa/drivers/dri/i915/i915_texstate.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c
index adbb52a3a3..6d25f8dd8e 100644
--- a/src/mesa/drivers/dri/i915/i915_texstate.c
+++ b/src/mesa/drivers/dri/i915/i915_texstate.c
@@ -37,7 +37,8 @@
static GLuint
-translate_texture_format(GLuint mesa_format, GLenum DepthMode)
+translate_texture_format(GLuint mesa_format, GLuint internal_format,
+ GLenum DepthMode)
{
switch (mesa_format) {
case MESA_FORMAT_L8:
@@ -55,7 +56,10 @@ translate_texture_format(GLuint mesa_format, GLenum DepthMode)
case MESA_FORMAT_ARGB4444:
return MAPSURF_16BIT | MT_16BIT_ARGB4444;
case MESA_FORMAT_ARGB8888:
- return MAPSURF_32BIT | MT_32BIT_ARGB8888;
+ if (internal_format == GL_RGB)
+ return MAPSURF_32BIT | MT_32BIT_XRGB8888;
+ else
+ return MAPSURF_32BIT | MT_32BIT_ARGB8888;
case MESA_FORMAT_YCBCR_REV:
return (MAPSURF_422 | MT_422_YCRCB_NORMAL);
case MESA_FORMAT_YCBCR:
@@ -173,7 +177,8 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
firstLevel);
format = translate_texture_format(firstImage->TexFormat->MesaFormat,
- tObj->DepthMode);
+ firstImage->InternalFormat,
+ tObj->DepthMode);
pitch = intelObj->mt->pitch * intelObj->mt->cpp;
}