summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300/r300_texstate.c
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2008-08-14 10:40:03 +0200
committerMichel Dänzer <[email protected]>2008-08-14 10:40:03 +0200
commit57acb0fad9e6299eb2e1e2c06d043b2a418e3732 (patch)
tree542895ae1b34b5259af3bbf8d3955ab4c271bd8e /src/mesa/drivers/dri/r300/r300_texstate.c
parent505606349e5154c67d1a857d7125048669a594c3 (diff)
r300: Fix 3D texture support.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_texstate.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_texstate.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c
index bdd20b18e44..d19832f8618 100644
--- a/src/mesa/drivers/dri/r300/r300_texstate.c
+++ b/src/mesa/drivers/dri/r300/r300_texstate.c
@@ -392,6 +392,9 @@ static void r300SetTexImages(r300ContextPtr rmesa,
compute_tex_image_offset(tObj, face, i, &curOffset);
}
} else {
+ if (tObj->Target == GL_TEXTURE_3D)
+ t->format |= R300_TX_FORMAT_3D;
+
for (i = 0; i < numLevels; i++)
compute_tex_image_offset(tObj, 0, i, &curOffset);
}
@@ -405,7 +408,9 @@ static void r300SetTexImages(r300ContextPtr rmesa,
(((tObj->Image[0][t->base.firstLevel]->Width -
1) << R300_TX_WIDTHMASK_SHIFT)
| ((tObj->Image[0][t->base.firstLevel]->Height - 1) <<
- R300_TX_HEIGHTMASK_SHIFT))
+ R300_TX_HEIGHTMASK_SHIFT)
+ | ((tObj->Image[0][t->base.firstLevel]->DepthLog2) <<
+ R300_TX_DEPTHMASK_SHIFT))
| ((numLevels - 1) << R300_TX_MAX_MIP_LEVEL_SHIFT);
t->pitch = 0;