mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 18:10:11 +01: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>
This commit is contained in:
parent
5ec8cbb9c0
commit
341332b23a
1 changed files with 2 additions and 6 deletions
|
|
@ -413,9 +413,7 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
||||||
return screen->info.props.limits.maxViewports;
|
return screen->info.props.limits.maxViewports;
|
||||||
|
|
||||||
case PIPE_CAP_IMAGE_LOAD_FORMATTED:
|
case PIPE_CAP_IMAGE_LOAD_FORMATTED:
|
||||||
return screen->info.feats.features.shaderStorageImageExtendedFormats &&
|
return screen->info.feats.features.shaderStorageImageReadWithoutFormat;
|
||||||
screen->info.feats.features.shaderStorageImageReadWithoutFormat &&
|
|
||||||
screen->info.feats.features.shaderStorageImageWriteWithoutFormat;
|
|
||||||
|
|
||||||
case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
|
case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -752,9 +750,7 @@ zink_get_shader_param(struct pipe_screen *pscreen,
|
||||||
return (1 << PIPE_SHADER_IR_NIR) | (1 << PIPE_SHADER_IR_TGSI);
|
return (1 << PIPE_SHADER_IR_NIR) | (1 << PIPE_SHADER_IR_TGSI);
|
||||||
|
|
||||||
case PIPE_SHADER_CAP_MAX_SHADER_IMAGES:
|
case PIPE_SHADER_CAP_MAX_SHADER_IMAGES:
|
||||||
if (screen->info.feats.features.shaderStorageImageExtendedFormats ||
|
if (screen->info.feats.features.shaderStorageImageExtendedFormats)
|
||||||
(screen->info.feats.features.shaderStorageImageWriteWithoutFormat &&
|
|
||||||
screen->info.feats.features.shaderStorageImageReadWithoutFormat))
|
|
||||||
return MIN2(screen->info.props.limits.maxPerStageDescriptorStorageImages,
|
return MIN2(screen->info.props.limits.maxPerStageDescriptorStorageImages,
|
||||||
PIPE_MAX_SHADER_IMAGES);
|
PIPE_MAX_SHADER_IMAGES);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue