summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2009-03-24 18:32:46 +1000
committerDave Airlie <airlied@linux.ie>2009-03-24 18:32:46 +1000
commitf577c8e462fc924ea436d129ad64c8a1226b5f9c (patch)
tree53a2c7909dda3e3f29fdc0a222e9e56bb0e439fa /src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
parent5021b47dd307377be30140e3a0d1c2caf0d71665 (diff)
radeon/r200/r300: fix warnings
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
index 228629e3c4..34d6261706 100644
--- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
+++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
@@ -94,8 +94,6 @@ static void compute_tex_image_offset(radeon_mipmap_tree *mt,
/* Find image size in bytes */
if (mt->compressed) {
/* TODO: Is this correct? Need test cases for compressed textures! */
- GLuint align;
-
lvl->rowstride = (lvl->width * mt->bpp + 63) & ~63;
lvl->size = radeon_compressed_texture_size(mt->radeon->glCtx,
lvl->width, lvl->height, lvl->depth, mt->compressed);
@@ -365,14 +363,16 @@ void radeon_try_alloc_miptree(radeonContextPtr rmesa, radeonTexObj *t,
*
* These functions present that view to mesa:
*/
-const GLuint *
-radeon_miptree_depth_offsets(radeon_mipmap_tree *mt, GLuint level)
+void
+radeon_miptree_depth_offsets(radeon_mipmap_tree *mt, GLuint level, GLuint *offsets)
{
- static const GLuint zero = 0;
if (mt->target != GL_TEXTURE_3D || mt->faces == 1)
- return &zero;
- else
- return mt->levels[level].faces[0].offset;
+ offsets[0] = 0;
+ else {
+ int i;
+ for (i = 0; i < 6; i++)
+ offsets[i] = mt->levels[level].faces[i].offset;
+ }
}
GLuint