From 4ec8533f69a3514030b493dfdb40ef92bda5982d Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 26 Apr 2021 17:35:21 +0200 Subject: [PATCH] zink: fix shader-image requirements I mixed up the EXT and ARB version of the extensions; we actually do require shaderStorageImageWriteWithoutFormat as well here. Thanks to Ilia Mirkin for pointing this out. It also seems I got really confused about what was required when writing the docs, so let's fix that as well. Fixes: 341332b23af ("zink: correct image cap checks") Fixes: ecac7f3da1a ("docs: add missing zink-requirement") Reviewed-By: Mike Blumenkrantz Part-of: --- docs/drivers/zink.rst | 3 ++- src/gallium/drivers/zink/zink_screen.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/drivers/zink.rst b/docs/drivers/zink.rst index d53a526f6f6..252d76199d1 100644 --- a/docs/drivers/zink.rst +++ b/docs/drivers/zink.rst @@ -135,7 +135,8 @@ supported: * ``VkPhysicalDeviceLimits``: - * ``shaderStorageImageReadWithoutFormat`` + * ``shaderStorageImageExtendedFormats`` + * ``shaderStorageImageWriteWithoutFormat`` * For Vulkan 1.2 and above: diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index aca1c577fb9..7839cb3df13 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -750,7 +750,8 @@ zink_get_shader_param(struct pipe_screen *pscreen, return (1 << PIPE_SHADER_IR_NIR) | (1 << PIPE_SHADER_IR_TGSI); case PIPE_SHADER_CAP_MAX_SHADER_IMAGES: - if (screen->info.feats.features.shaderStorageImageExtendedFormats) + if (screen->info.feats.features.shaderStorageImageExtendedFormats && + screen->info.feats.features.shaderStorageImageWriteWithoutFormat) return MIN2(screen->info.props.limits.maxPerStageDescriptorStorageImages, PIPE_MAX_SHADER_IMAGES); return 0;