summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_gen_mipmap.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2011-02-26 02:32:22 +0100
committerJakob Bornecrantz <jakob@vmware.com>2011-02-26 02:32:22 +0100
commitca8a91ff7eb7e3fb4595763ea71f427b97e426c6 (patch)
tree395c402e6516a749e2d1fd310143c83703e6e5f3 /src/gallium/auxiliary/util/u_gen_mipmap.c
parenta08e612fd8e7ca2ac2fef8961e56e5b094033717 (diff)
downloadexternal_mesa3d-ca8a91ff7eb7e3fb4595763ea71f427b97e426c6.zip
external_mesa3d-ca8a91ff7eb7e3fb4595763ea71f427b97e426c6.tar.gz
external_mesa3d-ca8a91ff7eb7e3fb4595763ea71f427b97e426c6.tar.bz2
util: Don't destroy shaders null shaders
Fixes regression from a08e612fd8e7ca2ac2fef8961e56e5b094033717
Diffstat (limited to 'src/gallium/auxiliary/util/u_gen_mipmap.c')
-rw-r--r--src/gallium/auxiliary/util/u_gen_mipmap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c
index 6fba600..4f1b0e7 100644
--- a/src/gallium/auxiliary/util/u_gen_mipmap.c
+++ b/src/gallium/auxiliary/util/u_gen_mipmap.c
@@ -1451,8 +1451,10 @@ util_destroy_gen_mipmap(struct gen_mipmap_state *ctx)
{
struct pipe_context *pipe = ctx->pipe;
- pipe->delete_fs_state(pipe, ctx->fs2da);
- pipe->delete_fs_state(pipe, ctx->fs1da);
+ if (ctx->fs2da)
+ pipe->delete_fs_state(pipe, ctx->fs2da);
+ if (ctx->fs1da)
+ pipe->delete_fs_state(pipe, ctx->fs1da);
pipe->delete_fs_state(pipe, ctx->fsCube);
pipe->delete_fs_state(pipe, ctx->fs3d);
pipe->delete_fs_state(pipe, ctx->fs2d);