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.
This commit is contained in:
Marek Olšák
2011-02-14 23:15:55 +01:00
parent ec21eabe2a
commit 89ee0d527c
@@ -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;
}