From: Francisco Jerez Date: Sun, 31 Oct 2010 18:00:31 +0000 (+0100) Subject: dri/nouveau: Fix type promotion issue on 32bit platforms. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=453b71855294508fce8358134f9bf5316043b834;p=mesa.git dri/nouveau: Fix type promotion issue on 32bit platforms. Fixes some VTX protection errors introduced by e89af209261. --- diff --git a/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c b/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c index 9437fc98788..3d8f43ffb4a 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));