aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-07-24 14:09:11 +0200
committerErik Faye-Lund <[email protected]>2019-10-28 08:51:48 +0000
commit867d892d909e34fb500cb185af64afd874fd33c7 (patch)
tree4918c6de95537105fa1fe9806e8fcbfa4bc2cf2b
parentd8f1cf49465c0e003302f1c4c0595118a35037d4 (diff)
zink: do not set VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT for non-3D textures
Acked-by: Jordan Justen <[email protected]>
-rw-r--r--src/gallium/drivers/zink/zink_resource.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c
index 2fd63060aea..796ecae2d51 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -142,20 +142,14 @@ zink_resource_create(struct pipe_screen *pscreen,
ici.imageType = VK_IMAGE_TYPE_1D;
break;
- case PIPE_TEXTURE_2D:
- case PIPE_TEXTURE_2D_ARRAY:
case PIPE_TEXTURE_CUBE:
case PIPE_TEXTURE_CUBE_ARRAY:
+ ici.flags = VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
+ /* fall-through */
+ case PIPE_TEXTURE_2D:
+ case PIPE_TEXTURE_2D_ARRAY:
case PIPE_TEXTURE_RECT:
ici.imageType = VK_IMAGE_TYPE_2D;
- /* cube and 2D array needs some quirks here */
- if (templ->target == PIPE_TEXTURE_CUBE)
- ici.flags = VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
- else if (templ->target == PIPE_TEXTURE_2D_ARRAY)
- ici.flags = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR;
- else if (templ->target == PIPE_TEXTURE_CUBE_ARRAY)
- ici.flags = VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT |
- VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR;
break;
case PIPE_TEXTURE_3D: