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: 341332b23a ("zink: correct image cap checks")
Fixes: ecac7f3da1 ("docs: add missing zink-requirement")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10463>
This commit is contained in:
Erik Faye-Lund 2021-04-26 17:35:21 +02:00 committed by Marge Bot
parent 0b5c898c22
commit 4ec8533f69
2 changed files with 4 additions and 2 deletions

View File

@ -135,7 +135,8 @@ supported:
* ``VkPhysicalDeviceLimits``:
* ``shaderStorageImageReadWithoutFormat``
* ``shaderStorageImageExtendedFormats``
* ``shaderStorageImageWriteWithoutFormat``
* For Vulkan 1.2 and above:

View File

@ -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;