From 56227f875bdff6ef4fd53b09ba267c786ae9dac2 Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Wed, 1 Aug 2012 22:52:53 +0200 Subject: [PATCH] radeon/llvm: Do not use PV/PS if PRED_SEL does not match Signed-off-by: Tom Stellard --- src/gallium/drivers/r600/r600_asm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c index 0cca829f2ca..0f2882403e9 100644 --- a/src/gallium/drivers/r600/r600_asm.c +++ b/src/gallium/drivers/r600/r600_asm.c @@ -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; -- 2.30.2