svga: Remove unused code.
This commit is contained in:
@@ -391,8 +391,6 @@ svga_screen_create(struct svga_winsys_screen *sws)
|
||||
pipe_mutex_init(svgascreen->tex_mutex);
|
||||
pipe_mutex_init(svgascreen->swc_mutex);
|
||||
|
||||
LIST_INITHEAD(&svgascreen->cached_buffers);
|
||||
|
||||
svga_screen_cache_init(svgascreen);
|
||||
|
||||
return screen;
|
||||
|
||||
@@ -68,12 +68,6 @@ struct svga_screen
|
||||
pipe_mutex tex_mutex;
|
||||
pipe_mutex swc_mutex; /* Protects the use of swc and dirty_buffers */
|
||||
|
||||
/**
|
||||
* List of buffers with cached GMR. Ordered from the most recently used to
|
||||
* the least recently used
|
||||
*/
|
||||
struct list_head cached_buffers;
|
||||
|
||||
struct svga_host_surface_cache cache;
|
||||
};
|
||||
|
||||
|
||||
@@ -113,11 +113,6 @@ svga_buffer_destroy_hw_storage(struct svga_screen *ss, struct svga_buffer *sbuf)
|
||||
if(sbuf->hw.buf) {
|
||||
sws->buffer_destroy(sws, sbuf->hw.buf);
|
||||
sbuf->hw.buf = NULL;
|
||||
assert(sbuf->head.prev && sbuf->head.next);
|
||||
LIST_DEL(&sbuf->head);
|
||||
#ifdef DEBUG
|
||||
sbuf->head.next = sbuf->head.prev = NULL;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,8 +161,6 @@ svga_buffer_create_hw_storage(struct svga_screen *ss,
|
||||
return PIPE_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
assert(!sbuf->needs_flush);
|
||||
assert(!sbuf->head.prev && !sbuf->head.next);
|
||||
LIST_ADD(&sbuf->head, &ss->cached_buffers);
|
||||
}
|
||||
|
||||
return PIPE_OK;
|
||||
@@ -288,9 +281,10 @@ svga_buffer_upload_flush(struct svga_context *svga,
|
||||
|
||||
assert(sbuf->head.prev && sbuf->head.next);
|
||||
LIST_DEL(&sbuf->head);
|
||||
#ifdef DEBUG
|
||||
sbuf->head.next = sbuf->head.prev = NULL;
|
||||
#endif
|
||||
sbuf->needs_flush = FALSE;
|
||||
/* XXX: do we care about cached_buffers any more ?*/
|
||||
LIST_ADD(&sbuf->head, &ss->cached_buffers);
|
||||
|
||||
sbuf->hw.svga = NULL;
|
||||
sbuf->hw.boxes = NULL;
|
||||
@@ -419,17 +413,6 @@ svga_buffer_map_range( struct pipe_screen *screen,
|
||||
sws->fence_reference(sws, &fence, NULL);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!(usage & PIPE_BUFFER_USAGE_DISCARD) && !sbuf->needs_flush) {
|
||||
/* We already had the hardware storage but we would have to issue
|
||||
* a download if we hadn't, so move the buffer to the begginning
|
||||
* of the LRU list.
|
||||
*/
|
||||
assert(sbuf->head.prev && sbuf->head.next);
|
||||
LIST_DEL(&sbuf->head);
|
||||
LIST_ADD(&sbuf->head, &ss->cached_buffers);
|
||||
}
|
||||
}
|
||||
|
||||
map = sws->buffer_map(sws, sbuf->hw.buf, usage);
|
||||
}
|
||||
@@ -699,8 +682,7 @@ svga_buffer_handle(struct svga_context *svga,
|
||||
assert(sbuf->hw.svga == svga);
|
||||
|
||||
sbuf->needs_flush = TRUE;
|
||||
assert(sbuf->head.prev && sbuf->head.next);
|
||||
LIST_DEL(&sbuf->head);
|
||||
assert(!sbuf->head.prev && !sbuf->head.next);
|
||||
LIST_ADDTAIL(&sbuf->head, &svga->dirty_buffers);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user