zink: fix exit condition on pv emulation loop

The exit condition was not correct causing the pv emulation lowering
pass to emit garbage for incomplete primitives.

Fixes: 5a4083349f ("zink: add provoking vertex mode lowering")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22599>
This commit is contained in:
antonino 2023-04-04 17:00:53 +02:00 committed by Marge Bot
parent 89077b866c
commit bdb3daab7c

View file

@ -523,7 +523,7 @@ lower_pv_mode_gs_end_primitive(nir_builder *b,
{
nir_ssa_def *out_pos_counter = nir_load_var(b, state->out_pos_counter);
nir_push_if(b, nir_ilt(b, nir_isub(b, pos_counter, out_pos_counter),
nir_imm_int(b, state->primitive_vert_count - 1)));
nir_imm_int(b, state->primitive_vert_count)));
nir_jump(b, nir_jump_break);
nir_pop_if(b, NULL);