dri/nouveau: Avoid mask overflow on nv04_surface_fill.
authorFrancisco Jerez <currojerez@riseup.net>
Sun, 21 Feb 2010 13:35:56 +0000 (14:35 +0100)
committerFrancisco Jerez <currojerez@riseup.net>
Thu, 25 Feb 2010 17:37:35 +0000 (18:37 +0100)
src/mesa/drivers/dri/nouveau/nv04_surface.c

index 86fa1dcd7a639738353970d9a03d098ec7b1905e..a219779b865e1124c912b8e87f790f7c1efaadf6 100644 (file)
@@ -369,7 +369,7 @@ nv04_surface_fill(GLcontext *ctx,
        BEGIN_RING(chan, patt, NV04_IMAGE_PATTERN_COLOR_FORMAT, 1);
        OUT_RING  (chan, rect_format(dst->format));
        BEGIN_RING(chan, patt, NV04_IMAGE_PATTERN_MONOCHROME_COLOR1, 1);
-       OUT_RING  (chan, mask | ~0 << (8 * dst->cpp));
+       OUT_RING  (chan, mask | ~0ll << (8 * dst->cpp));
 
        BEGIN_RING(chan, rect, NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT, 1);
        OUT_RING  (chan, rect_format(dst->format));