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 <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33812>
This commit is contained in:
Konstantin Seurer 2025-02-27 21:16:13 +01:00 committed by Marge Bot
parent ee1cb894d6
commit 4348253db5

View file

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