att->TextureLevel);
if (att->Texture->Target == GL_TEXTURE_3D) {
- GLuint offsets[6];
- radeon_miptree_depth_offsets(radeon_image->mt, att->TextureLevel,
- offsets);
- imageOffset += offsets[att->Zoffset];
+ imageOffset += radeon_image->mt->levels[att->TextureLevel].rowstride *
+ radeon_image->mt->levels[att->TextureLevel].height *
+ att->Zoffset;
}
/* store that offset in the region, along with the correct pitch for
texImg->Depth, t->tile_bits);
}
-/* Although we use the image_offset[] array to store relative offsets
- * to cube faces, Mesa doesn't know anything about this and expects
- * each cube face to be treated as a separate image.
- *
- * These functions present that view to mesa:
- */
-void
-radeon_miptree_depth_offsets(radeon_mipmap_tree *mt, GLuint level, GLuint *offsets)
-{
- if (mt->target != GL_TEXTURE_3D || mt->faces == 1) {
- offsets[0] = 0;
- } else {
- int i;
- for (i = 0; i < 6; i++) {
- offsets[i] = mt->levels[level].faces[i].offset;
- }
- }
-}
-
GLuint
radeon_miptree_image_offset(radeon_mipmap_tree *mt,
GLuint face, GLuint level)
} else {
return radeon_miptree_image_offset(texObj->mt, 0, texObj->minLod);
}
-}
\ No newline at end of file
+}
void radeon_try_alloc_miptree(radeonContextPtr rmesa, radeonTexObj *t);
GLuint radeon_miptree_image_offset(radeon_mipmap_tree *mt,
GLuint face, GLuint level);
-void radeon_miptree_depth_offsets(radeon_mipmap_tree *mt, GLuint level, GLuint *offsets);
-
uint32_t get_base_teximage_offset(radeonTexObj *texObj);
#endif /* __RADEON_MIPMAP_TREE_H_ */