mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 06:30:10 +01:00
iris: take a reference to memobj bo in iris_resource_from_memobj
v2: and remove it from iris_memobj_create_from_handle ... (Nanley)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4969
Fixes: 772dc50d16 ("iris: hook up resource creation from memory object")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11552>
This commit is contained in:
parent
52547cfbd0
commit
2d87ea3166
1 changed files with 2 additions and 2 deletions
|
|
@ -334,8 +334,6 @@ iris_memobj_create_from_handle(struct pipe_screen *pscreen,
|
|||
memobj->format = whandle->format;
|
||||
memobj->stride = whandle->stride;
|
||||
|
||||
iris_bo_reference(memobj->bo);
|
||||
|
||||
return &memobj->b;
|
||||
}
|
||||
|
||||
|
|
@ -1253,6 +1251,8 @@ iris_resource_from_memobj(struct pipe_screen *pscreen,
|
|||
res->offset = offset;
|
||||
res->external_format = memobj->format;
|
||||
|
||||
iris_bo_reference(memobj->bo);
|
||||
|
||||
return &res->base.b;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue