summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-08-18 18:11:46 -0700
committerCorbin Simpson <[email protected]>2009-08-18 21:25:53 -0700
commitc0bc070ff5334db173df6f774257ae4c5c6e394e (patch)
tree7919cdef2e41e796fb2fb4b52c97c844a4f9110a /src
parenta381ee82663f10ff3cdcfad331258d03d4188894 (diff)
radeon-gallium: Oh, look, we *do* already support DONTBLOCK.
Well, okay, the kernel doesn't, but that's no excuse for us! :3
Diffstat (limited to 'src')
-rw-r--r--src/gallium/winsys/drm/radeon/core/radeon_buffer.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
index 775bda8308f..07551e7cd16 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
+++ b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
@@ -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;
}