summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorHenri Verbeet <[email protected]>2010-09-19 22:58:42 +0200
committerHenri Verbeet <[email protected]>2010-09-19 23:03:03 +0200
commit0f9181811fc0e2943b156acc4d43f2da8a4846d1 (patch)
tree9bb2f7ffa5f06e47141a0ef847c6c0519bc2c833 /src/gallium/winsys
parentd323118c3ef1ed197e61e7a80e0ddafbe9e70ecb (diff)
r600g: Respect PB_USAGE_UNSYNCHRONIZED in radeon_bo_pb_map_internal().
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/r600/drm/radeon_bo_pb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/winsys/r600/drm/radeon_bo_pb.c b/src/gallium/winsys/r600/drm/radeon_bo_pb.c
index b8744b00eb4..93dc927aba4 100644
--- a/src/gallium/winsys/r600/drm/radeon_bo_pb.c
+++ b/src/gallium/winsys/r600/drm/radeon_bo_pb.c
@@ -54,6 +54,14 @@ radeon_bo_pb_map_internal(struct pb_buffer *_buf,
{
struct radeon_bo_pb *buf = radeon_bo_pb(_buf);
+ if (flags & PB_USAGE_UNSYNCHRONIZED) {
+ if (!buf->bo->data && radeon_bo_map(buf->mgr->radeon, buf->bo)) {
+ return NULL;
+ }
+ LIST_DELINIT(&buf->maplist);
+ return buf->bo->data;
+ }
+
if (p_atomic_read(&buf->bo->reference.count) > 1) {
if (flags & PB_USAGE_DONTBLOCK) {
return NULL;