KhronosGroup / Vulkan-LoaderAndValidationLayers

**Deprecated repository** for Vulkan loader and validation layers
Apache License 2.0
414 stars 172 forks source link

More robust validation of CreateDescriptorUpdateTemplateKHR #2530

Closed mikes-lunarg closed 6 years ago

mikes-lunarg commented 6 years ago

Issue migrated from https://gitlab.khronos.org/vulkan/LoaderAndValidationLayers/issues/208

Current validation of CreateDescriptorUpdateTemplateKHR' parameters is not checking the following conditions:

https://www.khronos.org/registry/vulkan/specs/1.0-wsi_extensions/html/vkspec.html#VkDescriptorUpdateTemplateCreateInfoKHR

If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR, descriptorSetLayout must be a valid VkDescriptorSetLayout handle

If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR, pipelineBindPoint must be a valid VkPipelineBindPoint value

If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR, pipelineLayout must be a valid VkPipelineLayout handle

If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR, set must be the unique set number in the pipeline layout that uses a descriptor set layout that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR

On 1.1 branch the validation is incorrectly assuming pipelineLayout must always be a valid VkPipelineLayout handle. This causes false validation errors with the test set https://gerrit.khronos.org/#/c/2131/

jzulauf-lunarg commented 6 years ago

Implemented in PR 2552.