mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
winsys/radeon: fix bo with virtual address referencing mismatch
If the same context try to flink and open the object, use the same bo struct instead of opening a new gem handle for the object. This way we avoid avoid having 2 different handle pointing to the same kernel object which can latter lead to trouble with virtual address. Fix: https://bugs.freedesktop.org/show_bug.cgi?id=60200 Signed-off-by: Martin Andersson <g02maran@gmail.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com>
This commit is contained in:
parent
e776b632c0
commit
a37835c8ed
1 changed files with 4 additions and 0 deletions
|
|
@ -963,6 +963,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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue