gallium/ntt: Fix check for "is there anything in the else block?"

The cf list will always be non-empty, with at least a block in it.
Noticed while checking codegen of a piglit test that was really slow on
softpipe.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8068>
This commit is contained in:
Eric Anholt
2020-12-22 12:18:28 -08:00
parent 358d5a270d
commit 746a0f502a
+1 -1
View File
@@ -2053,7 +2053,7 @@ ntt_emit_if(struct ntt_compile *c, nir_if *if_stmt)
ureg_UIF(c->ureg, c->if_cond, &label);
ntt_emit_cf_list(c, &if_stmt->then_list);
if (!exec_list_is_empty(&if_stmt->else_list)) {
if (!nir_cf_list_is_empty_block(&if_stmt->else_list)) {
ureg_fixup_label(c->ureg, label, ureg_get_instruction_number(c->ureg));
ureg_ELSE(c->ureg, &label);
ntt_emit_cf_list(c, &if_stmt->else_list);