gallium: Fix build on Windows.
authorMichal Krol <michal@tungstengraphics.com>
Wed, 13 Feb 2008 16:51:41 +0000 (17:51 +0100)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Fri, 15 Feb 2008 02:29:58 +0000 (11:29 +0900)
src/mesa/pipe/draw/draw_wide_prims.c
src/mesa/pipe/i915simple/i915_surface.c
src/mesa/pipe/softpipe/sp_surface.c

index 37b60a6da198559752a5cf53f131f4c575913952..655774b155f5a0cc18dce621f044390cdff498c8 100644 (file)
@@ -175,7 +175,7 @@ static void wide_line_aa(struct draw_stage *stage,
    float *pos;
    float dx = header->v[1]->data[0][0] - header->v[0]->data[0][0];
    float dy = header->v[1]->data[0][1] - header->v[0]->data[0][1];
-   const float len = sqrt(dx * dx + dy * dy);
+   const float len = (float) sqrt(dx * dx + dy * dy);
    uint i;
 
    dx = dx * half_width / len;
index 6d4b8a0aa9f7a2202f0e1ebcf58794211fc86cbd..de0cc5fe06aeccd9ead17204729a6d84e829674e 100644 (file)
@@ -99,7 +99,7 @@ i915_surface_copy(struct pipe_context *pipe,
                      dstx, dsty, 
                      width, height, 
                      pipe_surface_map(src), 
-                     do_flip ? -src->pitch : src->pitch, 
+                     do_flip ? -(int) src->pitch : src->pitch, 
                      srcx, do_flip ? 1 - srcy - height : srcy);
 
       pipe_surface_unmap(src);
index 5c6ed3b8d9450028845e3c8c04fa65f3838ef000..8802ced1874564593b72640f4906874307fcbe62 100644 (file)
@@ -54,7 +54,7 @@ sp_surface_copy(struct pipe_context *pipe,
                   dstx, dsty,
                   width, height,
                   pipe_surface_map(src),
-                  do_flip ? -src->pitch : src->pitch,
+                  do_flip ? -(int) src->pitch : src->pitch,
                   srcx, do_flip ? 1 - srcy - height : srcy);
 
    pipe_surface_unmap(src);