Mesa (master): nvc0: fix FP header clip distance mask

Christoph Bumiller chrisbmr at kemper.freedesktop.org
Mon Jan 9 23:44:38 UTC 2012


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

Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date:   Sun Jan  8 18:01:55 2012 +0100

nvc0: fix FP header clip distance mask

---

 src/gallium/drivers/nvc0/nvc0_program.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/nvc0/nvc0_program.c b/src/gallium/drivers/nvc0/nvc0_program.c
index a982cc1..42cd21d 100644
--- a/src/gallium/drivers/nvc0/nvc0_program.c
+++ b/src/gallium/drivers/nvc0/nvc0_program.c
@@ -453,20 +453,20 @@ nvc0_fp_gen_header(struct nvc0_program *fp, struct nv50_ir_prog_info *info)
       for (c = 0; c < 4; ++c) {
          if (!(info->in[i].mask & (1 << c)))
             continue;
-	 a = info->in[i].slot[c];
+         a = info->in[i].slot[c];
          if (info->in[i].slot[0] >= (0x060 / 4) &&
              info->in[i].slot[0] <= (0x07c / 4)) {
             fp->hdr[5] |= 1 << (24 + (a - 0x060 / 4));
          } else
-         if (info->in[i].slot[0] == (0x2e0 / 4)) {
-            if (c <= 1)
-               fp->hdr[14] |= 1 << (24 + c);
+         if (info->in[i].slot[0] >= (0x2c0 / 4) &&
+             info->in[i].slot[0] <= (0x2fc / 4)) {
+            fp->hdr[14] |= (1 << (a - 0x280 / 4)) & 0x03ff0000;
          } else {
             if (info->in[i].slot[c] < (0x040 / 4) ||
                 info->in[i].slot[c] > (0x380 / 4))
                continue;
             a *= 2;
-            if (info->in[i].slot[0] >= (0x2c0 / 4))
+            if (info->in[i].slot[0] >= (0x300 / 4))
                a -= 32;
             fp->hdr[4 + a / 32] |= m << (a % 32);
          }




More information about the mesa-commit mailing list