summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2020-12-16 11:03:17 -0800
committerDylan Baker <dylan.c.baker@intel.com>2020-12-28 15:58:56 -0800
commit373b6eba5f2bbcab67e1522ebcc6c7df62a5b295 (patch)
treea663a490d63accb7e14be7c2c82a1f6863b50d22
parent7c74888039a7407c47d383d342d39b0466cb4654 (diff)
downloadmesa-373b6eba5f2bbcab67e1522ebcc6c7df62a5b295.tar.gz
mesa/st: Update FP state when textures change with an ATI_fs bound.
We may have to make a new ATI_fs variant when the texture target changes. Fixes a regression on piglit ati_fragment_shader-render-textargets on llvmpipe after the switch to NIR ATI_fragment_shader. Cc: mesa-stable Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8118> (cherry picked from commit f0606cafe8330b10ad205b29267b4fba1dfbe7b2)
-rw-r--r--.pick_status.json2
-rw-r--r--src/mesa/state_tracker/st_context.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 2ce18f59d2e..00a93ee9fac 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -247,7 +247,7 @@
"description": "mesa/st: Update FP state when textures change with an ATI_fs bound.",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 1605e4682e8..40364296664 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -271,9 +271,11 @@ st_invalidate_state(struct gl_context *ctx)
(ST_NEW_SAMPLER_VIEWS |
ST_NEW_SAMPLERS |
ST_NEW_IMAGE_UNITS);
- if (ctx->FragmentProgram._Current &&
- ctx->FragmentProgram._Current->ExternalSamplersUsed) {
- st->dirty |= ST_NEW_FS_STATE;
+ if (ctx->FragmentProgram._Current) {
+ struct st_program *stfp = st_program(ctx->FragmentProgram._Current);
+
+ if (stfp->Base.ExternalSamplersUsed || stfp->ati_fs)
+ st->dirty |= ST_NEW_FS_STATE;
}
}
}