mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
gallium/vl: use the common uploader
Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com> Tested-by: Charmaine Lee <charmainel@vmware.com>
This commit is contained in:
parent
b1dc347822
commit
d3de8e1096
3 changed files with 2 additions and 17 deletions
|
|
@ -782,7 +782,7 @@ gen_vertex_data(struct vl_compositor *c, struct vl_compositor_state *s, struct u
|
|||
assert(c);
|
||||
|
||||
/* Allocate new memory for vertices. */
|
||||
u_upload_alloc(c->upload, 0,
|
||||
u_upload_alloc(c->pipe->stream_uploader, 0,
|
||||
c->vertex_buf.stride * VL_COMPOSITOR_MAX_LAYERS * 4, /* size */
|
||||
4, /* alignment */
|
||||
&c->vertex_buf.buffer_offset, &c->vertex_buf.buffer,
|
||||
|
|
@ -817,7 +817,7 @@ gen_vertex_data(struct vl_compositor *c, struct vl_compositor_state *s, struct u
|
|||
}
|
||||
}
|
||||
|
||||
u_upload_unmap(c->upload);
|
||||
u_upload_unmap(c->pipe->stream_uploader);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -913,7 +913,6 @@ vl_compositor_cleanup(struct vl_compositor *c)
|
|||
{
|
||||
assert(c);
|
||||
|
||||
u_upload_destroy(c->upload);
|
||||
cleanup_buffers(c);
|
||||
cleanup_shaders(c);
|
||||
cleanup_pipe_state(c);
|
||||
|
|
@ -1197,25 +1196,16 @@ vl_compositor_init(struct vl_compositor *c, struct pipe_context *pipe)
|
|||
|
||||
c->pipe = pipe;
|
||||
|
||||
c->upload = u_upload_create(pipe, 128 * 1024, PIPE_BIND_VERTEX_BUFFER,
|
||||
PIPE_USAGE_STREAM);
|
||||
|
||||
if (!c->upload)
|
||||
return false;
|
||||
|
||||
if (!init_pipe_state(c)) {
|
||||
u_upload_destroy(c->upload);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!init_shaders(c)) {
|
||||
u_upload_destroy(c->upload);
|
||||
cleanup_pipe_state(c);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!init_buffers(c)) {
|
||||
u_upload_destroy(c->upload);
|
||||
cleanup_shaders(c);
|
||||
cleanup_pipe_state(c);
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -99,7 +99,6 @@ struct vl_compositor_state
|
|||
struct vl_compositor
|
||||
{
|
||||
struct pipe_context *pipe;
|
||||
struct u_upload_mgr *upload;
|
||||
|
||||
struct pipe_framebuffer_state fb_state;
|
||||
struct pipe_vertex_buffer vertex_buf;
|
||||
|
|
|
|||
|
|
@ -230,10 +230,6 @@ vlVaCreateContext(VADriverContextP ctx, VAConfigID config_id, int picture_width,
|
|||
|
||||
if (is_vpp) {
|
||||
context->decoder = NULL;
|
||||
if (!drv->compositor.upload) {
|
||||
FREE(context);
|
||||
return VA_STATUS_ERROR_INVALID_CONTEXT;
|
||||
}
|
||||
} else {
|
||||
context->templat.profile = config->profile;
|
||||
context->templat.entrypoint = config->entrypoint;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue