zink: fix subgroup vote detection

this is uses the 1.1 features, not 1.3

also check the shader stages available since the GL extension requires
all of them

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16757>
This commit is contained in:
Mike Blumenkrantz
2022-05-27 16:40:10 -04:00
committed by Marge Bot
parent 566033beb9
commit e342a57ea6
2 changed files with 10 additions and 1 deletions
@@ -302,6 +302,7 @@ struct zink_device_info {
%endfor
VkPhysicalDeviceFeatures2 feats;
VkPhysicalDeviceSubgroupProperties subgroup;
%for version in versions:
VkPhysicalDeviceVulkan${version.struct()}Features feats${version.struct()};
%endfor
@@ -471,6 +472,12 @@ zink_get_physical_device_info(struct zink_screen *screen)
props.pNext = &info->deviceid_props;
}
if (screen->vk_version >= VK_MAKE_VERSION(1,1,0)) {
info->subgroup.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES;
info->subgroup.pNext = props.pNext;
props.pNext = &info->subgroup;
}
// note: setting up local VkPhysicalDeviceProperties2.
screen->vk.GetPhysicalDeviceProperties2(screen->pdev, &props);
}
+3 -1
View File
@@ -446,7 +446,9 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
return screen->info.feats11.shaderDrawParameters || screen->info.have_KHR_shader_draw_parameters;
case PIPE_CAP_SHADER_GROUP_VOTE:
return screen->spirv_version >= SPIRV_VERSION(1, 3);
return screen->info.have_vulkan11 &&
(screen->info.subgroup.supportedOperations & VK_SUBGROUP_FEATURE_VOTE_BIT) &&
(screen->info.subgroup.supportedStages & VK_SHADER_STAGE_COMPUTE_BIT);
case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
return screen->info.have_EXT_provoking_vertex;