nir: Print selection control for nir_if.

It's useful to see this information now that aco is going to use it.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18297>
This commit is contained in:
Georg Lehmann 2022-08-29 17:18:56 +02:00 committed by Marge Bot
parent a5c5b172fd
commit 07b3adec12

View file

@ -1553,6 +1553,17 @@ print_if(nir_if *if_stmt, print_state *state, unsigned tabs)
print_tabs(tabs, fp);
fprintf(fp, "if ");
print_src(&if_stmt->condition, state);
switch (if_stmt->control) {
case nir_selection_control_flatten:
fprintf(fp, " /* flatten */");
break;
case nir_selection_control_dont_flatten:
fprintf(fp, " /* don't flatten */");
break;
case nir_selection_control_none:
default:
break;
}
fprintf(fp, " {\n");
foreach_list_typed(nir_cf_node, node, node, &if_stmt->then_list) {
print_cf_node(node, state, tabs + 1);