diff options
author | Marek Olšák <[email protected]> | 2017-01-27 02:06:12 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-02-14 21:46:16 +0100 |
commit | d3de8e1096662d6e0865db5724e550e5f42a36fa (patch) | |
tree | 9e1da12e34d0481b0a28a75318cf15e108e3b38e /src/gallium/auxiliary/vl | |
parent | b1dc347822ce6931f8e3089f3bdfaa45dac87ebc (diff) |
gallium/vl: use the common uploader
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Tested-by: Edmondo Tommasina <[email protected]>
Tested-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/vl')
-rw-r--r-- | src/gallium/auxiliary/vl/vl_compositor.c | 14 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_compositor.h | 1 |
2 files changed, 2 insertions, 13 deletions
diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index 1efcb752526..f98b185f6c8 100644 --- a/src/gallium/auxiliary/vl/vl_compositor.c +++ b/src/gallium/auxiliary/vl/vl_compositor.c @@ -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; diff --git a/src/gallium/auxiliary/vl/vl_compositor.h b/src/gallium/auxiliary/vl/vl_compositor.h index 54606190fda..535abb75cd1 100644 --- a/src/gallium/auxiliary/vl/vl_compositor.h +++ b/src/gallium/auxiliary/vl/vl_compositor.h @@ -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; |