{
struct blitter_context base;
- struct u_upload_mgr *upload;
-
float vertices[4][2][4]; /**< {pos, color} or {pos, texcoord} */
/* Templates for various state objects. */
for (i = 0; i < 4; i++)
ctx->vertices[i][0][3] = 1; /*v.w*/
- ctx->upload = u_upload_create(pipe, 65536, PIPE_BIND_VERTEX_BUFFER,
- PIPE_USAGE_STREAM);
-
return &ctx->base;
}
pipe->delete_sampler_state(pipe, ctx->sampler_state_rect);
pipe->delete_sampler_state(pipe, ctx->sampler_state_linear);
pipe->delete_sampler_state(pipe, ctx->sampler_state);
- u_upload_destroy(ctx->upload);
FREE(ctx);
}
vb.stride = 8 * sizeof(float);
- u_upload_data(ctx->upload, 0, sizeof(ctx->vertices), 4, ctx->vertices,
+ u_upload_data(pipe->stream_uploader, 0, sizeof(ctx->vertices), 4, ctx->vertices,
&vb.buffer_offset, &vb.buffer);
if (!vb.buffer)
return;
- u_upload_unmap(ctx->upload);
+ u_upload_unmap(pipe->stream_uploader);
pipe->set_vertex_buffers(pipe, ctx->base.vb_slot, 1, &vb);
util_draw_arrays_instanced(pipe, PIPE_PRIM_TRIANGLE_FAN, 0, 4,
return;
}
- u_upload_data(ctx->upload, 0, num_channels*4, 4, clear_value,
+ u_upload_data(pipe->stream_uploader, 0, num_channels*4, 4, clear_value,
&vb.buffer_offset, &vb.buffer);
if (!vb.buffer)
goto out;