aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2007-05-30 15:37:42 +0200
committerMichel Dänzer <[email protected]>2007-05-30 15:37:42 +0200
commit2b7ef2549f017996073f51bc147f508c325a1db6 (patch)
tree39f26c23a93dbb240e904df2ff345051146dbb0f /src/mesa/drivers/dri
parentd61a595a5b1752a0f377e9a2e698f723ea4a6207 (diff)
Fix r300SetTexOffset for big endian platforms.
This was broken by the unification of the texture format table.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/r300/r300_texstate.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c
index eeaba584df8..ac5a5ba1cd4 100644
--- a/src/mesa/drivers/dri/r300/r300_texstate.c
+++ b/src/mesa/drivers/dri/r300/r300_texstate.c
@@ -501,7 +501,6 @@ void r300SetTexOffset(__DRIcontext * pDRICtx, GLint texname,
struct gl_texture_object *tObj =
_mesa_lookup_texture(rmesa->radeon.glCtx, texname);
r300TexObjPtr t;
- int idx;
if (!tObj)
return;
@@ -518,24 +517,24 @@ void r300SetTexOffset(__DRIcontext * pDRICtx, GLint texname,
switch (depth) {
case 32:
- idx = 2;
+ t->format = R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8);
+ t->filter |= tx_table[2].filter;
t->pitch_reg /= 4;
break;
case 24:
default:
- idx = 4;
+ t->format = R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8);
+ t->filter |= tx_table[4].filter;
t->pitch_reg /= 4;
break;
case 16:
- idx = 5;
+ t->format = R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z5Y6X5);
+ t->filter |= tx_table[5].filter;
t->pitch_reg /= 2;
break;
}
t->pitch_reg--;
-
- t->format = tx_table[idx].format;
- t->filter |= tx_table[idx].filter;
}
static GLboolean r300UpdateTextureUnit(GLcontext * ctx, int unit)