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>
(cherry picked from commit 4ec8533f69)

Conflicts:
	docs/drivers/zink.rst
This commit is contained in:
Erik Faye-Lund 2021-04-26 17:35:21 +02:00 committed by Dylan Baker
parent dff02e24c4
commit fb4d89a85e
2 changed files with 3 additions and 2 deletions

View file

@ -49,7 +49,7 @@
"description": "zink: fix shader-image requirements",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "341332b23af84e8e77cc7d71de92b2edfa0eb2b0"
},

View file

@ -746,7 +746,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;