Mesa (staging/23.3): mesa: restore call to _mesa_set_varying_vp_inputs from set_vertex_processing_mode

2023-11-24 Thread GitLab Mirror
Module: Mesa
Branch: staging/23.3
Commit: 53bafbe4fd2c84d7242e32175c757cbf86e05fcf
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=53bafbe4fd2c84d7242e32175c757cbf86e05fcf

Author: Pierre-Eric Pelloux-Prayer 
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 
Part-of: 
(cherry picked from commit 64352ae8e4341d57504478cf2e6315041f13d5e0)

---

 .pick_status.json  | 2 +-
 src/gallium/drivers/lima/ci/lima-fails.txt | 4 
 src/mesa/main/state.c  | 3 +++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index d574fd6baf1..c50cfe70d4a 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -4314,7 +4314,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/gallium/drivers/lima/ci/lima-fails.txt 
b/src/gallium/drivers/lima/ci/lima-fails.txt
index 50f91c11400..e9039e214b7 100644
--- a/src/gallium/drivers/lima/ci/lima-fails.txt
+++ b/src/gallium/drivers/lima/ci/lima-fails.txt
@@ -207,6 +207,7 @@ spec@ext_framebuffer_object@fbo-maxsize,Fail
 spec@ext_framebuffer_object@fbo-readpixels-depth-formats,Fail
 
spec@ext_framebuffer_object@fbo-readpixels-depth-formats@GL_DEPTH_COMPONENT/GL_FLOAT,Fail
 
spec@ext_framebuffer_object@fbo-readpixels-depth-formats@GL_DEPTH_COMPONENT/GL_UNSIGNED_INT,Fail
+spec@ext_framebuffer_object@fbo-scissor-bitmap,Fail
 spec@ext_framebuffer_object@fbo-stencil-gl_stencil_index16-blit,Fail
 spec@ext_framebuffer_object@fbo-stencil-gl_stencil_index16-copypixels,Fail
 spec@ext_framebuffer_object@fbo-stencil-gl_stencil_index16-drawpixels,Fail
@@ -546,6 +547,7 @@ spec@khr_texture_compression_astc@basic-gles,Fail
 spec@khr_texture_compression_astc@miptree-gles srgb,Fail
 spec@khr_texture_compression_astc@miptree-gles srgb-fp,Fail
 spec@oes_point_sprite@arb_point_sprite-checkerboard_gles1,Fail
+spec@!opengl 1.0@gl-1.0-dlist-bitmap,Fail
 spec@!opengl 1.0@gl-1.0-dlist-materials,Fail
 spec@!opengl 1.0@gl-1.0-dlist-shademodel,Fail
 spec@!opengl 1.0@gl-1.0-drawbuffer-modes,Fail
@@ -570,6 +572,7 @@ spec@!opengl 1.0@gl-1.0-logicop@GL_XOR,Fail
 spec@!opengl 1.0@gl-1.0-no-op-paths,Fail
 spec@!opengl 1.0@gl-1.0-ortho-pos,Fail
 spec@!opengl 1.0@gl-1.0-rastercolor,Fail
+spec@!opengl 1.0@gl-1.0-scissor-bitmap,Fail
 spec@!opengl 1.0@gl-1.0-swapbuffers-behavior,Fail
 spec@!opengl 1.0@gl-1.0-user-clip-all-planes,Fail
 spec@!opengl 1.1@gl-1.1-xor-copypixels,Fail
@@ -640,6 +643,7 @@ spec@!opengl 2.0@vertex-program-two-side enabled front back 
back2@vs and fs,Fail
 spec@!opengl 2.0@vertex-program-two-side enabled front front2 back2,Fail
 spec@!opengl 2.0@vertex-program-two-side enabled front front2 back2@vs and 
fs,Fail
 spec@!opengl 2.1@pbo,Fail
+spec@!opengl 2.1@pbo@test_bitmap,Fail
 spec@!opengl 2.1@pbo@test_polygon_stip,Fail
 spec@!opengl 2.1@polygon-stipple-fs,Fail
 spec@!opengl es 2.0@glsl-fs-pointcoord,Fail
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);
 }
 
 



Mesa (staging/23.3): mesa: restore call to _mesa_set_varying_vp_inputs from set_vertex_processing_mode

2023-11-15 Thread GitLab Mirror
Module: Mesa
Branch: staging/23.3
Commit: 8d493f67c0bfa6f52757aeaf26e607355868f4aa
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8d493f67c0bfa6f52757aeaf26e607355868f4aa

Author: Pierre-Eric Pelloux-Prayer 
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 
Part-of: 
(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);
 }