summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/p_state.h
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2007-11-30 20:48:03 +0100
committerMichel Dänzer <[email protected]>2007-12-06 11:18:11 +0100
commit753db0d8407147393a7b0622ae3fa28f68d0353d (patch)
tree8c11ae7b18cb34ae65e984fc7d9be50616bf99d4 /src/mesa/pipe/p_state.h
parent59356268187470c5fda9e9a1a7058607f938fb3b (diff)
Hide texture layout details from the state tracker.
pipe->get_tex_surface() has to be used for access to texture image data.
Diffstat (limited to 'src/mesa/pipe/p_state.h')
-rw-r--r--src/mesa/pipe/p_state.h42
1 files changed, 7 insertions, 35 deletions
diff --git a/src/mesa/pipe/p_state.h b/src/mesa/pipe/p_state.h
index 642734aeb80..077a8f5a06f 100644
--- a/src/mesa/pipe/p_state.h
+++ b/src/mesa/pipe/p_state.h
@@ -288,27 +288,11 @@ struct pipe_surface
/**
- * Describes the location of each texture image within a texture region.
+ * Texture. Represents one or several texture images on one or several mipmap
+ * levels.
*/
-struct pipe_mipmap_level
-{
- unsigned level_offset;
- unsigned width;
- unsigned height;
- unsigned depth;
- unsigned nr_images;
-
- /* Explicitly store the offset of each image for each cube face or
- * depth value. Pretty much have to accept that hardware formats
- * are going to be so diverse that there is no unified way to
- * compute the offsets of depth/cube images within a mipmap level,
- * so have to store them as a lookup table:
- */
- unsigned *image_offset; /**< array [depth] of offsets */
-};
-
-struct pipe_mipmap_tree
-{
+struct pipe_texture
+{
/* Effectively the key:
*/
unsigned target; /* XXX convert to PIPE_TEXTURE_x */
@@ -318,25 +302,13 @@ struct pipe_mipmap_tree
unsigned first_level;
unsigned last_level;
- unsigned width0, height0, depth0; /**< Level zero image dimensions */
+ unsigned width[PIPE_MAX_TEXTURE_LEVELS];
+ unsigned height[PIPE_MAX_TEXTURE_LEVELS];
+ unsigned depth[PIPE_MAX_TEXTURE_LEVELS];
unsigned cpp;
unsigned compressed:1;
- /* Derived from the above:
- */
- unsigned pitch;
- unsigned depth_pitch; /* per-image on i945? */
- unsigned total_height;
-
- /* Includes image offset tables:
- */
- struct pipe_mipmap_level level[PIPE_MAX_TEXTURE_LEVELS];
-
- /* The data is held here:
- */
- struct pipe_region *region;
-
/* These are also refcounted:
*/
unsigned refcount;