prev_shader.info.uses_instanceid is set by si_nir_lower_vs_inputs()
when attribute divisor is used.
Fixes:
894d92995cd ("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>
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. */