From: Christoph Bumiller Date: Wed, 16 Feb 2011 10:42:28 +0000 (+0100) Subject: nvc0: don't swap sources if either value is not in a GPR X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bb2c8e709975223e8131b7c627c08eeb4f3ec88d;p=mesa.git nvc0: don't swap sources if either value is not in a GPR The memory / immediate source should already be in the only valid position. --- diff --git a/src/gallium/drivers/nvc0/nvc0_pc_optimize.c b/src/gallium/drivers/nvc0/nvc0_pc_optimize.c index 12a31493c75..3d03400518b 100644 --- a/src/gallium/drivers/nvc0/nvc0_pc_optimize.c +++ b/src/gallium/drivers/nvc0/nvc0_pc_optimize.c @@ -245,6 +245,9 @@ check_swap_src_0_1(struct nv_instruction *nvi) return; assert(src0 && src1 && src0->value && src1->value); + if (src1->value->reg.file != NV_FILE_GPR) + return; + if (is_cspace_load(src0->value->insn)) { if (!is_cspace_load(src1->value->insn)) { nvi->src[0] = src1;