Mesa (master): llvmpipe: fix off-by-one in tri_16

Keith Whitwell keithw at kemper.freedesktop.org
Fri Oct 8 16:32:06 UTC 2010


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

Author: Keith Whitwell <keithw at vmware.com>
Date:   Tue Oct  5 16:50:22 2010 +0100

llvmpipe: fix off-by-one in tri_16

---

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

diff --git a/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h b/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h
index c8f9956..2f03229 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h
@@ -309,7 +309,7 @@ TRI_16(struct lp_rasterizer_task *task,
       partial_mask &= ~(1 << i);
 
       for (j = 0; j < NR_PLANES; j++) {
-         const int cx = (plane[j].c 
+         const int cx = (plane[j].c - 1
 			 - plane[j].dcdx * px
 			 + plane[j].dcdy * py) * 4;
 




More information about the mesa-commit mailing list