Mesa (master): zink: clamp VkImageCreateInfo.arrayLayers to 1 for image resource creation
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 24 07:17:21 UTC 2020
Module: Mesa
Branch: master
Commit: 7b3976d3f86d41ccc130b6734630814acf538d28
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7b3976d3f86d41ccc130b6734630814acf538d28
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Fri May 29 14:38:02 2020 -0400
zink: clamp VkImageCreateInfo.arrayLayers to 1 for image resource creation
this is required by spec, so we can generally assume that any time it's 0 here
this is the result of us being lazy elsewhere in the zink driver when we're
manually creating this sort of buffer
Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5614>
---
src/gallium/drivers/zink/zink_resource.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c
index 5ae75dba2be..ee38909eab8 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -177,7 +177,7 @@ resource_create(struct pipe_screen *pscreen,
ici.extent.height = templ->height0;
ici.extent.depth = templ->depth0;
ici.mipLevels = templ->last_level + 1;
- ici.arrayLayers = templ->array_size;
+ ici.arrayLayers = MAX2(templ->array_size, 1);
ici.samples = templ->nr_samples ? templ->nr_samples : VK_SAMPLE_COUNT_1_BIT;
ici.tiling = templ->bind & PIPE_BIND_LINEAR ? VK_IMAGE_TILING_LINEAR : VK_IMAGE_TILING_OPTIMAL;
More information about the mesa-commit
mailing list