diff options
| author | Eric Anholt <eric@anholt.net> | 2009-10-30 12:26:54 -0700 | 
|---|---|---|
| committer | Eric Anholt <eric@anholt.net> | 2009-10-30 12:41:28 -0700 | 
| commit | 2073006c9566b08888b4338748a843c645bd0db1 (patch) | |
| tree | 3c2b66c7841c7af41eebad9dfafa7442b888add4 /src | |
| parent | b568a2c808cc2258c354bf14f640bb1f6eaba4ba (diff) | |
intel: Set the texture format in the TFP path.
This fixes a regression in piglit's tfp test as of
11caea687e3f10ae12d33e44edf84635f73047dd.  Additionally, set the texture
format for the RGB textures to MESA_FORMAT_XRGB8888 and support it in the
hw paths so that hopefully sw fallbacks involving TFP get better alpha
behavior.
The radeon drivers appear to need the same fix.
Bug #24803
Diffstat (limited to 'src')
| -rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex_image.c | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index 3dce1b0a87..3412e761ca 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image.c +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c @@ -6,6 +6,7 @@  #include "main/bufferobj.h"  #include "main/convolve.h"  #include "main/context.h" +#include "main/formats.h"  #include "main/image.h"  #include "main/texcompress.h"  #include "main/texstore.h" @@ -741,7 +742,7 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,     struct gl_texture_unit *texUnit;     struct gl_texture_object *texObj;     struct gl_texture_image *texImage; -   int level = 0, type, format, internalFormat; +   int level = 0, internalFormat;     texUnit = &intel->ctx.Texture.Unit[intel->ctx.Texture.CurrentUnit];     texObj = _mesa_select_tex_object(&intel->ctx, texUnit, target); @@ -759,8 +760,6 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,     if (rb->region == NULL)        return; -   type = GL_BGRA; -   format = GL_UNSIGNED_BYTE;     if (glx_texture_format == GLX_TEXTURE_FORMAT_RGB_EXT)        internalFormat = GL_RGB;     else @@ -791,6 +790,10 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,     intelImage->face = target_to_face(target);     intelImage->level = level; +   if (glx_texture_format == GLX_TEXTURE_FORMAT_RGB_EXT) +      texImage->TexFormat = MESA_FORMAT_XRGB8888; +   else +      texImage->TexFormat = MESA_FORMAT_ARGB8888;     texImage->RowStride = rb->region->pitch;     intel_miptree_reference(&intelImage->mt, intelObj->mt); | 
