dri/nouveau: Fix type promotion issue on 32bit platforms.
authorFrancisco Jerez <currojerez@riseup.net>
Sun, 31 Oct 2010 18:00:31 +0000 (19:00 +0100)
committerFrancisco Jerez <currojerez@riseup.net>
Sun, 31 Oct 2010 21:07:10 +0000 (22:07 +0100)
Fixes some VTX protection errors introduced by e89af209261.

src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c

index 9437fc9878802f6c28ad4fac14d62f97db4f15b7..3d8f43ffb4aa7d978059fecb3e2046009f21b1f2 100644 (file)
@@ -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));