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/10609>
This commit is contained in:
parent
13677a9092
commit
e47b72e931
|
@ -901,6 +901,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;
|
||||
}
|
||||
|
||||
|
@ -1949,8 +1951,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…
Reference in New Issue