From 881a8efa6bee39612c6d2c05a2523ef7e9604046 Mon Sep 17 00:00:00 2001 From: Martin Andersson Date: Sat, 2 Feb 2013 17:55:07 +0100 Subject: [PATCH] winsys/radeon: fix bo with virtual address referencing mismatch --- src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index 6daafc3..ae97fb6 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -962,6 +962,10 @@ static boolean radeon_winsys_bo_get_handle(struct pb_buffer *buffer, whandle->handle = bo->handle; } + pipe_mutex_lock(bo->mgr->bo_handles_mutex); + util_hash_table_set(bo->mgr->bo_handles, (void*)(uintptr_t)whandle->handle, bo); + pipe_mutex_unlock(bo->mgr->bo_handles_mutex); + whandle->stride = stride; return TRUE; } -- 1.8.1.1