From 21001d2ba79be26f565a6795a907ec266564f4cd Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Sat, 15 Jan 2011 14:10:27 +0100 Subject: [PATCH] nvc0: try to swap immediates to first source too --- src/gallium/drivers/nvc0/nvc0_pc_optimize.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/drivers/nvc0/nvc0_pc_optimize.c b/src/gallium/drivers/nvc0/nvc0_pc_optimize.c index 8dce32b40c3..acc72bff14c 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) -- 2.30.2