zink: reject all storage multisampling if the feature is unsupported
this also enables removing a stupid conditional cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13631>
This commit is contained in:
committed by
Marge Bot
parent
aacdc6eb44
commit
675519f1d0
@@ -225,10 +225,9 @@ get_image_usage_for_feats(struct zink_screen *screen, VkFormatFeatureFlags feats
|
||||
if (feats & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT && (bind & (PIPE_BIND_LINEAR | PIPE_BIND_SHARED)) != (PIPE_BIND_LINEAR | PIPE_BIND_SHARED))
|
||||
usage |= VK_IMAGE_USAGE_SAMPLED_BIT;
|
||||
|
||||
if ((templ->nr_samples <= 1 || screen->info.feats.features.shaderStorageImageMultisample) &&
|
||||
(bind & PIPE_BIND_SHADER_IMAGE)) {
|
||||
if (feats & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT)
|
||||
usage |= VK_IMAGE_USAGE_STORAGE_BIT;
|
||||
if ((feats & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT) && (bind & PIPE_BIND_SHADER_IMAGE)) {
|
||||
assert(templ->nr_samples <= 1 || screen->info.feats.features.shaderStorageImageMultisample);
|
||||
usage |= VK_IMAGE_USAGE_STORAGE_BIT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -951,6 +951,9 @@ zink_is_format_supported(struct pipe_screen *pscreen,
|
||||
{
|
||||
struct zink_screen *screen = zink_screen(pscreen);
|
||||
|
||||
if (storage_sample_count && !screen->info.feats.features.shaderStorageImageMultisample && bind & PIPE_BIND_SHADER_IMAGE)
|
||||
return false;
|
||||
|
||||
if (format == PIPE_FORMAT_NONE)
|
||||
return screen->info.props.limits.framebufferNoAttachmentsSampleCounts &
|
||||
vk_sample_count_flags(sample_count);
|
||||
|
||||
Reference in New Issue
Block a user