diff options
author | Marek Olšák <[email protected]> | 2017-04-02 14:30:16 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-05-10 19:00:16 +0200 |
commit | c24c3b94ed29ecd99b1101c74c6c4606f9b5580e (patch) | |
tree | 81f6966bc59a68d9867693c65d35fae9bb1d9819 /src/mesa/state_tracker/st_pbo.c | |
parent | fe437882ea2d60e91c244cc95beb4b79c615af49 (diff) |
gallium: decrease the size of pipe_vertex_buffer - 24 -> 16 bytes
Diffstat (limited to 'src/mesa/state_tracker/st_pbo.c')
-rw-r--r-- | src/mesa/state_tracker/st_pbo.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_pbo.c b/src/mesa/state_tracker/st_pbo.c index 1ded58392c1..303c8535b20 100644 --- a/src/mesa/state_tracker/st_pbo.c +++ b/src/mesa/state_tracker/st_pbo.c @@ -215,7 +215,7 @@ st_pbo_draw(struct st_context *st, const struct st_pbo_addresses *addr, /* Upload vertices */ { - struct pipe_vertex_buffer vbo; + struct pipe_vertex_buffer vbo = {0}; struct pipe_vertex_element velem; float x0 = (float) addr->xoffset / surface_width * 2.0f - 1.0f; @@ -225,12 +225,10 @@ st_pbo_draw(struct st_context *st, const struct st_pbo_addresses *addr, float *verts = NULL; - vbo.user_buffer = NULL; - vbo.buffer = NULL; vbo.stride = 2 * sizeof(float); u_upload_alloc(st->pipe->stream_uploader, 0, 8 * sizeof(float), 4, - &vbo.buffer_offset, &vbo.buffer, (void **) &verts); + &vbo.buffer_offset, &vbo.buffer.resource, (void **) &verts); if (!verts) return false; @@ -254,7 +252,7 @@ st_pbo_draw(struct st_context *st, const struct st_pbo_addresses *addr, cso_set_vertex_buffers(cso, velem.vertex_buffer_index, 1, &vbo); - pipe_resource_reference(&vbo.buffer, NULL); + pipe_resource_reference(&vbo.buffer.resource, NULL); } /* Upload constants */ |