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

Author: Christoph Bumiller <[email protected]>
Date:   Thu Sep  3 12:54:41 2009 +0200

nv50: move centroid, flat bits when making interp long

Before this, just the perspective divide bit was moved in
convert_to_long of the load interpolant instruction.

---

 src/gallium/drivers/nv50/nv50_program.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/nv50/nv50_program.c 
b/src/gallium/drivers/nv50/nv50_program.c
index 1cb1ce7..4a83852 100644
--- a/src/gallium/drivers/nv50/nv50_program.c
+++ b/src/gallium/drivers/nv50/nv50_program.c
@@ -1106,10 +1106,10 @@ convert_to_long(struct nv50_pc *pc, struct 
nv50_program_exec *e)
                m = 0xffff7fff;
                break;
        case 0x8:
-               /* INTERP */
-               m = ~0x02000000;
-               if (e->inst[0] & 0x02000000)
-                       q = 0x00020000;
+               /* INTERP (move centroid, perspective and flat bits) */
+               m = ~0x03000100;
+               q = (e->inst[0] & (3 << 24)) >> (24 - 16);
+               q |= (e->inst[0] & (1 << 8)) << (18 - 8);
                break;
        case 0x9:
                /* RCP */

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to