From 373b6eba5f2bbcab67e1522ebcc6c7df62a5b295 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 16 Dec 2020 11:03:17 -0800 Subject: mesa/st: Update FP state when textures change with an ATI_fs bound. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Part-of: (cherry picked from commit f0606cafe8330b10ad205b29267b4fba1dfbe7b2) --- .pick_status.json | 2 +- src/mesa/state_tracker/st_context.c | 8 +++++--- 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; } } } -- cgit v1.2.1