diff options
author | Brian Paul <[email protected]> | 2010-06-25 14:12:30 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-06-25 14:12:34 -0600 |
commit | 4ae530370d8b66092681b9e818012dcb205db518 (patch) | |
tree | 432741b313282b66f921c67592bdb6c7839e7bdc /src/gallium/auxiliary/util | |
parent | e099ed2c64edc4adc716dce5c54e4c97444504d8 (diff) |
gallium/util: fix pipe_sampler_view_reference() calls
The conditionals aren't needed.
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_blitter.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index dfe2101c2e5..42d37ccfd6d 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -260,9 +260,7 @@ void util_blitter_destroy(struct blitter_context *blitter) if (ctx->sampler_state[i]) pipe->delete_sampler_state(pipe, ctx->sampler_state[i]); - if (ctx->sampler_view) { - pipe_sampler_view_reference(&ctx->sampler_view, NULL); - } + pipe_sampler_view_reference(&ctx->sampler_view, NULL); pipe_resource_reference(&ctx->vbuf, NULL); FREE(ctx); @@ -736,10 +734,7 @@ void util_blitter_copy_region(struct blitter_context *blitter, u_sampler_view_default_template(&viewTempl, src, src->format); view = pipe->create_sampler_view(pipe, src, &viewTempl); - if (ctx->sampler_view) { - pipe_sampler_view_reference(&ctx->sampler_view, NULL); - } - ctx->sampler_view = view; + pipe_sampler_view_reference(&ctx->sampler_view, view); /* Set rasterizer state, shaders, and textures. */ pipe->bind_rasterizer_state(pipe, ctx->rs_state); |