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: c97961a855 ("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.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25956>
(cherry picked from commit 64352ae8e4)
This commit is contained in:
Pierre-Eric Pelloux-Prayer
2023-11-10 14:32:50 +01:00
committed by Eric Engestrom
parent b52742c018
commit 53bafbe4fd
3 changed files with 8 additions and 1 deletions

View File

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

View File

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

View File

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