pan/bi: Preserve flow control for non-psiz variant

Otherwise we will get INSTR_INVALID_ENC faults when deleting the final STORE.end
instruction, after we rework our flow control code.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16804>
This commit is contained in:
Alyssa Rosenzweig 2022-05-20 15:46:54 -04:00 committed by Marge Bot
parent c846e0812b
commit 4627cd99de

View file

@ -5215,7 +5215,13 @@ bi_compile_variant(nir_shader *nir,
assert(write != NULL);
/* Remove it, TODO: DCE */
/* NOP it out, preserving its flow control. TODO: maybe DCE */
if (write->flow) {
bi_builder b = bi_init_builder(ctx, bi_before_instr(write));
bi_instr *nop = bi_nop(&b);
nop->flow = write->flow;
}
bi_remove_instruction(write);
info->vs.no_psiz_offset = binary->size;