mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 00:49:04 +02:00
intel/vec4: Don't emit an empty ELSE
This matches the behavior of fs_visitor::nir_emit_if. This is not technically wrong, but the cfg_t generates some invalid parent / child links in this case. Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25216>
This commit is contained in:
parent
f3d99e3535
commit
19db6f1cd9
1 changed files with 4 additions and 4 deletions
|
|
@ -101,10 +101,10 @@ vec4_visitor::nir_emit_if(nir_if *if_stmt)
|
|||
|
||||
nir_emit_cf_list(&if_stmt->then_list);
|
||||
|
||||
/* note: if the else is empty, dead CF elimination will remove it */
|
||||
emit(BRW_OPCODE_ELSE);
|
||||
|
||||
nir_emit_cf_list(&if_stmt->else_list);
|
||||
if (!nir_cf_list_is_empty_block(&if_stmt->else_list)) {
|
||||
emit(BRW_OPCODE_ELSE);
|
||||
nir_emit_cf_list(&if_stmt->else_list);
|
||||
}
|
||||
|
||||
emit(BRW_OPCODE_ENDIF);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue