summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/i915simple/i915_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_context.h')
-rw-r--r--src/mesa/pipe/i915simple/i915_context.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/mesa/pipe/i915simple/i915_context.h b/src/mesa/pipe/i915simple/i915_context.h
index ee430ebc902..8ed3465be23 100644
--- a/src/mesa/pipe/i915simple/i915_context.h
+++ b/src/mesa/pipe/i915simple/i915_context.h
@@ -150,6 +150,34 @@ struct i915_alpha_test_state {
unsigned LIS6;
};
+struct i915_texture {
+ struct pipe_texture base;
+
+ /* Derived from the above:
+ */
+ unsigned pitch;
+ unsigned depth_pitch; /* per-image on i945? */
+ unsigned total_height;
+
+ unsigned nr_images[PIPE_MAX_TEXTURE_LEVELS];
+
+ /* 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[PIPE_MAX_TEXTURE_LEVELS]; /**< array [depth] of offsets */
+
+ /* Includes image offset tables:
+ */
+ unsigned level_offset[PIPE_MAX_TEXTURE_LEVELS];
+
+ /* The data is held here:
+ */
+ struct pipe_region *region;
+};
+
struct i915_context
{
struct pipe_context pipe;
@@ -174,7 +202,7 @@ struct i915_context
struct pipe_poly_stipple poly_stipple;
struct pipe_scissor_state scissor;
uint sampler_units[PIPE_MAX_SAMPLERS];
- struct pipe_mipmap_tree *texture[PIPE_MAX_SAMPLERS];
+ struct i915_texture *texture[PIPE_MAX_SAMPLERS];
struct pipe_viewport_state viewport;
struct pipe_vertex_buffer vertex_buffer[PIPE_ATTRIB_MAX];