diff options
author | Dave Airlie <airlied@redhat.com> | 2009-02-04 13:16:03 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-02-04 13:16:03 +1000 |
commit | 711cbf30a1ce72338ca9f1c0f71bd530754a4bd9 (patch) | |
tree | c3eb71202cfdcf76206c027f9d9377c992d62bba /src/mesa/drivers/dri/radeon | |
parent | 55c8a79a339668dd661bb8adb615fbcb8075f51a (diff) |
r300: make dma buffer reuse much more sensible
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r-- | src/mesa/drivers/dri/radeon/common_misc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/radeon/common_misc.c b/src/mesa/drivers/dri/radeon/common_misc.c index 0779feea97..62650e2892 100644 --- a/src/mesa/drivers/dri/radeon/common_misc.c +++ b/src/mesa/drivers/dri/radeon/common_misc.c @@ -621,6 +621,8 @@ int rcommonFlushCmdBuf(radeonContextPtr rmesa, const char *caller) { int ret; + radeonReleaseDmaRegion(rmesa); + LOCK_HARDWARE(rmesa); ret = rcommonFlushCmdBufLocked(rmesa, caller); UNLOCK_HARDWARE(rmesa); @@ -2418,7 +2420,6 @@ void radeonRefillCurrentDmaRegion(radeonContextPtr rmesa, int size) fprintf(stderr, "%s\n", __FUNCTION__); if (rmesa->dma.flush) { - radeon_bo_unmap(rmesa->dma.current); rmesa->dma.flush(rmesa->glCtx); } @@ -2504,9 +2505,12 @@ void radeonAllocDmaRegion(radeonContextPtr rmesa, void radeonReleaseDmaRegion(radeonContextPtr rmesa) { + if (RADEON_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s %p\n", __FUNCTION__, rmesa->dma.current); if (rmesa->dma.current) { rmesa->dma.nr_released_bufs++; - radeon_bo_unref(rmesa->dma.current); + radeon_bo_unmap(rmesa->dma.current); + radeon_bo_unref(rmesa->dma.current); } rmesa->dma.current = NULL; } |