VUID-VkShaderModuleCreateInfo-pCode-08737(ERROR / SPEC): msgNum: -1520283006 - Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-08737 ] | MessageID = 0xa5625282 | vkCreateShaderModule(): pCreateInfo->pCode is not valid SPIR-V: OpVariable 8: expected AliasedPointer or RestrictPointer for PhysicalStorageBuffer pointer.
%b = OpVariable %_ptr_Function_6 Function
. The Vulkan spec states: If pCode is a pointer to SPIR-V code, pCode must adhere to the validation rules described by the Validation Rules within a Module section of the SPIR-V Environment appendix (https://vulkan.lunarg.com/doc/view/1.3.268.0/windows/1.3-extensions/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-08737)
Objects: 0
The error vanishes as soon as the conditional assignment for b is removed.
For the following repro:
I get the following validation error:
The error vanishes as soon as the conditional assignment for b is removed.
Config: