Module: Mesa
Branch: staging/23.3
Commit: 8d493f67c0bfa6f52757aeaf26e607355868f4aa
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8d493f67c0bfa6f52757aeaf26e607355868f4aa

Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com>
Date:   Fri Nov 10 14:32:50 2023 +0100

mesa: restore call to _mesa_set_varying_vp_inputs from 
set_vertex_processing_mode

Otherwise ctx->VertexProgram._VaryingInputs might not be up to date.

We can't do this in update_program because this breaks 
vbo_save_playback_vertex_list_gallium:

  const GLbitfield enabled = node->enabled_attribs[mode];
  _mesa_set_varying_vp_inputs(ctx, enabled);              <-- update 
_VaryingInputs

  if (ctx->NewState)
     _mesa_update_state(ctx);                             <-- calls 
update_program, reverting the
                                                              change made above

Fixes: c97961a855a ("mesa: fix 38% decrease in display list performance of 
Viewperf2020/NX8_StudioAA")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9441
Reviewed-by: Marek Olšák <marek.ol...@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25956>
(cherry picked from commit 64352ae8e4341d57504478cf2e6315041f13d5e0)

---

 .pick_status.json     | 2 +-
 src/mesa/main/state.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 60e3469b351..a64df2c05eb 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -694,7 +694,7 @@
         "description": "mesa: restore call to _mesa_set_varying_vp_inputs from 
set_vertex_processing_mode",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "c97961a855ad1ae5c58d47634862b459e682e158",
         "notes": null
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 736b2ae6c2b..784dafd07ff 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -687,6 +687,9 @@ set_vertex_processing_mode(struct gl_context *ctx, 
gl_vertex_processing_mode m)
    default:
       assert(0);
    }
+
+   _mesa_set_varying_vp_inputs(ctx, ctx->VertexProgram._VPModeInputFilter &
+                               ctx->Array._DrawVAO->_EnabledWithMapMode);
 }
 
 

Reply via email to