From ab8e7e50060830eb0135ed3e830c3750aaf961d9 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Tue, 9 Feb 2021 11:08:48 +0000 Subject: [PATCH] Vulkan: VK_EXT_subgroup_size_control should be chained on the stage Previousl the VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT was chained on the VkComputePielineCreateInfo when instead it should be chained on the VkPipelineShaderStageCreateInfo, causing Vulkan Validation errors. Fixed: dawn:671 Change-Id: I9cc803a4f9120cf81f4e143818c3be58b73635d8 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40604 Reviewed-by: Austin Eng Reviewed-by: Hao Li Reviewed-by: Corentin Wallez Reviewed-by: Jiawei Shao Auto-Submit: Corentin Wallez Commit-Queue: Corentin Wallez --- src/dawn_native/vulkan/ComputePipelineVk.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dawn_native/vulkan/ComputePipelineVk.cpp b/src/dawn_native/vulkan/ComputePipelineVk.cpp index f681547655..b4e1c3016f 100644 --- a/src/dawn_native/vulkan/ComputePipelineVk.cpp +++ b/src/dawn_native/vulkan/ComputePipelineVk.cpp @@ -51,14 +51,14 @@ namespace dawn_native { namespace vulkan { Device* device = ToBackend(GetDevice()); - PNextChainBuilder extChain(&createInfo); + PNextChainBuilder stageExtChain(&createInfo.stage); VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT subgroupSizeInfo = {}; uint32_t computeSubgroupSize = device->GetComputeSubgroupSize(); if (computeSubgroupSize != 0u) { ASSERT(device->GetDeviceInfo().HasExt(DeviceExt::SubgroupSizeControl)); subgroupSizeInfo.requiredSubgroupSize = computeSubgroupSize; - extChain.Add( + stageExtChain.Add( &subgroupSizeInfo, VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT); }