r300g: Handle PIPE_BUFFER_USAGE_DONTBLOCK as intended.
Return NULL if the BO is busy, otherwise just map it.
This commit is contained in:
parent
23663ae914
commit
7b8ec0d8e7
|
@ -134,8 +134,11 @@ static void *radeon_buffer_map(struct pipe_winsys *ws,
|
|||
(struct radeon_pipe_buffer*)buffer;
|
||||
int write = 0;
|
||||
|
||||
if (!(flags & PIPE_BUFFER_USAGE_DONTBLOCK)) {
|
||||
radeon_bo_wait(radeon_buffer->bo);
|
||||
if (flags & PIPE_BUFFER_USAGE_DONTBLOCK) {
|
||||
uint32_t domain;
|
||||
|
||||
if (radeon_bo_is_busy(radeon_buffer->bo, &domain))
|
||||
return NULL;
|
||||
}
|
||||
if (flags & PIPE_BUFFER_USAGE_CPU_WRITE) {
|
||||
write = 1;
|
||||
|
|
Loading…
Reference in New Issue