Mesa (nv50-compiler): nv50: fix can_load check for 3rd source

Christoph Bumiller chrisbmr at kemper.freedesktop.org
Thu Sep 9 17:21:34 UTC 2010


Module: Mesa
Branch: nv50-compiler
Commit: 6997da9f3cf22b9d11ffdfa6ad25b68ef4913fc3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6997da9f3cf22b9d11ffdfa6ad25b68ef4913fc3

Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date:   Thu Sep  9 19:09:38 2010 +0200

nv50: fix can_load check for 3rd source

---

 src/gallium/drivers/nv50/nv50_pc.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/nv50/nv50_pc.c b/src/gallium/drivers/nv50/nv50_pc.c
index 637b3cf..e4df742 100644
--- a/src/gallium/drivers/nv50/nv50_pc.c
+++ b/src/gallium/drivers/nv50/nv50_pc.c
@@ -112,13 +112,11 @@ nv50_nvi_can_load(struct nv_instruction *nvi, int s, struct nv_value *value)
       if (s == 0 && (value->reg.file == NV_FILE_MEM_S ||
                      value->reg.file == NV_FILE_MEM_P))
          return TRUE;
-      if (s == 1 &&
-          value->reg.file >= NV_FILE_MEM_C(0) &&
-          value->reg.file <= NV_FILE_MEM_C(15))
-         return TRUE;
-      if (s == 2 && nvi->src[1]->value->reg.file == NV_FILE_GPR)
-         return TRUE;
-      return FALSE;
+      if (value->reg.file < NV_FILE_MEM_C(0) ||
+          value->reg.file > NV_FILE_MEM_C(15))
+         return FALSE;
+      return (s == 1) ||
+         ((s == 2) && (nvi->src[1]->value->reg.file == NV_FILE_GPR));
    case NV_OP_MOV:
       assert(s == 0);
       return /* TRUE */ FALSE; /* don't turn MOVs into loads */




More information about the mesa-commit mailing list