summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2021-06-03 15:13:54 +0300
committerMarge Bot <eric+marge@anholt.net>2021-06-23 10:46:09 +0000
commit2d87ea3166596a07259c96d33f3e4880417117cd (patch)
treeb152807c2d3b8c5c248e4090c309d8443d1ad039 /src
parent52547cfbd0dac490ddff6bd8e4f25539fb994d80 (diff)
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: 772dc50d162 ("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>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/iris/iris_resource.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index d60a95529f9..35a0ecef538 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -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;
}