From: Marek Olšák Date: Mon, 14 Feb 2011 22:15:55 +0000 (+0100) Subject: r300g: flush CS in bo_map even if we get USAGE_DONTBLOCK X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=89ee0d527c689b70a08c1eb396486d47da7f120d;p=mesa.git r300g: flush CS in bo_map even if we get USAGE_DONTBLOCK Because an app may do something like this: while (!(ptr = bo_map(..., DONT_BLOCK))) { /* Do some other work. */ } And it would be looping endlessly if we didn't flush. --- diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index 550886d14f8..027e9d3f47a 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -162,6 +162,7 @@ static void *radeon_bo_map_internal(struct pb_buffer *_buf, if (flags & PB_USAGE_DONTBLOCK) { if (radeon_bo_is_referenced_by_cs(cs, bo)) { + cs->flush_cs(cs->flush_data); return NULL; }