summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-02-16 11:42:28 +0100
committerChristoph Bumiller <[email protected]>2011-02-16 15:45:31 +0100
commitbb2c8e709975223e8131b7c627c08eeb4f3ec88d (patch)
tree1fa98230d2827326a0fa937d63b63fa1be381048 /src
parent2fa35eedd9dbc193904256e6004913e94a044158 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_pc_optimize.c3
1 files changed, 3 insertions, 0 deletions
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;