-
Notifications
You must be signed in to change notification settings - Fork 51
Description
Following the guide, when SPIR-V code is added in 01_Shader_modules.adoc the validation layer reports the following error:
Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-08740 ] | MessageID = 0x6e224e9
vkCreateShaderModule(): SPIR-V Capability DrawParameters was declared, but one of the following requirements is required (VkPhysicalDeviceVulkan11Features::shaderDrawParameters OR VK_KHR_shader_draw_parameters).
The Vulkan spec states: If pCode is a pointer to SPIR-V code, and pCode declares any of the capabilities listed in the SPIR-V Environment appendix, one of the corresponding requirements must be satisfied (https://docs.vulkan.org/spec/latest/chapters/shaders.html#VUID-VkShaderModuleCreateInfo-pCode-08740)
I've found that adding vk::KHRShaderDrawParametersExtensionName to the list of extensions fix the problem.
The attached patch add this to the example code and updates en/03_Drawing_a_triangle/02_Graphics_pipeline_basics/01_Shader_modules.adoc. However, the explanation need elaboration why it's necessary.
0001-Added-vk-KHRShaderDrawParametersExtensionName-to-req.patch