Potential Vulkan spec violation
TheJackiMonster opened this issue · comments
Currently I get the following output from the Vulkan validation layer:
VUID-VkPipelineShaderStageCreateInfo-pNext-02755(ERROR / SPEC): msgNum: -2142406189 - Validation Error: [ VUID-VkPipelineShaderStageCreateInfo-pNext-02755 ] Object 0: handle = 0xee4c36000000268e, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x804d79d3 | Stage VK_SHADER_STAGE_COMPUTE_BIT is not in VkPhysicalDeviceSubgroupSizeControlPropertiesEXT::requiredSubgroupSizeStages (Unhandled VkShaderStageFlagBits). The Vulkan spec states: If a VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is included in the pNext chain, the subgroupSizeControl feature must be enabled, and stage must be a valid bit specified in requiredSubgroupSizeStages (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkPipelineShaderStageCreateInfo-pNext-02755)
Objects: 1
[0] 0xee4c36000000268e, type: 15, name: NULL
It seems to be related to the drivers on Linux. RADV and AMDGPU-PRO do not include the VK_SHADER_STAGE_COMPUTE_BIT
in the requiredSubgroupSizeStages
from VkPhysicalDeviceSubgroupSizeControlPropertiesEXT
. That causes a violation regarding the specification when VkPipelineShaderStageRequiredSubgroupSizeCreateInfo
gets used creating the compute shader stages for the FSR2 compute pipelines. AMDVLK works fine because requiredSubgroupSizeStages
contains the valid bit.
I recommend adding a check for that bits before using that feature or the Vulkan specification needs to address a special case when requiredSubgroupSizeStages
is zero (that is currently the case causing the issue).
I've created a commit to apply a fix for the meantime: TheJackiMonster@ec9fcf9
This appears to have been fixed in 2.2.0:
FidelityFX-FSR2/src/ffx-fsr2-api/vk/ffx_fsr2_vk.cpp
Lines 741 to 748 in e812d9e