gallium: MSVC warning fixes.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Thu, 29 May 2008 13:26:56 +0000 (22:26 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Thu, 29 May 2008 13:28:12 +0000 (22:28 +0900)
Conflicts:

src/gallium/auxiliary/draw/draw_pt_varray.c
src/gallium/auxiliary/draw/draw_pt_varray_tmp.h
src/gallium/auxiliary/draw/draw_pt_vcache.c

src/gallium/auxiliary/draw/draw_pipe_vbuf.c
src/gallium/auxiliary/draw/draw_pt_varray_tmp.h
src/gallium/auxiliary/draw/draw_pt_vcache_tmp.h
src/gallium/auxiliary/tgsi/exec/tgsi_sse2.c
src/gallium/auxiliary/translate/translate_sse.c

index 67b9a9503d2d8b36e57c19b6006c2a1693058b18..d514e28b77f3f8da3ae76e140fe133dcca559505 100644 (file)
@@ -145,7 +145,7 @@ emit_vertex( struct vbuf_stage *vbuf,
       vertex->vertex_id = vbuf->nr_vertices++;
    }
 
-   return vertex->vertex_id;
+   return (ushort)vertex->vertex_id;
 }
 
 
index 6979f6b544f286bffc12c296eff8ff72a33a31b8..7c722457c3cad1e25333e546335af339a8ec6985 100644 (file)
@@ -10,7 +10,8 @@ static void FUNC(struct draw_pt_front_end *frontend,
 
    boolean flatfirst = (draw->rasterizer->flatshade &&
                         draw->rasterizer->flatshade_first);
-   unsigned i, j, flags;
+   unsigned i, j;
+   ushort flags;
    unsigned first, incr;
 
    varray->fetch_start = start;
@@ -200,9 +201,9 @@ static void FUNC(struct draw_pt_front_end *frontend,
       /* These bitflags look a little odd because we submit the
        * vertices as (1,2,0) to satisfy flatshade requirements.
        */
-      const unsigned edge_first  = DRAW_PIPE_EDGE_FLAG_2;
-      const unsigned edge_middle = DRAW_PIPE_EDGE_FLAG_0;
-      const unsigned edge_last   = DRAW_PIPE_EDGE_FLAG_1;
+      const ushort edge_first  = DRAW_PIPE_EDGE_FLAG_2;
+      const ushort edge_middle = DRAW_PIPE_EDGE_FLAG_0;
+      const ushort edge_last   = DRAW_PIPE_EDGE_FLAG_1;
 
       flags = DRAW_PIPE_RESET_STIPPLE | edge_first | edge_middle;
       for (j = 0; j + first <= count; j += i) {
index cf9f394aa3b130c59935cbbe1bd70fffe7bea0f8..5c99a47e49aa0c361caf557122a63ad5e6ac0382 100644 (file)
@@ -10,7 +10,8 @@ static void FUNC( struct draw_pt_front_end *frontend,
 
    boolean flatfirst = (draw->rasterizer->flatshade && 
                         draw->rasterizer->flatshade_first);
-   unsigned i, flags;
+   unsigned i;
+   ushort flags;
 
 
    switch (vcache->input_prim) {
@@ -138,9 +139,9 @@ static void FUNC( struct draw_pt_front_end *frontend,
          /* These bitflags look a little odd because we submit the
           * vertices as (1,2,0) to satisfy flatshade requirements.  
           */
-         const unsigned edge_first  = DRAW_PIPE_EDGE_FLAG_2;
-         const unsigned edge_middle = DRAW_PIPE_EDGE_FLAG_0;
-         const unsigned edge_last   = DRAW_PIPE_EDGE_FLAG_1;
+         const ushort edge_first  = DRAW_PIPE_EDGE_FLAG_2;
+         const ushort edge_middle = DRAW_PIPE_EDGE_FLAG_0;
+         const ushort edge_last   = DRAW_PIPE_EDGE_FLAG_1;
 
          flags = DRAW_PIPE_RESET_STIPPLE | edge_first | edge_middle;
 
index 8018bd7fa45499cb8f6565bbd532662341a5f405..189dc6024d1adcd072ac3c958063440e24af2c37 100755 (executable)
@@ -198,7 +198,7 @@ get_coef(
 static void
 emit_retw(
    struct x86_function  *func,
-   unsigned             size )
+   unsigned short        size )
 {
    x86_retw( func, size );
 }
index 69dd4d3dffe54315eb1eddfe9d542bf813d12633..be48a1473782ea13712bbb77a973153b988fdec8 100644 (file)
@@ -309,7 +309,7 @@ static void get_src_ptr( struct translate_sse *p,
 static void emit_swizzle( struct translate_sse *p,
                          struct x86_reg dest,
                          struct x86_reg src,
-                         unsigned shuffle )
+                         unsigned char shuffle )
 {
    sse_shufps(p->func, dest, src, shuffle);
 }