iris: Copy main ISL surf when reallocating in place

When reallocating a resource in place, we make sure to pass the
PIPE_BIND_SHARED flag for the new resource. On ACM, this generally
changes the allocation of the resource from tiled to linear. To pick up
the new layout of the resource, copy the new ISL surf.

This enables ACM to pass piglit's egl-ext_egl_image_storage
test.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10367
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13154>
This commit is contained in:
Nanley Chery 2024-03-11 17:44:36 -04:00 committed by Marge Bot
parent 98690db847
commit 27d35588f5

View file

@ -1571,6 +1571,7 @@ iris_reallocate_resource_inplace(struct iris_context *ice,
/* Replace the structure fields with the new ones */
old_res->base.b.bind = templ.bind;
old_res->surf = new_res->surf;
old_res->bo = new_res->bo;
old_res->aux.surf = new_res->aux.surf;
old_res->aux.bo = new_res->aux.bo;