Mesa (master): nvc0: don't swap sources if either value is not in a GPR

Christoph Bumiller chrisbmr at kemper.freedesktop.org
Wed Feb 16 14:48:36 UTC 2011


Module: Mesa
Branch: master
Commit: bb2c8e709975223e8131b7c627c08eeb4f3ec88d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bb2c8e709975223e8131b7c627c08eeb4f3ec88d

Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date:   Wed Feb 16 11:42:28 2011 +0100

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.

---

 src/gallium/drivers/nvc0/nvc0_pc_optimize.c |    3 +++
 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 12a3149..3d03400 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;




More information about the mesa-commit mailing list