diff options
author | Vadim Girlin <[email protected]> | 2013-05-25 22:56:53 +0400 |
---|---|---|
committer | Vadim Girlin <[email protected]> | 2013-05-25 22:56:53 +0400 |
commit | 44a117ab9ac7e18ffddf4d59ae35fe2c266efc1d (patch) | |
tree | 16d0b4a6da346349cea2fc54bb6e403df55340b6 /src/gallium/drivers/r600/sb | |
parent | fd9fe4470be0437c18cbd6d2bc8e568378f88200 (diff) |
r600g/sb: fix handling of preloaded inputs for compute shaders
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/sb')
-rw-r--r-- | src/gallium/drivers/r600/sb/sb_bc_parser.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp index 3ea09cb73b4..c2443b8ef6c 100644 --- a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp +++ b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp @@ -111,6 +111,10 @@ int bc_parser::parse_decls() { 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; } |