Commit 3f9a6d33 authored by Mike Blumenkrantz's avatar Mike Blumenkrantz 🏋 Committed by Marge Bot

zink: export shader image caps using features

Reviewed-by: Erik Faye-Lund 's avatarErik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <!8504>
parent 0daa6155
Pipeline #259574 waiting for manual action with stages
......@@ -237,6 +237,9 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_MAX_VIEWPORTS:
return screen->info.props.limits.maxViewports;
case PIPE_CAP_IMAGE_LOAD_FORMATTED:
return screen->info.feats.features.shaderStorageImageExtendedFormats;
case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
return 1;
......@@ -534,12 +537,13 @@ 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 0 /* TODO: needs compiler support */
return MIN2(screen->info.props.limits.maxPerStageDescriptorStorageImages,
PIPE_MAX_SHADER_IMAGES);
#else
if (screen->info.have_KHR_vulkan_memory_model &&
(screen->info.feats.features.shaderStorageImageExtendedFormats ||
(screen->info.feats.features.shaderStorageImageWriteWithoutFormat &&
screen->info.feats.features.shaderStorageImageReadWithoutFormat)))
return MIN2(screen->info.props.limits.maxPerStageDescriptorStorageImages,
PIPE_MAX_SHADER_IMAGES);
return 0;
#endif
case PIPE_SHADER_CAP_LOWER_IF_THRESHOLD:
case PIPE_SHADER_CAP_TGSI_SKIP_MERGE_REGISTERS:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment