Mesa (master): dri/nouveau: Fix type promotion issue on 32bit platforms.

Francisco Jerez currojerez at kemper.freedesktop.org
Sun Oct 31 21:13:09 UTC 2010


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

Author: Francisco Jerez <currojerez at riseup.net>
Date:   Sun Oct 31 19:00:31 2010 +0100

dri/nouveau: Fix type promotion issue on 32bit platforms.

Fixes some VTX protection errors introduced by e89af209261.

---

 src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c b/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
index 9437fc9..3d8f43f 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
@@ -269,7 +269,7 @@ check_update_array(struct nouveau_array *a, unsigned offset,
 
 	if (a->bo == bo) {
 		if (delta < 0)
-			delta = (offset - (long)a->offset) / a->stride;
+			delta = ((int)offset - (int)a->offset) / a->stride;
 
 		dirty = (delta < 0 ||
 			 offset != (a->offset + delta * a->stride));




More information about the mesa-commit mailing list