Module: Mesa
Branch: staging/20.3
Commit: 373b6eba5f2bbcab67e1522ebcc6c7df62a5b295
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=373b6eba5f2bbcab67e1522ebcc6c7df62a5b295

Author: Eric Anholt <[email protected]>
Date:   Wed Dec 16 11:03:17 2020 -0800

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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8118>
(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;
       }
    }
 }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to