For compute shaders we need to let the backend know that
GPRs 0 and 1 are preloaded with some compute-specific input
values, otherwise any use of these regs without previous
definition is considered as undefined value and usually
is simply replaced with 0.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
if (!pshader) {
if (gpr_reladdr)
sh->add_gpr_array(0, bc->ngpr, 0x0F);
+
+ // compute shaders have some values preloaded in R0, R1
+ sh->add_input(0 /* GPR */, true /* preloaded */, 0x0F /* mask */);
+ sh->add_input(1 /* GPR */, true /* preloaded */, 0x0F /* mask */);
return 0;
}