Mesa (master): freedreno: turn staging cube into 2d-array

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 13 15:59:15 UTC 2019


Module: Mesa
Branch: master
Commit: a8be53211d753b362273b8ab90029edee3ba62cd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a8be53211d753b362273b8ab90029edee3ba62cd

Author: Rob Clark <robdclark at chromium.org>
Date:   Wed Jun 12 13:36:18 2019 -0700

freedreno: turn staging cube into 2d-array

Since we could only need a subset of the layers, and otherwise we
trigger an assert in util_max_layer()

Signed-off-by: Rob Clark <robdclark at chromium.org>

---

 src/gallium/drivers/freedreno/freedreno_resource.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index bcc1efe3cad..7b1b1bf43f8 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -353,6 +353,8 @@ fd_alloc_staging(struct fd_context *ctx, struct fd_resource *rsc,
 	 * for 3d textures, it is the depth:
 	 */
 	if (tmpl.array_size > 1) {
+		if (tmpl.target == PIPE_TEXTURE_CUBE)
+			tmpl.target = PIPE_TEXTURE_2D_ARRAY;
 		tmpl.array_size = box->depth;
 		tmpl.depth0 = 1;
 	} else {




More information about the mesa-commit mailing list