diff options
author | Ian Romanick <[email protected]> | 2015-11-10 15:16:33 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2016-01-11 15:38:04 -0800 |
commit | 1799eddb510bef502901c097ddce9e40d58ff09d (patch) | |
tree | 74dc3d0ca5b4faa98ea49be671d2a62b6aab8b59 /src/mesa/drivers/common/meta.c | |
parent | ae50157363e828a50b249743d3f0b83322a3bc3a (diff) |
meta: Only bind the sampler in one place
All of the calls after the first _mesa_bind_sampler call are DSA style
calls that don't depend on the current binding.
I kept this change separate and last because it is one of the few in the
series that is not a candidate for the stable branch.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common/meta.c')
-rw-r--r-- | src/mesa/drivers/common/meta.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 8f93b25c56d..b026e476b65 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -3129,7 +3129,6 @@ decompress_texture_image(struct gl_context *ctx, return true; } - _mesa_bind_sampler(ctx, ctx->Texture.CurrentUnit, decompress->samp_obj); /* nearest filtering */ _mesa_set_sampler_filters(ctx, decompress->samp_obj, GL_NEAREST, GL_NEAREST); @@ -3137,11 +3136,10 @@ decompress_texture_image(struct gl_context *ctx, if (ctx->Extensions.EXT_texture_sRGB_decode) { _mesa_set_sampler_srgb_decode(ctx, decompress->samp_obj, GL_SKIP_DECODE_EXT); } - - } else { - _mesa_bind_sampler(ctx, ctx->Texture.CurrentUnit, decompress->samp_obj); } + _mesa_bind_sampler(ctx, ctx->Texture.CurrentUnit, decompress->samp_obj); + /* Silence valgrind warnings about reading uninitialized stack. */ memset(verts, 0, sizeof(verts)); |