VulkanSceneGraph icon indicating copy to clipboard operation
VulkanSceneGraph copied to clipboard

Curious Vulkan Validation errors

Open robertosfield opened this issue 1 year ago • 0 comments

Since updating to Kubuntu 24.04 and installing the VulkanSDK as an debian packaged I have done some tests with enabling of the Vulkan Validation Layer and getting some new errors reported, I presume due to extra checks being added to recent rev's of the Vulkan Validation Layer. The first set of tests I'm so far a bit perplexed by, following the suggest doc links hasn't yet shown where things might be amiss. To start with we have the vkCreateShaderModule and vkCreateGraphicsPipelines throwing up errors that can be reproduced running vsgbuilder -d:

$ vsgbuilder -d
VUID-VkShaderModuleCreateInfo-pCode-08737(ERROR / SPEC): msgNum: -1520283006 - Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-08737 ] | MessageID = 0xa5625282 | vkCreateShaderModule(): pCreateInfo->pCode (spirv-val produced an error):
Expected Image to have the same type as Result Type Image
  %184 = OpSampledImage %183 %177 %181
. 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.290.0/linux/1.3-extensions/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-08737)
    Objects: 0
VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849(ERROR / SPEC): msgNum: 1132206547 - Validation Error: [ VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849 ] | MessageID = 0x437c19d3 | vkCreateGraphicsPipelines(): pCreateInfos[0].pStages[1] After specialization was applied, VkShaderModule 0x95a125000000001a[] produces a spirv-val error (stage VK_SHADER_STAGE_FRAGMENT_BIT):
Expected Image to have the same type as Result Type Image
  %184 = OpSampledImage %183 %177 %181
. The Vulkan spec states: If a shader module identifier is not specified, the shader code used by the pipeline must be valid as described by the Khronos SPIR-V Specification after applying the specializations provided in pSpecializationInfo, if any, and then converting all specialization constants into fixed constants (https://vulkan.lunarg.com/doc/view/1.3.290.0/linux/1.3-extensions/vkspec.html#VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849)
    Objects: 0

robertosfield avatar Oct 04 '24 11:10 robertosfield