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

Author: Keith Whitwell <[email protected]>
Date:   Sun Aug 15 17:22:25 2010 +0100

llvmpipe: don't refer to plane->step when dcdx or dcdy would do

---

 src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h 
b/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h
index 6d0be76..905f3df 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h
@@ -51,8 +51,8 @@ TAG(do_block_4)(struct lp_rasterizer_task *task,
 
    for (j = 0; j < NR_PLANES; j++) {
       mask &= ~build_mask(c[j] - 1, 
-                         plane[j].step[1],
-                         plane[j].step[2]);
+                         -plane[j].dcdx,
+                         plane[j].dcdy);
    }
 
    /* Now pass to the shader:
@@ -79,8 +79,8 @@ TAG(do_block_16)(struct lp_rasterizer_task *task,
    partmask = 0;                /* outside one or more trivial accept planes */
 
    for (j = 0; j < NR_PLANES; j++) {
-      const int dcdx = plane[j].step[1] * 4;
-      const int dcdy = plane[j].step[2] * 4;
+      const int dcdx = -plane[j].dcdx * 4;
+      const int dcdy = plane[j].dcdy * 4;
       const int cox = c[j] + plane[j].eo * 4;
       const int cio = c[j] + plane[j].ei * 4 - 1;
 
@@ -164,8 +164,8 @@ TAG(lp_rast_triangle)(struct lp_rasterizer_task *task,
    }
 
    for (j = 0; j < NR_PLANES; j++) {
-      const int dcdx = plane[j].step[1] * 16;
-      const int dcdy = plane[j].step[2] * 16;
+      const int dcdx = -plane[j].dcdx * 16;
+      const int dcdy = plane[j].dcdy * 16;
       const int cox = c[j] + plane[j].eo * 16;
       const int cio = c[j] + plane[j].ei * 16 - 1;
 

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

Reply via email to