summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_ioctl.c
diff options
context:
space:
mode:
authorAapo Tahkola <aet@rasterburn.org>2006-03-09 06:21:17 +0000
committerAapo Tahkola <aet@rasterburn.org>2006-03-09 06:21:17 +0000
commit12d51beb7e2fd3bd4b58c941db4d0188dca5973d (patch)
tree2c8c18b9b146e9335b5d82aff48311c7e6f163fe /src/mesa/drivers/dri/r300/r300_ioctl.c
parente294d938f261527ba72f82fe3952ba261d131845 (diff)
Kick VBOs out of GART if nothing else helps.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_ioctl.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_ioctl.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c
index 078ff35397..73725fcba9 100644
--- a/src/mesa/drivers/dri/r300/r300_ioctl.c
+++ b/src/mesa/drivers/dri/r300/r300_ioctl.c
@@ -632,12 +632,19 @@ void r300RefillCurrentDmaRegion(r300ContextPtr rmesa)
radeonWaitForIdleLocked(&rmesa->radeon);
dmabuf->id = radeon_mm_alloc(rmesa, 4, RADEON_BUFFER_SIZE*16);
-
+
+#ifdef HW_VBOS
+ if (dmabuf->id == 0) {
+ /* Just kick all */
+ r300_evict_vbos(rmesa->radeon.glCtx, /*RADEON_BUFFER_SIZE*16*/1<<30);
+ dmabuf->id = radeon_mm_alloc(rmesa, 4, RADEON_BUFFER_SIZE*16);
+ }
+#endif
UNLOCK_HARDWARE(&rmesa->radeon);
if (dmabuf->id == 0) {
- WARN_ONCE("Whops! Dont know how to evict VBOs yet.\n");
- exit(1);
+ fprintf(stderr, "Error: Could not get dma buffer... exiting\n");
+ exit(-1);
}
}