Module: Mesa Branch: main Commit: 23c758807e76183cd2dbd5ee97f296bde167c93b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=23c758807e76183cd2dbd5ee97f296bde167c93b
Author: Mike Blumenkrantz <[email protected]> Date: Mon Apr 11 15:07:11 2022 -0400 zink: handle 0 ubos and 0 ssbos in pipeline layout this is the number of types needed, and it can be zero cc: mesa-stable Reviewed-by: Dave Airlie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15853> --- src/gallium/drivers/zink/zink_descriptors_lazy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_descriptors_lazy.c b/src/gallium/drivers/zink/zink_descriptors_lazy.c index 83bac2d5739..9fc3f052d8f 100644 --- a/src/gallium/drivers/zink/zink_descriptors_lazy.c +++ b/src/gallium/drivers/zink/zink_descriptors_lazy.c @@ -132,12 +132,12 @@ descriptor_program_num_sizes(VkDescriptorPoolSize *sizes, enum zink_descriptor_t { switch (type) { case ZINK_DESCRIPTOR_TYPE_UBO: - return 1; + return !!sizes[ZDS_INDEX_UBO].descriptorCount; case ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW: return !!sizes[ZDS_INDEX_COMBINED_SAMPLER].descriptorCount + !!sizes[ZDS_INDEX_UNIFORM_TEXELS].descriptorCount; case ZINK_DESCRIPTOR_TYPE_SSBO: - return 1; + return !!sizes[ZDS_INDEX_STORAGE_BUFFER].descriptorCount; case ZINK_DESCRIPTOR_TYPE_IMAGE: return !!sizes[ZDS_INDEX_STORAGE_IMAGE].descriptorCount + !!sizes[ZDS_INDEX_STORAGE_TEXELS].descriptorCount;
