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:
Corbin Simpson 2009-08-18 18:11:46 -07:00
parent a381ee8266
commit c0bc070ff5

View file

@ -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;
}