gallium: split transfer_inline_write into buffer and texture callbacks
[mesa.git] / src / gallium / tests / graw / fs-fragcoord.c
index 471acbb363926bf3bb71738c1924172480f43f3b..9b85cf79fb28879cbd2b3e075624f738a60532ce 100644 (file)
@@ -64,15 +64,17 @@ set_vertices(void)
    handle = info.ctx->create_vertex_elements_state(info.ctx, 2, ve);
    info.ctx->bind_vertex_elements_state(info.ctx, handle);
 
+   memset(&vbuf, 0, sizeof vbuf);
 
    vbuf.stride = sizeof(struct vertex);
    vbuf.buffer_offset = 0;
-   vbuf.buffer = info.screen->user_buffer_create(info.screen,
-                                            vertices,
-                                            sizeof(vertices),
-                                            PIPE_BIND_VERTEX_BUFFER);
+   vbuf.buffer = pipe_buffer_create_with_data(info.ctx,
+                                              PIPE_BIND_VERTEX_BUFFER,
+                                              PIPE_USAGE_DEFAULT,
+                                              sizeof(vertices),
+                                              vertices);
 
-   info.ctx->set_vertex_buffers(info.ctx, 1, &vbuf);
+   info.ctx->set_vertex_buffers(info.ctx, 0, 1, &vbuf);
 }
 
 
@@ -183,7 +185,7 @@ draw(void)
               PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL,
               &clear_color, 1.0, 0);
    util_draw_arrays(info.ctx, PIPE_PRIM_QUADS, 0, NUM_VERTS);
-   info.ctx->flush(info.ctx, NULL);
+   info.ctx->flush(info.ctx, NULL, 0);
 
 #if 0
    /* At the moment, libgraw leaks out/makes available some of the