nir/nir_to_tgsi: Add support for "if" statements with !native_integers

Previously we've only used this on HW that had all ifs lowered.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14096>
This commit is contained in:
Emma Anholt 2021-12-06 12:25:02 -08:00 committed by Marge Bot
parent 0b651db795
commit f1647525ab

View file

@ -2324,7 +2324,12 @@ static void
ntt_emit_if(struct ntt_compile *c, nir_if *if_stmt)
{
unsigned label;
ureg_UIF(c->ureg, c->if_cond, &label);
if (c->native_integers)
ureg_UIF(c->ureg, c->if_cond, &label);
else
ureg_IF(c->ureg, c->if_cond, &label);
ntt_emit_cf_list(c, &if_stmt->then_list);
if (!nir_cf_list_is_empty_block(&if_stmt->else_list)) {