diff options
author | Nicolai Hähnle <[email protected]> | 2017-10-05 14:08:04 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-10-11 23:16:20 +0200 |
commit | bce3055c69b9fddf951fa1d80fc5894570fc00a3 (patch) | |
tree | 2839555171b19cacd3634db52b459b9fbef9a6a7 /src/mesa/state_tracker/st_atom_sampler.c | |
parent | e4848053528ee108755652acc9763f904677bfd3 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_atom_sampler.c')
-rw-r--r-- | src/mesa/state_tracker/st_atom_sampler.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index d9e8de3c9e0..ff3f49fa4e4 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -170,8 +170,8 @@ st_convert_sampler(const struct st_context *st, swizzle is per-texture, not per context. */ /* XXX: clean that up to not use the sampler view at all */ for (unsigned i = 0; i < stobj->num_sampler_views; ++i) { - if (stobj->sampler_views[i]) { - sv = stobj->sampler_views[i]; + if (stobj->sampler_views[i].view) { + sv = stobj->sampler_views[i].view; break; } } |