I’ve just switched from Vulkan 1.2.198 to Vulkan 1.3.224 and the creation of a compute pipeline stopped working giving me the error I wrote in the title.
I’ve attached the problematic shader on this post, you can find both the source code and the compiled SPV code. (To compile it I’ve used glslc --target-env=vulkan1.3 --target-spv=spv1.4 …).
The command I used to recompile the shader (run in ./shaders directory): glslc --target-env=vulkan1.3 --target-spv=spv1.4 -I . -g shade.comp -o shade.comp.spv
Hi there @loryruta, welcome to the NVIDIA developer forums!
Thank you for the additional information, hopefully this will help us help you!
@AndreyOGL_D3D thank you for stepping up! If you are able to use the provided code and reproduce, please do not hesitate to share your insights. That is very much appreciated!
Meanwhile I will see if i can bring some engineers in on this topic.
I’ve edited a little bit the repro so you can easily check driver version/device name and whether it’s working or not. If it writes “ALL OK!” then the pipeline has correctly been created.
Pack Visual Studio solution, some people doesn’t know about CMake, ninja, meson…
Use Vulkan Validation layers!
You have some errors: Intel UHD 630:
Vulkan Debug Ouput: ERROR: [VUID-VkPipelineLayoutCreateInfo-descriptorType-03016] Code 1451322977 : Validation Error: [ VUID-VkPipelineLayoutCreateInfo-descriptorType-03016 ] Object 0: handle = 0x2aaef44c728, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x56816e61 | vkCreatePipelineLayout(): max per-stage sampler bindings count (65539) exceeds device maxPerStageDescriptorSamplers limit (64). The Vulkan spec states: The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a descriptorType of VK_DESCRIPTOR_TYPE_SAMPLER and VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER accessible to any given shader stage across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxPerStageDescriptorSamplers (Vulkan® 1.3.224 - A Specification (with all registered extensions))
Vulkan Debug Ouput: ERROR: [VUID-VkPipelineLayoutCreateInfo-descriptorType-03019] Code 123232845 : Validation Error: [ VUID-VkPipelineLayoutCreateInfo-descriptorType-03019 ] Object 0: handle = 0x2aaef44c728, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x758624d | vkCreatePipelineLayout(): max per-stage sampled image bindings count (65539) exceeds device maxPerStageDescriptorSampledImages limit (200). The Vulkan spec states: The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a descriptorType of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER accessible to any given shader stage across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxPerStageDescriptorSampledImages (Vulkan® 1.3.224 - A Specification (with all registered extensions))
Vulkan Debug Ouput: ERROR: [VUID-VkPipelineLayoutCreateInfo-descriptorType-03028] Code 1649030924 : Validation Error: [ VUID-VkPipelineLayoutCreateInfo-descriptorType-03028 ] Object 0: handle = 0x2aaef44c728, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x624a370c | vkCreatePipelineLayout(): sum of sampler bindings among all stages (65539) exceeds device maxDescriptorSetSamplers limit (576). The Vulkan spec states: The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a descriptorType of VK_DESCRIPTOR_TYPE_SAMPLER and VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER accessible across all shader stages and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetSamplers (Vulkan® 1.3.224 - A Specification (with all registered extensions))
Vulkan Debug Ouput: ERROR: [VUID-VkPipelineLayoutCreateInfo-descriptorType-03033] Code 1719637218 : Validation Error: [ VUID-VkPipelineLayoutCreateInfo-descriptorType-03033 ] Object 0: handle = 0x2aaef44c728, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x667f94e2 | vkCreatePipelineLayout(): sum of sampled image bindings among all stages (65539) exceeds device maxDescriptorSetSampledImages limit (1800). The Vulkan spec states: The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a descriptorType of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER accessible across all shader stages and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetSampledImages (Vulkan® 1.3.224 - A Specification (with all registered extensions))
Vulkan Debug Ouput: ERROR: [VUID-VkComputePipelineCreateInfo-layout-01687] Code 1932956818 : Validation Error: [ VUID-VkComputePipelineCreateInfo-layout-01687 ] Object 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_PIPELINE; | MessageID = 0x73369492 | Invalid Pipeline CreateInfo State: Shader Stage VK_SHADER_STAGE_COMPUTE_BIT exceeds component limit VkPhysicalDeviceLimits::maxPerStageResources (200) The Vulkan spec states: The number of resources in layout accessible to the compute shader stage must be less than or equal to VkPhysicalDeviceLimits::maxPerStageResources (Vulkan® 1.3.224 - A Specification (with all registered extensions))
Vulkan Debug Ouput: WARNING: [UNASSIGNED-BestPractices-SpirvDeprecated_WorkgroupSize] Code 2076578180 : Validation Warning: [ UNASSIGNED-BestPractices-SpirvDeprecated_WorkgroupSize ] Object 0: handle = 0x2aaef44c728, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x7bc61184 | vkCreateComputePipelines(): pCreateInfos[ 0] is using the Workgroup built-in which SPIR-V 1.6 deprecated. The VK_KHR_maintenance4 extension exposes a new LocalSizeId execution mode that should be used instead.
nVidia 1030:
Vulkan Debug Ouput: WARNING: [UNASSIGNED-BestPractices-SpirvDeprecated_WorkgroupSize] Code 2076578180 : Validation Warning: [ UNASSIGNED-BestPractices-SpirvDeprecated_WorkgroupSize ] Object 0: handle = 0x274c016b1d0, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x7bc61184 | vkCreateComputePipelines(): pCreateInfos[ 0] is using the Workgroup built-in which SPIR-V 1.6 deprecated. The VK_KHR_maintenance4 extension exposes a new LocalSizeId execution mode that should be used instead.
Vulkan Debug Ouput: ERROR: [VUID-vkDestroyDevice-device-00378] Code 1901072314 : Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x274c016b1d0, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0xead9370000000008, type = VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x274c016b1d0, VkDescriptorSetLayout 0xead9370000000008 has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (Vulkan® 1.3.224 - A Specification (with all registered extensions))
Vulkan Debug Ouput: ERROR: [VUID-vkDestroyDevice-device-00378] Code 1901072314 : Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x274c016b1d0, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0xcb3ee80000000007, type = VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x274c016b1d0, VkDescriptorSetLayout 0xcb3ee80000000007 has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (Vulkan® 1.3.224 - A Specification (with all registered extensions))
Vulkan Debug Ouput: ERROR: [VUID-vkDestroyDevice-device-00378] Code 1901072314 : Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x274c016b1d0, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0xe7f79a0000000005, type = VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x274c016b1d0, VkDescriptorSetLayout 0xe7f79a0000000005 has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (Vulkan® 1.3.224 - A Specification (with all registered extensions))
Vulkan Debug Ouput: ERROR: [VUID-vkDestroyDevice-device-00378] Code 1901072314 : Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x274c016b1d0, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0xf443490000000006, type = VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x274c016b1d0, VkDescriptorSetLayout 0xf443490000000006 has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (Vulkan® 1.3.224 - A Specification (with all registered extensions))
Vulkan Debug Ouput: ERROR: [VUID-vkDestroyDevice-device-00378] Code 1901072314 : Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x274c016b1d0, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0xcfef35000000000a, type = VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x274c016b1d0, VkDescriptorSetLayout 0xcfef35000000000a has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (Vulkan® 1.3.224 - A Specification (with all registered extensions))
Vulkan Debug Ouput: ERROR: [VUID-vkDestroyDevice-device-00378] Code 1901072314 : Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x274c016b1d0, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0xee647e0000000009, type = VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x274c016b1d0, VkDescriptorSetLayout 0xee647e0000000009 has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (Vulkan® 1.3.224 - A Specification (with all registered extensions))
Your last
API version: 1.3.205 Device name: NVIDIA GeForce GT 1030 Driver version: 516.376.0 ALL OK!
API version: 1.3.212 Device name: Intel(R) UHD Graphics Driver version: 0.404.1994 ALL OK!
Yes, I’ve packed the first repro version fast, I’ve built it using the Debug configuration and I’ve packed the whole binary folder. For the second one I’ve used the Release configuration so those files aren’t there anymore.
Surely people are much more familiar with a Visual Studio solutions, but using CMake I could also target people on a Linux environment so I thought it’d have been better.
I’ve used Validation layers and I had no errors!
Intel UHD 630 gives errors because of its limited capabilities.
NVIDIA 1030 gives errors on exit (at vkDestroyDevice), so no way I could see those because it has crashed before reaching them.
However, excluding Intel UHD 630 which basically gives errors at every line, I’m happy to see it works on NVIDIA 1030. So it must be an issue with my specific GPU and driver version. Hope this tests will be helpful for NVIDIA engineers