vbuf.stride = sizeof(struct vertex);
vbuf.buffer_offset = 0;
- vbuf.buffer = pipe_buffer_create_with_data(info.ctx,
+ vbuf.buffer.resource = pipe_buffer_create_with_data(info.ctx,
PIPE_BIND_VERTEX_BUFFER,
- PIPE_USAGE_STATIC,
+ PIPE_USAGE_DEFAULT,
bytes,
vertices);
- info.ctx->set_vertex_buffers(info.ctx, 1, &vbuf);
+ info.ctx->set_vertex_buffers(info.ctx, 0, 1, &vbuf);
}
PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL,
&clear_color, 1.0, 0);
- q1 = info.ctx->create_query(info.ctx, PIPE_QUERY_OCCLUSION_COUNTER);
- q2 = info.ctx->create_query(info.ctx, PIPE_QUERY_OCCLUSION_COUNTER);
+ q1 = info.ctx->create_query(info.ctx, PIPE_QUERY_OCCLUSION_COUNTER, 0);
+ q2 = info.ctx->create_query(info.ctx, PIPE_QUERY_OCCLUSION_COUNTER, 0);
/* draw first, large object */
set_vertices(obj1_vertices, sizeof(obj1_vertices));
if (res2.u64 < expected2_min || res2.u64 > expected2_max)
printf(" Failure: result2 should be near %d\n", expected2);
- info.ctx->flush(info.ctx, NULL);
+ info.ctx->flush(info.ctx, NULL, 0);
graw_util_flush_front(&info);