summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915pipe/intel_tex.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i915pipe/intel_tex.h')
-rw-r--r--src/mesa/drivers/dri/i915pipe/intel_tex.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915pipe/intel_tex.h b/src/mesa/drivers/dri/i915pipe/intel_tex.h
index b77d7a1d8a..4a5081eee7 100644
--- a/src/mesa/drivers/dri/i915pipe/intel_tex.h
+++ b/src/mesa/drivers/dri/i915pipe/intel_tex.h
@@ -32,6 +32,48 @@
#include "intel_context.h"
#include "texmem.h"
+struct intel_texture_object
+{
+ struct gl_texture_object base; /* The "parent" object */
+
+ /* The mipmap tree must include at least these levels once
+ * validated:
+ */
+ GLuint firstLevel;
+ GLuint lastLevel;
+
+ /* Offset for firstLevel image:
+ */
+ GLuint textureOffset;
+
+ /* On validation any active images held in main memory or in other
+ * regions will be copied to this region and the old storage freed.
+ */
+ struct intel_mipmap_tree *mt;
+
+ GLboolean imageOverride;
+ GLint depthOverride;
+ GLuint pitchOverride;
+};
+
+
+
+struct intel_texture_image
+{
+ struct gl_texture_image base;
+
+ /* These aren't stored in gl_texture_image
+ */
+ GLuint level;
+ GLuint face;
+
+ /* If intelImage->mt != NULL, image data is stored here.
+ * Else if intelImage->base.Data != NULL, image is stored there.
+ * Else there is no image data.
+ */
+ struct intel_mipmap_tree *mt;
+};
+
void intelInitTextureFuncs(struct dd_function_table *functions);
@@ -148,4 +190,18 @@ void intel_tex_unmap_images(struct intel_context *intel,
int intel_compressed_num_bytes(GLuint mesaFormat);
+
+static INLINE struct intel_texture_object *
+intel_texture_object(struct gl_texture_object *obj)
+{
+ return (struct intel_texture_object *) obj;
+}
+
+static INLINE struct intel_texture_image *
+intel_texture_image(struct gl_texture_image *img)
+{
+ return (struct intel_texture_image *) img;
+}
+
+
#endif