summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nvc0
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2011-01-15 14:10:27 +0100
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2011-01-15 14:14:55 +0100
commit21001d2ba79be26f565a6795a907ec266564f4cd (patch)
tree9e19d5f9b2429391b78473bb1f50498e189e62cf /src/gallium/drivers/nvc0
parent52474d424622c13d7f37f5e954d92d88eefdeac9 (diff)
nvc0: try to swap immediates to first source too
Diffstat (limited to 'src/gallium/drivers/nvc0')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_pc_optimize.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_pc_optimize.c b/src/gallium/drivers/nvc0/nvc0_pc_optimize.c
index 8dce32b40c..acc72bff14 100644
--- a/src/gallium/drivers/nvc0/nvc0_pc_optimize.c
+++ b/src/gallium/drivers/nvc0/nvc0_pc_optimize.c
@@ -249,6 +249,13 @@ check_swap_src_0_1(struct nv_instruction *nvi)
nvi->src[0] = src1;
nvi->src[1] = src0;
}
+ } else
+ if (is_immd32_load(src0->value->insn)) {
+ if (!is_cspace_load(src1->value->insn) &&
+ !is_immd32_load(src1->value->insn)) {
+ nvi->src[0] = src1;
+ nvi->src[1] = src0;
+ }
}
if (nvi->src[0] != src0 && nvi->opcode == NV_OP_SET)