struct hud_context {
struct pipe_context *pipe;
struct cso_context *cso;
- struct u_upload_mgr *uploader;
struct hud_batch_query_context *batch_query;
struct list_head pane_list;
v->num_vertices = 0;
v->max_num_vertices = num_vertices;
v->vbuf.stride = stride;
- u_upload_alloc(hud->uploader, 0, v->vbuf.stride * v->max_num_vertices,
+ u_upload_alloc(hud->pipe->stream_uploader, 0, v->vbuf.stride * v->max_num_vertices,
16, &v->vbuf.buffer_offset, &v->vbuf.buffer,
(void**)&v->vertices);
}
}
/* unmap the uploader's vertex buffer before drawing */
- u_upload_unmap(hud->uploader);
+ u_upload_unmap(pipe->stream_uploader);
/* draw accumulated vertices for background quads */
cso_set_blend(cso, &hud->alpha_blend);
hud->pipe = pipe;
hud->cso = cso;
- hud->uploader = u_upload_create(pipe, 256 * 1024,
- PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_STREAM);
/* font */
if (!util_font_create(pipe, UTIL_FONT_FIXED_8X13, &hud->font)) {
- u_upload_destroy(hud->uploader);
FREE(hud);
return NULL;
}
if (!tgsi_text_translate(fragment_shader_text, tokens, ARRAY_SIZE(tokens))) {
assert(0);
pipe_resource_reference(&hud->font.texture, NULL);
- u_upload_destroy(hud->uploader);
FREE(hud);
return NULL;
}
if (!tgsi_text_translate(vertex_shader_text, tokens, ARRAY_SIZE(tokens))) {
assert(0);
pipe_resource_reference(&hud->font.texture, NULL);
- u_upload_destroy(hud->uploader);
FREE(hud);
return NULL;
}
pipe->delete_vs_state(pipe, hud->vs);
pipe_sampler_view_reference(&hud->font_sampler_view, NULL);
pipe_resource_reference(&hud->font.texture, NULL);
- u_upload_destroy(hud->uploader);
FREE(hud);
}