diff --git a/renderdoc/driver/vulkan/wrappers/vk_descriptor_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_descriptor_funcs.cpp index 83f022be4..6f690c6c9 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_descriptor_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_descriptor_funcs.cpp @@ -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; } diff --git a/util/test/demos/vk/vk_parameter_zoo.cpp b/util/test/demos/vk/vk_parameter_zoo.cpp index 693c4c29a..673fb7951 100644 --- a/util/test/demos/vk/vk_parameter_zoo.cpp +++ b/util/test/demos/vk/vk_parameter_zoo.cpp @@ -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;