Mesa (staging/21.1): zink: fix shader-image requirements
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 27 18:22:17 UTC 2021
Module: Mesa
Branch: staging/21.1
Commit: fb4d89a85ee8c51b4a5a72b522a228e71481fce1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fb4d89a85ee8c51b4a5a72b522a228e71481fce1
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Mon Apr 26 17:35:21 2021 +0200
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 <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10463>
(cherry picked from commit 4ec8533f69a3514030b493dfdb40ef92bda5982d)
Conflicts:
docs/drivers/zink.rst
---
.pick_status.json | 2 +-
src/gallium/drivers/zink/zink_screen.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 1ac2bde69c6..d3b5cc619bc 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -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"
},
diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index f436dc0ee4c..610fdd7597b 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -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;
More information about the mesa-commit
mailing list