summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/r300/r300_reg.h4
-rw-r--r--src/mesa/drivers/dri/r300/r300_texstate.c7
2 files changed, 8 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_reg.h b/src/mesa/drivers/dri/r300/r300_reg.h
index 562cd6afdb..778db96cc1 100644
--- a/src/mesa/drivers/dri/r300/r300_reg.h
+++ b/src/mesa/drivers/dri/r300/r300_reg.h
@@ -1458,8 +1458,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
# define R300_TX_FORMAT_X32 0x1e
/* 0x16 - some 16 bit green format.. ?? */
-# define R300_TX_FORMAT_UNK25 (1 << 25) /* no swizzle */
-# define R300_TX_FORMAT_CUBIC_MAP (1 << 26)
+# define R300_TX_FORMAT_3D (1 << 25)
+# define R300_TX_FORMAT_CUBIC_MAP (2 << 25)
/* gap */
/* Floating point formats */
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c
index bdd20b18e4..d19832f861 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;