Ensure we ignore unused parameters in DescriptorUpdateTemplateCreateInfo

This commit is contained in:
baldurk
2019-12-12 16:55:31 +00:00
parent 0773f13949
commit 848b58826d
2 changed files with 7 additions and 5 deletions
@@ -83,8 +83,10 @@ VkDescriptorUpdateTemplateCreateInfo WrappedVulkan::UnwrapInfo(
{
VkDescriptorUpdateTemplateCreateInfo ret = *info;
ret.pipelineLayout = Unwrap(ret.pipelineLayout);
ret.descriptorSetLayout = Unwrap(ret.descriptorSetLayout);
if(ret.templateType == VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR)
ret.pipelineLayout = Unwrap(ret.pipelineLayout);
if(ret.templateType == VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET)
ret.descriptorSetLayout = Unwrap(ret.descriptorSetLayout);
return ret;
}
+3 -3
View File
@@ -468,8 +468,8 @@ void main()
createInfo.templateType = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR;
createInfo.descriptorSetLayout = setlayout;
createInfo.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
createInfo.pipelineLayout = layout;
createInfo.set = 0;
createInfo.pipelineLayout = (VkPipelineLayout)0x1234;
createInfo.set = 123456789;
VkDescriptorUpdateTemplateKHR templ;
vkCreateDescriptorUpdateTemplateKHR(device, &createInfo, NULL, &templ);
@@ -498,7 +498,7 @@ void main()
createInfo.descriptorUpdateEntryCount = (uint32_t)entries.size();
createInfo.pDescriptorUpdateEntries = entries.data();
createInfo.templateType = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR;
createInfo.descriptorSetLayout = pushlayout;
createInfo.descriptorSetLayout = (VkDescriptorSetLayout)0x1234;
createInfo.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
createInfo.pipelineLayout = layout;
createInfo.set = 1;