diff options
author | José Fonseca <[email protected]> | 2010-05-02 23:54:42 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-05-03 00:13:36 +0100 |
commit | b84590994c4261d85485357263146d5e3d8827eb (patch) | |
tree | ca379bcc851305ced4904dec4fac5993cc3e1f8a /src/gallium/drivers/svga/svga_context.c | |
parent | 49e37469bdafe663fa08a5a446e44f3ede168a13 (diff) |
svga: Remove the screen private context.
All affected operations have already been moved to context.
More cleanup work can be done, in particular with the buffer transfers.
Diffstat (limited to 'src/gallium/drivers/svga/svga_context.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_context.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c index 3228a6d3d7f..75d8afb2ea8 100644 --- a/src/gallium/drivers/svga/svga_context.c +++ b/src/gallium/drivers/svga/svga_context.c @@ -194,6 +194,7 @@ void svga_context_flush( struct svga_context *svga, struct pipe_fence_handle **pfence ) { struct svga_screen *svgascreen = svga_screen(svga->pipe.screen); + struct pipe_fence_handle *fence = NULL; svga->curr.nr_fbs = 0; @@ -202,21 +203,26 @@ void svga_context_flush( struct svga_context *svga, u_upload_flush(svga->upload_vb); u_upload_flush(svga->upload_ib); - /* Flush screen, to ensure that texture dma uploads are processed + /* Ensure that texture dma uploads are processed * before submitting commands. */ - svga_screen_flush(svgascreen, NULL); - svga_context_flush_buffers(svga); /* Flush pending commands to hardware: */ - svga->swc->flush(svga->swc, pfence); + svga->swc->flush(svga->swc, &fence); + + svga_screen_cache_flush(svgascreen, fence); if (SVGA_DEBUG & DEBUG_SYNC) { - if (pfence && *pfence) - svga->pipe.screen->fence_finish( svga->pipe.screen, *pfence, 0); + if (fence) + svga->pipe.screen->fence_finish( svga->pipe.screen, fence, 0); } + + if(pfence) + *pfence = fence; + else + svgascreen->sws->fence_reference(svgascreen->sws, &fence, NULL); } |