diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c index b6abc239956..4f350a3df2b 100644 --- a/src/broadcom/vulkan/v3dv_device.c +++ b/src/broadcom/vulkan/v3dv_device.c @@ -336,12 +336,10 @@ get_features(const struct v3dv_physical_device *physical_device, .samplerMirrorClampToEdge = true, - /* These are mandatory by Vulkan 1.2, however, we don't support any of - * the optional features affected by them (non 32-bit types for - * shaderSubgroupExtendedTypes and additional subgroup ballot for - * subgroupBroadcastDynamicId), so in practice setting them to true - * doesn't have any implications for us until we implement any of these - * optional features. + /* Extended subgroup types is mandatory by Vulkan 1.2, however, it is + * only in effect if the implementation supports non 32-bit types, which + * we don't, so in practice setting it to true doesn't have any + * implications for us. */ .shaderSubgroupExtendedTypes = true, .subgroupBroadcastDynamicId = true, @@ -1377,11 +1375,20 @@ v3dv_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, snprintf(vk12.driverInfo, VK_MAX_DRIVER_INFO_SIZE, "Mesa " PACKAGE_VERSION MESA_GIT_SHA1); + VkSubgroupFeatureFlags subgroup_ops = VK_SUBGROUP_FEATURE_BASIC_BIT; + if (pdevice->devinfo.ver >= 71) { + subgroup_ops |= VK_SUBGROUP_FEATURE_BALLOT_BIT | + VK_SUBGROUP_FEATURE_SHUFFLE_BIT | + VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT | + VK_SUBGROUP_FEATURE_VOTE_BIT | + VK_SUBGROUP_FEATURE_QUAD_BIT; + } + VkPhysicalDeviceVulkan11Properties vk11 = { .deviceLUIDValid = false, .subgroupSize = V3D_CHANNELS, .subgroupSupportedStages = VK_SHADER_STAGE_COMPUTE_BIT, - .subgroupSupportedOperations = VK_SUBGROUP_FEATURE_BASIC_BIT, + .subgroupSupportedOperations = subgroup_ops, .subgroupQuadOperationsInAllStages = false, .pointClippingBehavior = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES, .maxMultiviewViewCount = MAX_MULTIVIEW_VIEW_COUNT, diff --git a/src/broadcom/vulkan/v3dv_pipeline.c b/src/broadcom/vulkan/v3dv_pipeline.c index f339389fc3a..146151b6ce9 100644 --- a/src/broadcom/vulkan/v3dv_pipeline.c +++ b/src/broadcom/vulkan/v3dv_pipeline.c @@ -167,7 +167,11 @@ static const struct spirv_to_nir_options default_spirv_options = { .multiview = true, .storage_8bit = true, .storage_16bit = true, + .subgroup_ballot = true, .subgroup_basic = true, + .subgroup_quad = true, + .subgroup_shuffle = true, + .subgroup_vote = true, .variable_pointers = true, .vk_memory_model = true, .vk_memory_model_device_scope = true,