Mesa (main): freedreno: Set layer_first on (2D) resource imports.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Nov 11 00:48:00 UTC 2021
Module: Mesa
Branch: main
Commit: 5b3a6ff9f73dbfbc5b7132fa44073dc555153a93
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5b3a6ff9f73dbfbc5b7132fa44073dc555153a93
Author: Emma Anholt <emma at anholt.net>
Date: Mon Oct 18 12:47:59 2021 -0700
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>
---
src/gallium/drivers/freedreno/freedreno_resource.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index f8c8eb9d0c9..458e168e8b4 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -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;
More information about the mesa-commit
mailing list