From 21480fb9e4cad4f0e411c2ffc64e8c9a752d45e8 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Tue, 16 Feb 2010 16:43:53 +0000 Subject: svga: Remove unused buffer download code. Unnecessary now that we never destroy buffer storage. --- src/gallium/drivers/svga/svga_screen_buffer.c | 40 --------------------------- src/gallium/drivers/svga/svga_screen_buffer.h | 5 ---- 2 files changed, 45 deletions(-) (limited to 'src/gallium') diff --git a/src/gallium/drivers/svga/svga_screen_buffer.c b/src/gallium/drivers/svga/svga_screen_buffer.c index 0371ddde368..525352f347c 100644 --- a/src/gallium/drivers/svga/svga_screen_buffer.c +++ b/src/gallium/drivers/svga/svga_screen_buffer.c @@ -288,8 +288,6 @@ svga_buffer_upload_flush(struct svga_context *svga, sbuf->hw.svga = NULL; sbuf->hw.boxes = NULL; - sbuf->host_written = TRUE; - /* Decrement reference count */ pipe_reference(&(sbuf->base.reference), NULL); sbuf = NULL; @@ -420,44 +418,6 @@ svga_buffer_map_range( struct pipe_screen *screen, if(!sbuf->hw.buf) { if(svga_buffer_create_hw_storage(ss, sbuf) != PIPE_OK) return NULL; - - /* Populate the hardware storage if the host surface pre-existed */ - if(sbuf->host_written) { - SVGA3dSurfaceDMAFlags flags; - enum pipe_error ret; - struct pipe_fence_handle *fence = NULL; - - assert(sbuf->handle); - - SVGA_DBG(DEBUG_DMA|DEBUG_PERF, "dma from sid %p (buffer), bytes %u - %u\n", - sbuf->handle, 0, sbuf->base.size); - - memset(&flags, 0, sizeof flags); - - ret = SVGA3D_BufferDMA(ss->swc, - sbuf->hw.buf, - sbuf->handle, - SVGA3D_READ_HOST_VRAM, - sbuf->base.size, - 0, - flags); - if(ret != PIPE_OK) { - ss->swc->flush(ss->swc, NULL); - - ret = SVGA3D_BufferDMA(ss->swc, - sbuf->hw.buf, - sbuf->handle, - SVGA3D_READ_HOST_VRAM, - sbuf->base.size, - 0, - flags); - assert(ret == PIPE_OK); - } - - ss->swc->flush(ss->swc, &fence); - sws->fence_finish(sws, fence, 0); - sws->fence_reference(sws, &fence, NULL); - } } map = sws->buffer_map(sws, sbuf->hw.buf, usage); diff --git a/src/gallium/drivers/svga/svga_screen_buffer.h b/src/gallium/drivers/svga/svga_screen_buffer.h index 448ac107c7f..e0e1b22e462 100644 --- a/src/gallium/drivers/svga/svga_screen_buffer.h +++ b/src/gallium/drivers/svga/svga_screen_buffer.h @@ -135,11 +135,6 @@ struct svga_buffer */ struct svga_winsys_surface *handle; - /** - * Whether the host has been ever written. - */ - boolean host_written; - struct { unsigned count; boolean writing; -- cgit v1.2.3