mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-03 02:10:24 +01:00
crocus: take a reference to memobj bo in crocus_resource_from_memobj
This is the same fix as commit 2d87ea3166 for iris driver.
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/12330>
This commit is contained in:
parent
51310d7c30
commit
962178d5ab
1 changed files with 2 additions and 2 deletions
|
|
@ -909,6 +909,8 @@ crocus_resource_from_memobj(struct pipe_screen *pscreen,
|
|||
res->offset = offset;
|
||||
res->external_format = memobj->format;
|
||||
|
||||
crocus_bo_reference(memobj->bo);
|
||||
|
||||
return &res->base.b;
|
||||
}
|
||||
|
||||
|
|
@ -1957,8 +1959,6 @@ crocus_memobj_create_from_handle(struct pipe_screen *pscreen,
|
|||
memobj->format = whandle->format;
|
||||
memobj->stride = whandle->stride;
|
||||
|
||||
crocus_bo_reference(memobj->bo);
|
||||
|
||||
return &memobj->b;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue