diff options
author | Ian Romanick <[email protected]> | 2015-11-10 15:33:20 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2016-01-11 15:38:03 -0800 |
commit | 1998af813af1078b4d19750ea4a634da8e42d8ea (patch) | |
tree | d51b2e264d0d2289d1ae4b5f668ac42d820bbb22 /src/mesa/drivers/common | |
parent | b85c5fe52685bd479e97187cda1c8d38901e245e (diff) |
meta/decompress: Use internal functions for sampler object access
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common')
-rw-r--r-- | src/mesa/drivers/common/meta.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 36bed77b481..66a71325a85 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -3114,15 +3114,20 @@ decompress_texture_image(struct gl_context *ctx, } if (!decompress->Sampler) { + struct gl_sampler_object *samp_obj; + _mesa_GenSamplers(1, &decompress->Sampler); + + samp_obj = _mesa_lookup_samplerobj(ctx, decompress->Sampler); + assert(samp_obj != NULL && samp_obj->Name == decompress->Sampler); + _mesa_BindSampler(ctx->Texture.CurrentUnit, decompress->Sampler); /* nearest filtering */ - _mesa_SamplerParameteri(decompress->Sampler, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - _mesa_SamplerParameteri(decompress->Sampler, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + _mesa_set_sampler_filters(ctx, samp_obj, GL_NEAREST, GL_NEAREST); + /* No sRGB decode or encode.*/ if (ctx->Extensions.EXT_texture_sRGB_decode) { - _mesa_SamplerParameteri(decompress->Sampler, GL_TEXTURE_SRGB_DECODE_EXT, - GL_SKIP_DECODE_EXT); + _mesa_set_sampler_srgb_decode(ctx, samp_obj, GL_SKIP_DECODE_EXT); } } else { |