From 68437eb0bab6403e149821e467fb8cf6273f2878 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 28 Aug 2023 08:44:56 -0400 Subject: [PATCH] asahi: Account for layering for attachment views Do not force a single-layer view, use an actual array attachment when there are multiple layers, since this corresponds to a layered framebuffer that will write to an array with the eMRT path. Signed-off-by: Alyssa Rosenzweig --- src/gallium/drivers/asahi/agx_state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index 0de1189b902..add629d88af 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -1061,7 +1061,8 @@ image_view_for_surface(struct pipe_surface *surf) .format = surf->format, .access = PIPE_IMAGE_ACCESS_READ_WRITE, .shader_access = PIPE_IMAGE_ACCESS_READ_WRITE, - .u.tex.single_layer_view = true, + .u.tex.single_layer_view = + surf->u.tex.first_layer == surf->u.tex.last_layer, .u.tex.first_layer = surf->u.tex.first_layer, .u.tex.last_layer = surf->u.tex.last_layer, .u.tex.level = surf->u.tex.level,