Commit 962178d5 authored by Tapani Pälli's avatar Tapani Pälli Committed by Dave Airlie
Browse files

crocus: take a reference to memobj bo in crocus_resource_from_memobj

This is the same fix as commit 2d87ea31

 for iris driver.
Signed-off-by: Tapani Pälli's avatarTapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery's avatarNanley Chery <nanley.g.chery@intel.com>
Part-of: <!12330>
parent 51310d7c
...@@ -909,6 +909,8 @@ crocus_resource_from_memobj(struct pipe_screen *pscreen, ...@@ -909,6 +909,8 @@ crocus_resource_from_memobj(struct pipe_screen *pscreen,
res->offset = offset; res->offset = offset;
res->external_format = memobj->format; res->external_format = memobj->format;
crocus_bo_reference(memobj->bo);
return &res->base.b; return &res->base.b;
} }
...@@ -1957,8 +1959,6 @@ crocus_memobj_create_from_handle(struct pipe_screen *pscreen, ...@@ -1957,8 +1959,6 @@ crocus_memobj_create_from_handle(struct pipe_screen *pscreen,
memobj->format = whandle->format; memobj->format = whandle->format;
memobj->stride = whandle->stride; memobj->stride = whandle->stride;
crocus_bo_reference(memobj->bo);
return &memobj->b; return &memobj->b;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment