st/mesa: store state that affects sampler views per context
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 5 Oct 2017 12:08:04 +0000 (14:08 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 11 Oct 2017 21:16:20 +0000 (23:16 +0200)
commitbce3055c69b9fddf951fa1d80fc5894570fc00a3
tree2839555171b19cacd3634db52b459b9fbef9a6a7
parente4848053528ee108755652acc9763f904677bfd3
st/mesa: store state that affects sampler views per context

This fixes sequences like:

1. Context 1 samples from texture with sRGB decode enabled
2. Context 2 samples from texture with sRGB decode disabled
3. Context 1 samples from texture with sRGB decode disabled

Previously, step 3 would see the prev_sRGBDecode value from context 2
and would incorrectly use the old sampler view with sRGB decode enabled.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_atom_sampler.c
src/mesa/state_tracker/st_atom_texture.c
src/mesa/state_tracker/st_sampler_view.c
src/mesa/state_tracker/st_texture.h