From d9c068cba186a6cc3dca9d05f54842676ef303ed Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 16 Jul 2019 17:16:09 +0200 Subject: [PATCH] zink: fix rendering to 3D-textures Acked-by: Jordan Justen --- src/gallium/drivers/zink/zink_resource.c | 2 ++ src/gallium/drivers/zink/zink_surface.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 8726427b66c..2fd63060aea 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -160,6 +160,8 @@ zink_resource_create(struct pipe_screen *pscreen, case PIPE_TEXTURE_3D: ici.imageType = VK_IMAGE_TYPE_3D; + if (templ->bind & PIPE_BIND_RENDER_TARGET) + ici.flags = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT; break; case PIPE_BUFFER: diff --git a/src/gallium/drivers/zink/zink_surface.c b/src/gallium/drivers/zink/zink_surface.c index dc0c0b3ce0a..0b480643b1b 100644 --- a/src/gallium/drivers/zink/zink_surface.c +++ b/src/gallium/drivers/zink/zink_surface.c @@ -86,7 +86,7 @@ zink_create_surface(struct pipe_context *pctx, break; case PIPE_TEXTURE_3D: - ivci.viewType = VK_IMAGE_VIEW_TYPE_3D; + ivci.viewType = VK_IMAGE_VIEW_TYPE_2D; break; default: -- 2.30.2