mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 18:08:40 +02:00
radeon-gallium: Oh, look, we *do* already support DONTBLOCK.
Well, okay, the kernel doesn't, but that's no excuse for us! :3
This commit is contained in:
parent
a381ee8266
commit
c0bc070ff5
1 changed files with 5 additions and 6 deletions
|
|
@ -134,18 +134,17 @@ static void *radeon_buffer_map(struct pipe_winsys *ws,
|
|||
(struct radeon_pipe_buffer*)buffer;
|
||||
int write = 0;
|
||||
|
||||
if (flags & PIPE_BUFFER_USAGE_DONTBLOCK) {
|
||||
/* XXX Remove this when radeon_bo_map supports DONTBLOCK */
|
||||
return NULL;
|
||||
if (!(flags & PIPE_BUFFER_USAGE_DONTBLOCK)) {
|
||||
radeon_bo_wait(radeon_buffer->bo);
|
||||
}
|
||||
if (flags & PIPE_BUFFER_USAGE_CPU_WRITE) {
|
||||
write = 1;
|
||||
}
|
||||
|
||||
radeon_bo_wait(radeon_buffer->bo);
|
||||
|
||||
if (radeon_bo_map(radeon_buffer->bo, write))
|
||||
if (radeon_bo_map(radeon_buffer->bo, write)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return radeon_buffer->bo->ptr;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue