radv: Only expose subgroup shuffles on VI+.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 30 May 2018 06:50:03 +0000 (08:50 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 30 May 2018 11:49:46 +0000 (13:49 +0200)
The current implementation depends on bpermute, which
is VI+.

Fixes: f2c6a550611 "radv: enable subgroup capabilities"
Reviewed-by: Daniel Schürmann <daniel.schuermann@campus.tu-berlin.de>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_device.c

index 61b4fba23f840e453d32e4434eedf54104239b0f..93b6e6110675878126c4fdf2cdd0195983f91260 100644 (file)
@@ -963,9 +963,12 @@ void radv_GetPhysicalDeviceProperties2(
                                                        VK_SUBGROUP_FEATURE_BASIC_BIT |
                                                        VK_SUBGROUP_FEATURE_BALLOT_BIT |
                                                        VK_SUBGROUP_FEATURE_QUAD_BIT |
-                                                       VK_SUBGROUP_FEATURE_SHUFFLE_BIT |
-                                                       VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT |
                                                        VK_SUBGROUP_FEATURE_VOTE_BIT;
+                       if (pdevice->rad_info.chip_class >= VI) {
+                               properties->supportedOperations |=
+                                                       VK_SUBGROUP_FEATURE_SHUFFLE_BIT |
+                                                       VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT;
+                       }
                        properties->quadOperationsInAllStages = true;
                        break;
                }