From: Dave Airlie Date: Mon, 19 Sep 2011 09:20:10 +0000 (+0100) Subject: graw: fix tests to build on msvc again. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f8c190b0ab0f394ab1c96b7e80b728dd2577a6ce;p=mesa.git graw: fix tests to build on msvc again. Should fix https://bugs.freedesktop.org/show_bug.cgi?id=40997 Signed-off-by: Dave Airlie --- diff --git a/src/gallium/tests/graw/clear.c b/src/gallium/tests/graw/clear.c index 9c9eeebe0af..c6c645e8a46 100644 --- a/src/gallium/tests/graw/clear.c +++ b/src/gallium/tests/graw/clear.c @@ -26,7 +26,7 @@ static void *window = NULL; static void draw( void ) { - union pipe_color_union clear_color = { .f = {1, 0, 1, 1} }; + union pipe_color_union clear_color = { {1, 0, 1, 1} }; ctx->clear(ctx, PIPE_CLEAR_COLOR, &clear_color, 0, 0); ctx->flush(ctx, NULL); diff --git a/src/gallium/tests/graw/fs-test.c b/src/gallium/tests/graw/fs-test.c index 47bc101846f..d9e70f07476 100644 --- a/src/gallium/tests/graw/fs-test.c +++ b/src/gallium/tests/graw/fs-test.c @@ -272,7 +272,7 @@ static void set_fragment_shader( const char *filename ) static void draw( void ) { - union pipe_color_union clear_color = { .f = {.1,.3,.5,0} }; + union pipe_color_union clear_color = { {.1,.3,.5,0} }; ctx->clear(ctx, PIPE_CLEAR_COLOR, &clear_color, 0, 0); util_draw_arrays(ctx, PIPE_PRIM_TRIANGLES, 0, 3); diff --git a/src/gallium/tests/graw/gs-test.c b/src/gallium/tests/graw/gs-test.c index 511f5d53438..e95306e8272 100644 --- a/src/gallium/tests/graw/gs-test.c +++ b/src/gallium/tests/graw/gs-test.c @@ -331,7 +331,7 @@ static void set_geometry_shader( void ) static void draw( void ) { - union pipe_color_union clear_color = { .f = {.1,.3,.5,0} }; + union pipe_color_union clear_color = { {.1,.3,.5,0} }; ctx->clear(ctx, PIPE_CLEAR_COLOR, &clear_color, 0, 0); if (draw_strip) diff --git a/src/gallium/tests/graw/quad-sample.c b/src/gallium/tests/graw/quad-sample.c index 152e1edb3fd..561234694f4 100644 --- a/src/gallium/tests/graw/quad-sample.c +++ b/src/gallium/tests/graw/quad-sample.c @@ -146,7 +146,7 @@ static void set_fragment_shader( void ) static void draw( void ) { - union pipe_color_union clear_color = { .f = {.5,.5,.5,1} }; + union pipe_color_union clear_color = { {.5,.5,.5,1} }; ctx->clear(ctx, PIPE_CLEAR_COLOR, &clear_color, 0, 0); util_draw_arrays(ctx, PIPE_PRIM_QUADS, 0, 4); diff --git a/src/gallium/tests/graw/quad-tex.c b/src/gallium/tests/graw/quad-tex.c index ca742a699d4..a2749cab369 100644 --- a/src/gallium/tests/graw/quad-tex.c +++ b/src/gallium/tests/graw/quad-tex.c @@ -143,7 +143,7 @@ static void set_fragment_shader( void ) static void draw( void ) { - union pipe_color_union clear_color = { .f = {.5,.5,.5,1} }; + union pipe_color_union clear_color = { {.5,.5,.5,1} }; ctx->clear(ctx, PIPE_CLEAR_COLOR, &clear_color, 0, 0); util_draw_arrays(ctx, PIPE_PRIM_QUADS, 0, 4); diff --git a/src/gallium/tests/graw/shader-leak.c b/src/gallium/tests/graw/shader-leak.c index 098faec5896..57cd2dc2b12 100644 --- a/src/gallium/tests/graw/shader-leak.c +++ b/src/gallium/tests/graw/shader-leak.c @@ -137,7 +137,7 @@ set_fragment_shader( void ) static void draw( void ) { - union pipe_color_union clear_color = { .f = {0,0,0,1} }; + union pipe_color_union clear_color = { {0,0,0,1} }; int i; printf("Creating %d shaders\n", num_iters); diff --git a/src/gallium/tests/graw/tri-gs.c b/src/gallium/tests/graw/tri-gs.c index 3c9e56882e5..43486636ff7 100644 --- a/src/gallium/tests/graw/tri-gs.c +++ b/src/gallium/tests/graw/tri-gs.c @@ -159,7 +159,7 @@ static void set_geometry_shader( void ) static void draw( void ) { - union pipe_color_union clear_color = { .f = {1,0,1,1} }; + union pipe_color_union clear_color = { {1,0,1,1} }; ctx->clear(ctx, PIPE_CLEAR_COLOR, &clear_color, 0, 0); util_draw_arrays(ctx, PIPE_PRIM_TRIANGLES, 0, 3); diff --git a/src/gallium/tests/graw/tri-instanced.c b/src/gallium/tests/graw/tri-instanced.c index 50389e08725..521dab04da9 100644 --- a/src/gallium/tests/graw/tri-instanced.c +++ b/src/gallium/tests/graw/tri-instanced.c @@ -196,7 +196,7 @@ static void set_fragment_shader( void ) static void draw( void ) { - union pipe_color_union clear_color = { .f = {1,0,1,1} }; + union pipe_color_union clear_color = { {1,0,1,1} }; struct pipe_draw_info info; ctx->clear(ctx, PIPE_CLEAR_COLOR, &clear_color, 0, 0); diff --git a/src/gallium/tests/graw/tri.c b/src/gallium/tests/graw/tri.c index 2b779ff8704..11f8bb35caf 100644 --- a/src/gallium/tests/graw/tri.c +++ b/src/gallium/tests/graw/tri.c @@ -136,7 +136,7 @@ static void set_fragment_shader( void ) static void draw( void ) { - union pipe_color_union clear_color = { .f = {1,0,1,1} }; + union pipe_color_union clear_color = { {1,0,1,1} }; ctx->clear(ctx, PIPE_CLEAR_COLOR, &clear_color, 0, 0); util_draw_arrays(ctx, PIPE_PRIM_TRIANGLES, 0, 3); diff --git a/src/gallium/tests/graw/vs-test.c b/src/gallium/tests/graw/vs-test.c index b98c8f53562..74b3273192c 100644 --- a/src/gallium/tests/graw/vs-test.c +++ b/src/gallium/tests/graw/vs-test.c @@ -223,7 +223,7 @@ static void set_fragment_shader( void ) static void draw( void ) { - union pipe_color_union clear_color = { .f = {.1,.3,.5,0} }; + union pipe_color_union clear_color = { {.1,.3,.5,0} }; ctx->clear(ctx, PIPE_CLEAR_COLOR, &clear_color, 0, 0); util_draw_arrays(ctx, PIPE_PRIM_POINTS, 0, Elements(vertices));