summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-07-14 20:57:34 -0600
committerEric Anholt <[email protected]>2011-08-29 10:10:03 -0700
commit570016cef27b8b2078d1495fcbce86e3c86c0ee4 (patch)
tree8cddc75fa2e860ce9c7d88192d028808fadf162b
parent68f8cf72638e974a5bf2ae3e88c2e3539d88e2b6 (diff)
mesa: Add driver hooks for texture image mapping/unmapping.
ctx->Driver.MapTextureImage() / UnmapTextureImage() will be called by the glTex[Sub]Image(), glGetTexImage() functions, etc. when we're accessing texture data, and also for software rendering when accessing texture data. Reviewed-by: Brian Paul <[email protected]>
-rw-r--r--src/mesa/main/dd.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 3164ac87ef9..d918b1e311d 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -481,6 +481,25 @@ struct dd_function_table {
*/
void (*FreeTextureImageBuffer)( struct gl_context *ctx, struct gl_texture_image *tImage );
+ /** Map a slice of a texture image into user space.
+ * \param texImage the texture image
+ * \param slice the 3D image slice or array texture slice
+ * \param x, y, w, h region of interest
+ * \param mode bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT
+ * \param mapOut returns start of mapping of region of interest
+ * \param rowStrideOut returns row stride (in bytes)
+ */
+ void (*MapTextureImage)(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
+ GLuint slice,
+ GLuint x, GLuint y, GLuint w, GLuint h,
+ GLbitfield mode,
+ GLubyte **mapOut, GLint *rowStrideOut);
+
+ void (*UnmapTextureImage)(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
+ GLuint slice);
+
/** Map texture image data into user space */
void (*MapTexture)( struct gl_context *ctx, struct gl_texture_object *tObj );
/** Unmap texture images from user space */