From: Henri Verbeet Date: Sun, 19 Sep 2010 20:58:42 +0000 (+0200) Subject: r600g: Respect PB_USAGE_UNSYNCHRONIZED in radeon_bo_pb_map_internal(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0f9181811fc0e2943b156acc4d43f2da8a4846d1;p=mesa.git r600g: Respect PB_USAGE_UNSYNCHRONIZED in radeon_bo_pb_map_internal(). --- 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;