From: Jerome Glisse Date: Sat, 23 May 2009 19:57:25 +0000 (+0200) Subject: radeon: realloc dma if needed after revalidate X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b1efcb87c794ded9306f01336d48a80aaad3261;p=mesa.git radeon: realloc dma if needed after revalidate Revalidate can trigger flushing and dma buffer deallocation, so retry allocation on such case. --- 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); }