summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/unichrome
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2005-01-19 12:06:17 +0000
committerKeith Whitwell <[email protected]>2005-01-19 12:06:17 +0000
commitbdb5725bab0fdfffb20bbfb4f2c3d7aa3482c1bc (patch)
tree7d36addd8a8992ef22aff29d6a5b546a53586710 /src/mesa/drivers/dri/unichrome
parent69310879581d8dedc7efb1a60e762059d14c249f (diff)
Always use ARGB8888 hardware texture format when mesa specifies
MESA_FORMAT_ARGB8888. Previously attempted to use ARGB0888 under some circumstances, but glean failed and demos/texenv.c was also incorrect.
Diffstat (limited to 'src/mesa/drivers/dri/unichrome')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_texstate.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_texstate.c b/src/mesa/drivers/dri/unichrome/via_texstate.c
index daf7212e7eb..51a27ef1188 100644
--- a/src/mesa/drivers/dri/unichrome/via_texstate.c
+++ b/src/mesa/drivers/dri/unichrome/via_texstate.c
@@ -173,7 +173,12 @@ static void viaSetTexImages(viaContextPtr vmesa,
if (VIA_DEBUG) fprintf(stderr, "%s - in\n", __FUNCTION__);
switch (baseImage->TexFormat->MesaFormat) {
case MESA_FORMAT_ARGB8888:
- if (t->image[tObj->BaseLevel].internalFormat == GL_RGB)
+ /* KW: I'm not sure what the thinking behind this test was, but
+ * it definitely didn't work, see failures in demos/texenv.c
+ * and glean texEnv test, both of which are corrected by
+ * disabling the 0888 option:
+ */
+ if (t->image[tObj->BaseLevel].internalFormat == GL_RGB && 0)
texFormat = HC_HTXnFM_ARGB0888;
else
texFormat = HC_HTXnFM_ARGB8888;
@@ -408,13 +413,9 @@ static GLboolean viaUpdateTexUnit(GLcontext *ctx, GLuint unit)
}
}
-void viaUpdateTextureState(GLcontext *ctx)
+GLboolean viaUpdateTextureState(GLcontext *ctx)
{
- viaContextPtr vmesa = VIA_CONTEXT(ctx);
-
- GLuint ok = (viaUpdateTexUnit(ctx, 0) &&
- viaUpdateTexUnit(ctx, 1));
-
- FALLBACK(vmesa, VIA_FALLBACK_TEXTURE, !ok);
+ return (viaUpdateTexUnit(ctx, 0) &&
+ viaUpdateTexUnit(ctx, 1));
}