diff options
Diffstat (limited to 'lib/mesa/src/gallium/drivers/softpipe/sp_context.c')
-rw-r--r-- | lib/mesa/src/gallium/drivers/softpipe/sp_context.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_context.c b/lib/mesa/src/gallium/drivers/softpipe/sp_context.c index 323f74ff3..48f87e656 100644 --- a/lib/mesa/src/gallium/drivers/softpipe/sp_context.c +++ b/lib/mesa/src/gallium/drivers/softpipe/sp_context.c @@ -37,6 +37,7 @@ #include "util/u_memory.h" #include "util/u_pstipple.h" #include "util/u_inlines.h" +#include "util/u_upload_mgr.h" #include "tgsi/tgsi_exec.h" #include "sp_buffer.h" #include "sp_clear.h" @@ -86,6 +87,9 @@ softpipe_destroy( struct pipe_context *pipe ) if (softpipe->quad.pstipple) softpipe->quad.pstipple->destroy( softpipe->quad.pstipple ); + if (softpipe->pipe.stream_uploader) + u_upload_destroy(softpipe->pipe.stream_uploader); + for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) { sp_destroy_tile_cache(softpipe->cbuf_cache[i]); pipe_surface_reference(&softpipe->framebuffer.cbufs[i], NULL); @@ -110,7 +114,7 @@ softpipe_destroy( struct pipe_context *pipe ) } for (i = 0; i < softpipe->num_vertex_buffers; i++) { - pipe_resource_reference(&softpipe->vertex_buffer[i].buffer, NULL); + pipe_vertex_buffer_unreference(&softpipe->vertex_buffer[i]); } tgsi_exec_machine_destroy(softpipe->fs_machine); @@ -174,10 +178,10 @@ softpipe_is_resource_referenced( struct pipe_context *pipe, static void -softpipe_render_condition( struct pipe_context *pipe, - struct pipe_query *query, - boolean condition, - uint mode ) +softpipe_render_condition(struct pipe_context *pipe, + struct pipe_query *query, + boolean condition, + enum pipe_render_cond_flag mode) { struct softpipe_context *softpipe = softpipe_context( pipe ); @@ -267,6 +271,10 @@ softpipe_create_context(struct pipe_screen *screen, softpipe->quad.blend = sp_quad_blend_stage(softpipe); softpipe->quad.pstipple = sp_quad_polygon_stipple_stage(softpipe); + softpipe->pipe.stream_uploader = u_upload_create_default(&softpipe->pipe); + if (!softpipe->pipe.stream_uploader) + goto fail; + softpipe->pipe.const_uploader = softpipe->pipe.stream_uploader; /* * Create drawing context and plug our rendering stage into it. |