summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Girlin <[email protected]>2013-07-17 12:00:43 +0400
committerVadim Girlin <[email protected]>2013-07-17 18:27:30 +0400
commit96efa4cdf48f72fd6b165c4a725f0d1542159a5e (patch)
treec974a0543b8fe6e9b23c77a33712310abfbd0c4e
parent81d388136708371a111b0ce5e464925c2a052ab6 (diff)
r600g/sb: fix handling of PS in source bytecode on cayman
Actually PS doesn't make sense for cayman and isn't even mentioned in cayman docs, but llvm backend currently uses it in bytecode and, assuming that hw seems to be mostly ok with it, this will allow sb to parse such source bytecode correctly. Signed-off-by: Vadim Girlin <[email protected]>
-rw-r--r--src/gallium/drivers/r600/sb/sb_bc_parser.cpp5
1 files changed, 5 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 a7e712816b1..67e6c3a582d 100644
--- a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
+++ b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
@@ -385,6 +385,11 @@ int bc_parser::prepare_alu_group(cf_node* cf, alu_group_node *g) {
} else if (src.sel == ALU_SRC_PS || src.sel == ALU_SRC_PV) {
unsigned pgroup = !cgroup, prev_slot = src.sel == ALU_SRC_PS ?
SLOT_TRANS : src.chan;
+
+ // XXX shouldn't happen but llvm backend uses PS on cayman
+ if (prev_slot == SLOT_TRANS && ctx.is_cayman())
+ prev_slot = SLOT_X;
+
alu_node *prev_alu = slots[pgroup][prev_slot];
assert(prev_alu);