From 9b1efcb87c794ded9306f01336d48a80aaad3261 Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Sat, 23 May 2009 21:57:25 +0200 Subject: radeon: realloc dma if needed after revalidate Revalidate can trigger flushing and dma buffer deallocation, so retry allocation on such case. --- src/mesa/drivers/dri/radeon/radeon_dma.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); } -- cgit v1.2.3