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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user