mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 00:38:48 +02:00
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:3f9a6d333b("zink: export shader image caps using features") Fixes:5282210c0b("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 commit341332b23a)
This commit is contained in:
parent
5edae4604e
commit
e8d30fa9ec
2 changed files with 3 additions and 7 deletions
|
|
@ -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"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue