[Mesa-dev] [PATCH] radv: enable VK_SUBGROUP_FEATURE_ARITHMETIC_BIT

Samuel Pitoiset samuel.pitoiset at gmail.com
Tue Sep 18 13:27:52 UTC 2018


All CTS pass on Polaris/Vega with LLVM 6, 7 and master, so
I think it's safe to enable the feature.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/amd/vulkan/radv_device.c | 1 +
 src/amd/vulkan/radv_shader.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index f9169d9d01..7e46a57fb5 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -1061,6 +1061,7 @@ void radv_GetPhysicalDeviceProperties2(
 			properties->subgroupSize = 64;
 			properties->supportedStages = VK_SHADER_STAGE_ALL;
 			properties->supportedOperations =
+							VK_SUBGROUP_FEATURE_ARITHMETIC_BIT |
 							VK_SUBGROUP_FEATURE_BASIC_BIT |
 							VK_SUBGROUP_FEATURE_BALLOT_BIT |
 							VK_SUBGROUP_FEATURE_QUAD_BIT |
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index c59b783f4a..9c038a5570 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -212,6 +212,7 @@ radv_shader_compile_to_nir(struct radv_device *device,
 				.int64 = true,
 				.int16 = true,
 				.multiview = true,
+				.subgroup_arithmetic = true,
 				.subgroup_ballot = true,
 				.subgroup_basic = true,
 				.subgroup_quad = true,
-- 
2.19.0



More information about the mesa-dev mailing list