From 8f6d9e12be0be086ca2aab0b56dff8d2181addd9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 14 Aug 2008 15:38:09 -0600 Subject: 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. --- src/mesa/state_tracker/st_context.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa/state_tracker/st_context.c') diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 6e4a376d44a..d014ace59fb 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 ); } -- cgit v1.2.3