summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorAapo Tahkola <aet@rasterburn.org>2006-01-09 19:20:46 +0000
committerAapo Tahkola <aet@rasterburn.org>2006-01-09 19:20:46 +0000
commit0946e0f418abfdf8dd4841990f58c31cd9c6f3f1 (patch)
treeb68b8b36670d1a00929af8b37ef10914cc7eedec /src/mesa
parent7a028bd1caca9f9ce8fe99902ca876e4a18eb4e3 (diff)
Fix cube maps.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/r300/r300_texstate.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c
index 1bbe2486d9..bce350cba4 100644
--- a/src/mesa/drivers/dri/r300/r300_texstate.c
+++ b/src/mesa/drivers/dri/r300/r300_texstate.c
@@ -300,25 +300,17 @@ static void r300SetTexImages(r300ContextPtr rmesa,
/* Setup remaining cube face blits, if needed */
if (tObj->Target == GL_TEXTURE_CUBE_MAP) {
- WARN_ONCE("Cube map faces arent currently correctly positioned.\n");
- /* Round totalSize up to multiple of BLIT_WIDTH_BYTES */
- const GLuint faceSize =
- (t->base.totalSize + BLIT_WIDTH_BYTES - 1)
- & ~(BLIT_WIDTH_BYTES - 1);
- const GLuint lines = faceSize / BLIT_WIDTH_BYTES;
GLuint face;
- /* reuse face 0 x/y/width/height - just adjust y */
for (face = 1; face < 6; face++) {
for (i = 0; i < numLevels; i++) {
t->image[face][i].x = t->image[0][i].x;
- t->image[face][i].y =
- t->image[0][i].y + face * lines;
+ t->image[face][i].y = t->image[0][i].y;
t->image[face][i].width = t->image[0][i].width;
t->image[face][i].height =
t->image[0][i].height;
}
}
- t->base.totalSize = 6 * faceSize; /* total texmem needed */
+ t->base.totalSize *= 6; /* total texmem needed */
}
/* Hardware state: