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 f0606cafe8)
This commit is contained in:
Eric Anholt 2020-12-16 11:03:17 -08:00 committed by Dylan Baker
parent 7c74888039
commit 373b6eba5f
2 changed files with 6 additions and 4 deletions

View file

@ -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
},

View file

@ -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;
}
}
}