diff options
author | Dave Airlie <airlied@redhat.com> | 2009-06-26 15:05:02 +1000 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-08-18 13:19:45 -0400 |
commit | 1279cdcb1f3e37a91bb5252826386205dc3e579d (patch) | |
tree | ca8a4a84e5f715330c2931eba23f8200c5df212f /src/mesa/drivers/dri/radeon/radeon_dma.c | |
parent | ae290fd93e41d3f33546d0376ea7ff93bb8fcf31 (diff) |
r200: make use of DMA buffers for Elts a lot better.
This allows us to return the unused portion of the dma buffer
to the allocator instead of wasting nearly 16k a pop.
Cherry picked and ported to new code by Pauli.
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_dma.c')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_dma.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_dma.c b/src/mesa/drivers/dri/radeon/radeon_dma.c index 93bcae2454b..b2376ea28b5 100644 --- a/src/mesa/drivers/dri/radeon/radeon_dma.c +++ b/src/mesa/drivers/dri/radeon/radeon_dma.c @@ -271,6 +271,17 @@ void radeonFreeDmaRegions(radeonContextPtr rmesa) } } +void radeonReturnDmaRegion(radeonContextPtr rmesa, int return_bytes) +{ + if (is_empty_list(&rmesa->dma.reserved)) + return; + + if (RADEON_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s %d\n", __FUNCTION__, return_bytes); + rmesa->dma.current_used -= return_bytes; + rmesa->dma.current_vertexptr = rmesa->dma.current_used; +} + void radeonReleaseDmaRegions(radeonContextPtr rmesa) { struct radeon_dma_bo *dma_bo; |