summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/svga/svga_draw.c7
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer_upload.c7
2 files changed, 4 insertions, 10 deletions
diff --git a/src/gallium/drivers/svga/svga_draw.c b/src/gallium/drivers/svga/svga_draw.c
index 051ac1c6546..2c873a0f7ac 100644
--- a/src/gallium/drivers/svga/svga_draw.c
+++ b/src/gallium/drivers/svga/svga_draw.c
@@ -224,13 +224,6 @@ svga_hwtnl_flush( struct svga_hwtnl *hwtnl )
hwtnl->cmd.prim_count = 0;
}
- /*
- * FIXME: Somehow we are accumulating too many buffer uploads without
- * flushing, so temporarily disable buffer upload coalescing to prevent OOM
- * crashes (at expense of less performance).
- */
- svga_context_flush_buffers(svga);
-
return PIPE_OK;
}
diff --git a/src/gallium/drivers/svga/svga_resource_buffer_upload.c b/src/gallium/drivers/svga/svga_resource_buffer_upload.c
index 3de5216a949..765d2f34082 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer_upload.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer_upload.c
@@ -248,6 +248,7 @@ svga_buffer_upload_flush(struct svga_context *svga,
{
SVGA3dCopyBox *boxes;
unsigned i;
+ struct pipe_resource *dummy;
assert(sbuf->handle);
assert(sbuf->hwbuf);
@@ -289,9 +290,9 @@ svga_buffer_upload_flush(struct svga_context *svga,
sbuf->dma.svga = NULL;
sbuf->dma.boxes = NULL;
- /* Decrement reference count */
- pipe_reference(&(sbuf->b.b.reference), NULL);
- sbuf = NULL;
+ /* Decrement reference count (and potentially destroy) */
+ dummy = &sbuf->b.b;
+ pipe_resource_reference(&dummy, NULL);
}