From 0f9181811fc0e2943b156acc4d43f2da8a4846d1 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Sun, 19 Sep 2010 22:58:42 +0200 Subject: [PATCH] r600g: Respect PB_USAGE_UNSYNCHRONIZED in radeon_bo_pb_map_internal(). --- src/gallium/winsys/r600/drm/radeon_bo_pb.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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; -- 2.30.2