radeon/llvm: Do not use PV/PS if PRED_SEL does not match
authorVincent Lejeune <vljn@ovi.com>
Wed, 1 Aug 2012 20:52:53 +0000 (22:52 +0200)
committerTom Stellard <thomas.stellard@amd.com>
Wed, 15 Aug 2012 21:07:13 +0000 (21:07 +0000)
Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
src/gallium/drivers/r600/r600_asm.c

index 0cca829f2cafe26c0f60f0383222053d10a2f90c..0f2882403e987592a9b876db9d7170f86200dea1 100644 (file)
@@ -927,7 +927,8 @@ static int replace_gpr_with_pv_ps(struct r600_bytecode *bc,
 
                        if (bc->chip_class < CAYMAN) {
                                if (alu->src[src].sel == gpr[4] &&
-                                   alu->src[src].chan == chan[4]) {
+                                   alu->src[src].chan == chan[4] &&
+                                   alu_prev->pred_sel == alu->pred_sel) {
                                        alu->src[src].sel = V_SQ_ALU_SRC_PS;
                                        alu->src[src].chan = 0;
                                        continue;
@@ -936,7 +937,8 @@ static int replace_gpr_with_pv_ps(struct r600_bytecode *bc,
 
                        for (j = 0; j < 4; ++j) {
                                if (alu->src[src].sel == gpr[j] &&
-                                       alu->src[src].chan == j) {
+                                       alu->src[src].chan == j &&
+                                     alu_prev->pred_sel == alu->pred_sel) {
                                        alu->src[src].sel = V_SQ_ALU_SRC_PV;
                                        alu->src[src].chan = chan[j];
                                        break;