From 4348253db5232b7be4db0a0ff47b31d51bc8f534 Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Thu, 27 Feb 2025 21:16:13 +0100 Subject: [PATCH] llvmpipe: Skip draw_mesh if the ms did not write gl_Position There is nothing to be done and the code will hit "assert(pos != -1);" otherwise. cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12684 Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/llvmpipe/lp_state_cs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/llvmpipe/lp_state_cs.c b/src/gallium/drivers/llvmpipe/lp_state_cs.c index ae5c5f57e85..6f1256d0b22 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_cs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_cs.c @@ -2105,7 +2105,10 @@ lp_mesh_call_draw(struct llvmpipe_context *lp, draw_collect_primitives_generated(lp->draw, lp->active_primgen_queries && !lp->queries_disabled); - draw_mesh(lp->draw, &vert_out, &prim_out); + + const unsigned pos = draw_current_shader_position_output(lp->draw); + if (pos != UINT32_MAX) + draw_mesh(lp->draw, &vert_out, &prim_out); free(vert_out.verts); free(prim_out.primitive_lengths);