diff options
author | Michal <[email protected]> | 2007-11-18 13:20:57 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2007-11-22 11:43:04 +0000 |
commit | 0e31e24659a1e691bdfa213fcd073bbfaa4ed6e9 (patch) | |
tree | 651c6dce46e5fed4afd5d75d68d1503676e4ae74 /src/mesa/pipe/draw | |
parent | 5961732c1b59403b4e736fa354a64d4a0e5d8af2 (diff) |
Fix compatibility issues between gcc and msvc.
Diffstat (limited to 'src/mesa/pipe/draw')
-rw-r--r-- | src/mesa/pipe/draw/draw_prim.c | 2 | ||||
-rw-r--r-- | src/mesa/pipe/draw/draw_vertex_fetch.c | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/pipe/draw/draw_prim.c b/src/mesa/pipe/draw/draw_prim.c index e4a65b9f243..f8fc23b5101 100644 --- a/src/mesa/pipe/draw/draw_prim.c +++ b/src/mesa/pipe/draw/draw_prim.c @@ -61,7 +61,7 @@ static void draw_prim_queue_flush( struct draw_context *draw ) unsigned i; if (0) - printf("Flushing with %d prims, %d verts\n", + fprintf(stdout,"Flushing with %d prims, %d verts\n", draw->pq.queue_nr, draw->vs.queue_nr); /* Make sure all vertices are available/shaded: diff --git a/src/mesa/pipe/draw/draw_vertex_fetch.c b/src/mesa/pipe/draw/draw_vertex_fetch.c index b510a4dbba2..88fa80dddcd 100644 --- a/src/mesa/pipe/draw/draw_vertex_fetch.c +++ b/src/mesa/pipe/draw/draw_vertex_fetch.c @@ -80,6 +80,13 @@ fetch_attrib4(const void *ptr, unsigned format, float attrib[4]) attrib[0] = (float) ((int *) ptr)[0]; break; + case PIPE_FORMAT_U_A8_R8_G8_B8: + attrib[0] = (float) ((unsigned char *) ptr)[2] / 255.0f; + attrib[1] = (float) ((unsigned char *) ptr)[1] / 255.0f; + attrib[2] = (float) ((unsigned char *) ptr)[0] / 255.0f; + attrib[3] = (float) ((unsigned char *) ptr)[3] / 255.0f; + break; + default: assert(0); } |