From 7b79db11c2eadb4913de97d6413386b83d6ae390 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 6 Apr 2021 07:41:58 +1000 Subject: [PATCH] lavapipe: enable correct workgroup sizing If I say layering violation, you say? Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/frontends/lavapipe/lvp_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index 70d75ad3c89..4fc52eda644 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -757,6 +757,7 @@ VKAPI_ATTR void VKAPI_CALL lvp_GetPhysicalDeviceProperties(VkPhysicalDevice phys } +extern unsigned lp_native_vector_width; static void lvp_get_physical_device_properties_1_1(struct lvp_physical_device *pdevice, VkPhysicalDeviceVulkan11Properties *p) @@ -770,7 +771,7 @@ lvp_get_physical_device_properties_1_1(struct lvp_physical_device *pdevice, p->deviceLUIDValid = false; p->deviceNodeMask = 0; - p->subgroupSize = 8; + p->subgroupSize = lp_native_vector_width / 32; p->subgroupSupportedStages = VK_SHADER_STAGE_FRAGMENT_BIT | VK_SHADER_STAGE_COMPUTE_BIT; p->subgroupSupportedOperations = VK_SUBGROUP_FEATURE_BASIC_BIT | VK_SUBGROUP_FEATURE_VOTE_BIT | VK_SUBGROUP_FEATURE_ARITHMETIC_BIT | VK_SUBGROUP_FEATURE_BALLOT_BIT; p->subgroupQuadOperationsInAllStages = false;