diff options
author | Erik Faye-Lund <erik.faye-lund@collabora.com> | 2021-04-21 15:37:59 +0200 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2021-04-26 20:32:28 +0200 |
commit | e8d30fa9ecaaa5b0c9bf14a8eac025ba551425b3 (patch) | |
tree | 0ac39a25f5a3c67188f84186d3cfbb2cc0c54009 | |
parent | 5edae4604e6af456cb0a0e2aa3c2fb79f302971f (diff) |
zink: correct image cap checks
PIPE_CAP_IMAGE_LOAD_FORMATTED doesn't depend on
shaderStorageImageExtendedFormats or
shaderStorageImageWriteWithoutFormat.
PIPE_SHADER_CAP_MAX_SHADER_IMAGES enables
GL_EXT_shader_image_load_store, which *does* require
shaderStorageImageExtendedFormats. Having
shaderStorageImageWriteWithoutFormat and
shaderStorageImageReadWithoutFormat isn't enough to support this.
It *might* be possible to lower extended formats to format-less
reads or writes, but we don't currently do that, so we should
just correct the test for now.
Fixes: 3f9a6d333b3 ("zink: export shader image caps using features")
Fixes: 5282210c0b9 ("zink: check correct caps for PIPE_CAP_IMAGE_LOAD_FORMATTED")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10456>
(cherry picked from commit 341332b23af84e8e77cc7d71de92b2edfa0eb2b0)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/gallium/drivers/zink/zink_screen.c | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/.pick_status.json b/.pick_status.json index 6ec633daa36..2e412fce30c 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -49,7 +49,7 @@ "description": "zink: correct image cap checks", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "3f9a6d333b3e5f05ef6560123ee98d217358be89" }, diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 25a49f290d6..f436dc0ee4c 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -412,9 +412,7 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param) return screen->info.props.limits.maxViewports; case PIPE_CAP_IMAGE_LOAD_FORMATTED: - return screen->info.feats.features.shaderStorageImageExtendedFormats && - screen->info.feats.features.shaderStorageImageReadWithoutFormat && - screen->info.feats.features.shaderStorageImageWriteWithoutFormat; + return screen->info.feats.features.shaderStorageImageReadWithoutFormat; case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES: return 1; @@ -748,9 +746,7 @@ 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 || - (screen->info.feats.features.shaderStorageImageWriteWithoutFormat && - screen->info.feats.features.shaderStorageImageReadWithoutFormat)) + if (screen->info.feats.features.shaderStorageImageExtendedFormats) return MIN2(screen->info.props.limits.maxPerStageDescriptorStorageImages, PIPE_MAX_SHADER_IMAGES); return 0; |