diff options
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 */ |