mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 04:20:18 +01:00
asahi: Mark KMS exported resource BOs as shared
Fixes: #13524 Signed-off-by: Asahi Lina <lina@asahilina.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36097>
This commit is contained in:
parent
a8f33c35f9
commit
067d820c9d
1 changed files with 9 additions and 0 deletions
|
|
@ -260,6 +260,15 @@ agx_resource_get_handle(struct pipe_screen *pscreen, struct pipe_context *ctx,
|
|||
} else if (handle->type == WINSYS_HANDLE_TYPE_KMS) {
|
||||
rsrc_debug(rsrc, "Get handle: %p (KMS)\n", rsrc);
|
||||
|
||||
/* BO must be considered shared at this point.
|
||||
* The seemingly redundant check exists because if the BO is
|
||||
* already shared then mutating the BO would be potentially
|
||||
* racy.
|
||||
*/
|
||||
assert(rsrc->bo->flags & AGX_BO_SHAREABLE);
|
||||
if (!(rsrc->bo->flags & AGX_BO_SHARED))
|
||||
rsrc->bo->flags |= AGX_BO_SHARED;
|
||||
|
||||
handle->handle = rsrc->bo->handle;
|
||||
} else if (handle->type == WINSYS_HANDLE_TYPE_FD) {
|
||||
int fd = agx_bo_export(dev, rsrc->bo);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue