aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerome Glisse <[email protected]>2009-05-23 21:57:25 +0200
committerJerome Glisse <[email protected]>2009-05-24 16:24:53 +0200
commit9b1efcb87c794ded9306f01336d48a80aaad3261 (patch)
tree3be8333a45ceb2485dd4d80d9d3b94c3f73a23a0
parent7dd184dc4da37233471875df6f40cce0560cb7bc (diff)
radeon: realloc dma if needed after revalidate
Revalidate can trigger flushing and dma buffer deallocation, so retry allocation on such case.
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_dma.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_dma.c b/src/mesa/drivers/dri/radeon/radeon_dma.c
index a357afe6798..48b0d638183 100644
--- a/src/mesa/drivers/dri/radeon/radeon_dma.c
+++ b/src/mesa/drivers/dri/radeon/radeon_dma.c
@@ -203,6 +203,12 @@ again_alloc:
if (radeon_revalidate_bos(rmesa->glCtx) == GL_FALSE)
fprintf(stderr,"failure to revalidate BOs - badness\n");
+ if (!rmesa->dma.current) {
+ /* Cmd buff have been flushed in radeon_revalidate_bos */
+ rmesa->dma.nr_released_bufs = 0;
+ goto again_alloc;
+ }
+
radeon_bo_map(rmesa->dma.current, 1);
}