From: Erik Faye-Lund Date: Tue, 16 Jul 2019 15:16:09 +0000 (+0200) Subject: zink: fix rendering to 3D-textures X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d9c068cba186a6cc3dca9d05f54842676ef303ed;p=mesa.git zink: fix rendering to 3D-textures Acked-by: Jordan Justen --- 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: