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>
(cherry picked from commit bdb3daab7c)
This commit is contained in:
antonino 2023-04-04 17:00:53 +02:00 committed by Eric Engestrom
parent 51a0b242c0
commit b918a421d8
2 changed files with 2 additions and 2 deletions

View file

@ -238,7 +238,7 @@
"description": "zink: fix exit condition on pv emulation loop",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "5a4083349f36ef6db36a962327de6952a30d0c92"
},

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