aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-09-17 14:50:48 -0600
committerBrian Paul <[email protected]>2011-09-17 14:57:40 -0600
commit146f536b3332b7a2022bb4ba5e2d1d2ec4bedd98 (patch)
tree863c2ee5f23d879dddb36ec7191c03bd915ba384 /src/mesa/state_tracker
parentbaeefef2c0445bfd717a3086fdd9b5bd5d9cb675 (diff)
mesa: add new DeleteTextureImage() driver hook
Matches the NewTextureImage() hook. With new subclasses of gl_texture_image coming we need a new hook to properly delete objects of those subclasses.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 2a971c51d07..68323a35a73 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -105,6 +105,15 @@ st_NewTextureImage(struct gl_context * ctx)
}
+/** called via ctx->Driver.DeleteTextureImage() */
+static void
+st_DeleteTextureImage(struct gl_context * ctx, struct gl_texture_image *img)
+{
+ /* nothing special (yet) for st_texture_image */
+ _mesa_delete_texture_image(ctx, img);
+}
+
+
/** called via ctx->Driver.NewTextureObject() */
static struct gl_texture_object *
st_NewTextureObject(struct gl_context * ctx, GLuint name, GLenum target)
@@ -1918,6 +1927,7 @@ st_init_texture_functions(struct dd_function_table *functions)
functions->NewTextureObject = st_NewTextureObject;
functions->NewTextureImage = st_NewTextureImage;
+ functions->DeleteTextureImage = st_DeleteTextureImage;
functions->DeleteTexture = st_DeleteTextureObject;
functions->FreeTextureImageBuffer = st_FreeTextureImageBuffer;
functions->MapTextureImage = st_MapTextureImage;