X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Ftests%2Fgraw%2Fvs-test.c;h=0274ee0b5420e21c32753eacc52207ab6d6cb8b1;hb=598cc1f74d7ae924e84dee801b456ab7b0b22f84;hp=6c6f065af53e5d69099c3395d4da1d4df518e5e0;hpb=369e46888904c6d379b8b477d9242cff1608e30e;p=mesa.git diff --git a/src/gallium/tests/graw/vs-test.c b/src/gallium/tests/graw/vs-test.c index 6c6f065af53..0274ee0b542 100644 --- a/src/gallium/tests/graw/vs-test.c +++ b/src/gallium/tests/graw/vs-test.c @@ -170,6 +170,8 @@ static void set_vertices( void ) } } + memset(&vbuf, 0, sizeof vbuf); + vbuf.stride = sizeof( struct vertex ); vbuf.buffer_offset = 0; vbuf.buffer = pipe_buffer_create_with_data(ctx, @@ -178,7 +180,7 @@ static void set_vertices( void ) sizeof(vertices), vertices); - ctx->set_vertex_buffers(ctx, 1, &vbuf); + ctx->set_vertex_buffers(ctx, 0, 1, &vbuf); } static void set_vertex_shader( void ) @@ -228,7 +230,7 @@ static void draw( void ) ctx->clear(ctx, PIPE_CLEAR_COLOR, &clear_color, 0, 0); util_draw_arrays(ctx, PIPE_PRIM_POINTS, 0, Elements(vertices)); - ctx->flush(ctx, NULL); + ctx->flush(ctx, NULL, 0); graw_save_surface_to_file(ctx, surf, NULL); @@ -413,7 +415,6 @@ static void init( void ) exit(4); surf_tmpl.format = templat.format; - surf_tmpl.usage = PIPE_BIND_RENDER_TARGET; surf_tmpl.u.tex.level = 0; surf_tmpl.u.tex.first_layer = 0; surf_tmpl.u.tex.last_layer = 0;