summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_context.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-08-14 15:38:09 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-08-14 15:44:28 -0600
commit8f6d9e12be0be086ca2aab0b56dff8d2181addd9 (patch)
tree5f9b28a792eed3a01d00d1577617c97c40095bfd /src/mesa/state_tracker/st_context.c
parent6c46b49d12b33b04546bee137f75ca7649e9a4ef (diff)
gallium: use a default texture in update_textures(), update_samplers() when needed
The default texture is used when the current fragment shader has texture sample instructions but the user has not provided/bound a texture.
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r--src/mesa/state_tracker/st_context.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 6e4a376d44..d014ace59f 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -199,6 +199,11 @@ static void st_destroy_context_priv( struct st_context *st )
}
}
+ if (st->default_texture) {
+ st->ctx->Driver.DeleteTexture(st->ctx, st->default_texture);
+ st->default_texture = NULL;
+ }
+
free( st );
}