radv: Enable Subgroup Arithmetic and Clustered for SI
authorDaniel Schürmann <daniel@schuermann.dev>
Wed, 20 Nov 2019 11:41:19 +0000 (12:41 +0100)
committerDaniel Schürmann <daniel@schuermann.dev>
Wed, 20 Nov 2019 20:31:45 +0000 (20:31 +0000)
This patch also allows to enable VK_AMD_shader_ballot on SI.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_device.c

index 5917c80488391a09ed3d22a8aa15e4cbe99a198f..dbdaa442c83b1fa9c9f106b728f72d43816f3cad 100644 (file)
@@ -439,8 +439,7 @@ radv_physical_device_init(struct radv_physical_device *device,
        device->dcc_msaa_allowed =
                (device->instance->perftest_flags & RADV_PERFTEST_DCC_MSAA);
 
-       device->use_shader_ballot = device->rad_info.chip_class >= GFX8 &&
-                                   (device->use_aco || device->instance->perftest_flags & RADV_PERFTEST_SHADER_BALLOT);
+       device->use_shader_ballot = device->use_aco || (device->instance->perftest_flags & RADV_PERFTEST_SHADER_BALLOT);
 
        device->use_ngg = device->rad_info.chip_class >= GFX10 &&
                          device->rad_info.family != CHIP_NAVI14 &&
@@ -1390,13 +1389,13 @@ void radv_GetPhysicalDeviceProperties2(
                        properties->supportedStages = VK_SHADER_STAGE_ALL;
                        properties->supportedOperations =
                                                        VK_SUBGROUP_FEATURE_BASIC_BIT |
+                                                       VK_SUBGROUP_FEATURE_VOTE_BIT |
+                                                       VK_SUBGROUP_FEATURE_ARITHMETIC_BIT |
                                                        VK_SUBGROUP_FEATURE_BALLOT_BIT |
-                                                       VK_SUBGROUP_FEATURE_QUAD_BIT |
-                                                       VK_SUBGROUP_FEATURE_VOTE_BIT;
+                                                       VK_SUBGROUP_FEATURE_CLUSTERED_BIT |
+                                                       VK_SUBGROUP_FEATURE_QUAD_BIT;
                        if (pdevice->rad_info.chip_class >= GFX8) {
                                properties->supportedOperations |=
-                                                       VK_SUBGROUP_FEATURE_ARITHMETIC_BIT |
-                                                       VK_SUBGROUP_FEATURE_CLUSTERED_BIT |
                                                        VK_SUBGROUP_FEATURE_SHUFFLE_BIT |
                                                        VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT;
                        }