Module: Mesa Branch: main Commit: f112add5544ca545656b96e82a78b7fd06c43bcc URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f112add5544ca545656b96e82a78b7fd06c43bcc
Author: Kenneth Graunke <[email protected]> Date: Thu Sep 29 18:06:42 2022 -0700 iris: Don't replace backing storage for exported buffers. We already gave out the old BO...or acquired it from somewhere which may be affecting it. We simply can't replace the backing store. Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19209> --- src/gallium/drivers/iris/iris_resource.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index c797ad05a69..5e994fd7214 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -1943,6 +1943,10 @@ iris_invalidate_resource(struct pipe_context *ctx, if (res->bo->gem_handle && res->bo->real.userptr) return; + /* Nor can we allocate buffers we imported or exported. */ + if (iris_bo_is_external(res->bo)) + return; + struct iris_bo *old_bo = res->bo; struct iris_bo *new_bo = iris_bo_alloc(screen->bufmgr, res->bo->name, resource->width0,
