aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h
diff options
context:
space:
mode:
authorMaciej Cencora <[email protected]>2009-11-29 15:40:13 +0100
committerMaciej Cencora <[email protected]>2009-11-29 17:27:48 +0100
commit63c00c53a3019b801c5eee8a12f7862422f79f10 (patch)
tree55a106bc7772bebb5fd22714356c351e69581945 /src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h
parent2773556d55fe6043bee3d4c86f7b78906e5d60e0 (diff)
radeon: update miptree code a little
Simplify gl image level <-> miptree level mapping (are equal now). Don't allocate miptree for images that won't fit in it (fixes #25230).
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h
index 28b84850954..a10649b5aea 100644
--- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h
+++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h
@@ -44,6 +44,7 @@ struct _radeon_mipmap_level {
GLuint depth;
GLuint size; /** Size of each image, in bytes */
GLuint rowstride; /** in bytes */
+ GLuint valid;
radeon_mipmap_image faces[6];
};
@@ -70,9 +71,9 @@ struct _radeon_mipmap_tree {
GLuint baseLevel; /** gl_texture_object->baseLevel it was created for */
GLuint numLevels; /** Number of mip levels stored in this mipmap tree */
- GLuint width0; /** Width of firstLevel image */
- GLuint height0; /** Height of firstLevel image */
- GLuint depth0; /** Depth of firstLevel image */
+ GLuint width0; /** Width of baseLevel image */
+ GLuint height0; /** Height of baseLevel image */
+ GLuint depth0; /** Depth of baseLevel image */
GLuint tilebits; /** RADEON_TXO_xxx_TILE */
@@ -89,8 +90,5 @@ 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);
-unsigned radeon_miptree_level_to_gl_level(struct gl_texture_object *tObj, unsigned level);
-unsigned radeon_gl_level_to_miptree_level(struct gl_texture_object *tObj, unsigned level);
-
uint32_t get_base_teximage_offset(radeonTexObj *texObj);
#endif /* __RADEON_MIPMAP_TREE_H_ */