From: Christoph Bumiller Date: Sat, 15 Jan 2011 13:10:27 +0000 (+0100) Subject: nvc0: try to swap immediates to first source too X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=21001d2ba79be26f565a6795a907ec266564f4cd;p=mesa.git nvc0: try to swap immediates to first source too --- 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)