Mesa (master): nvc0: try to swap immediates to first source too
Christoph Bumiller
chrisbmr at kemper.freedesktop.org
Sat Jan 15 13:17:02 UTC 2011
Module: Mesa
Branch: master
Commit: 21001d2ba79be26f565a6795a907ec266564f4cd
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=21001d2ba79be26f565a6795a907ec266564f4cd
Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date: Sat Jan 15 14:10:27 2011 +0100
nvc0: try to swap immediates to first source too
---
src/gallium/drivers/nvc0/nvc0_pc_optimize.c | 7 +++++++
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 8dce32b..acc72bf 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)
More information about the mesa-commit
mailing list