radeonsi: fix uses_instanceid for merged mono shader stage

prev_shader.info.uses_instanceid is set by si_nir_lower_vs_inputs()
when attribute divisor is used.

Fixes: 894d92995c ("radeonsi: monolithic VS emit prolog in nir directly")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9042
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23101>
This commit is contained in:
Qiang Yu
2023-05-18 20:15:17 +08:00
committed by Marge Bot
parent b5ae645c16
commit ce161ce463

View File

@@ -1125,7 +1125,10 @@ bool si_llvm_compile_shader(struct si_screen *sscreen, struct ac_llvm_compiler *
si_llvm_dispose(&ctx);
return false;
}
shader->info.uses_instanceid |= prev_shader.selector->info.uses_instanceid;
shader->info.uses_instanceid |=
prev_shader.selector->info.uses_instanceid || prev_shader.info.uses_instanceid;
parts[0] = ctx.main_fn;
/* Preserve main arguments. */