diff options
author | Aapo Tahkola <[email protected]> | 2006-03-09 04:42:45 +0000 |
---|---|---|
committer | Aapo Tahkola <[email protected]> | 2006-03-09 04:42:45 +0000 |
commit | e294d938f261527ba72f82fe3952ba261d131845 (patch) | |
tree | 365d2aa58967a1ac31bd240218df1c816e43a309 /src | |
parent | f1b431b265abc445e962701c65916d721a0e0ddf (diff) |
Use the force Luke, use the force.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_ioctl.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c index d8079535069..078ff35397c 100644 --- a/src/mesa/drivers/dri/r300/r300_ioctl.c +++ b/src/mesa/drivers/dri/r300/r300_ioctl.c @@ -626,8 +626,19 @@ void r300RefillCurrentDmaRegion(r300ContextPtr rmesa) dmabuf->id = radeon_mm_alloc(rmesa, 4, RADEON_BUFFER_SIZE*16); if (dmabuf->id == 0) { - WARN_ONCE("Whops! Dont know how to evict VBOs yet.\n"); - exit(1); + LOCK_HARDWARE(&rmesa->radeon); /* no need to validate */ + + r300FlushCmdBufLocked(rmesa, __FUNCTION__); + radeonWaitForIdleLocked(&rmesa->radeon); + + dmabuf->id = radeon_mm_alloc(rmesa, 4, RADEON_BUFFER_SIZE*16); + + UNLOCK_HARDWARE(&rmesa->radeon); + + if (dmabuf->id == 0) { + WARN_ONCE("Whops! Dont know how to evict VBOs yet.\n"); + exit(1); + } } rmesa->dma.current.buf = dmabuf; |