diff options
author | Jerome Glisse <glisse@freedesktop.org> | 2009-05-23 21:57:25 +0200 |
---|---|---|
committer | Jerome Glisse <glisse@freedesktop.org> | 2009-05-24 16:24:53 +0200 |
commit | 9b1efcb87c794ded9306f01336d48a80aaad3261 (patch) | |
tree | 3be8333a45ceb2485dd4d80d9d3b94c3f73a23a0 /src/mesa | |
parent | 7dd184dc4da37233471875df6f40cce0560cb7bc (diff) |
radeon: realloc dma if needed after revalidate
Revalidate can trigger flushing and dma buffer deallocation,
so retry allocation on such case.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_dma.c | 6 |
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 a357afe679..48b0d63818 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); } |