freedreno: Set layer_first on (2D) resource imports.

Prevents getting a weird layer stride if you ask for it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13443>
This commit is contained in:
Emma Anholt
2021-10-18 12:47:59 -07:00
committed by Marge Bot
parent 94e4cd4d83
commit 5b3a6ff9f7
@@ -1382,6 +1382,7 @@ fd_resource_from_handle(struct pipe_screen *pscreen,
fd_resource_set_bo(rsc, bo);
rsc->internal_format = tmpl->format;
rsc->layout.layer_first = true;
rsc->layout.pitch0 = handle->stride;
slice->offset = handle->offset;
slice->size0 = handle->stride * prsc->height0;