From 556ee970d98aff7ab6d584cf548e82193e3d6232 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 9 Dec 2021 12:02:41 +0200 Subject: [PATCH] Don't try to bind descriptor sets if there aren't any --- source/backends/vulkan/pipelinestate_backend.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/backends/vulkan/pipelinestate_backend.cpp b/source/backends/vulkan/pipelinestate_backend.cpp index 89234821..efcc9613 100644 --- a/source/backends/vulkan/pipelinestate_backend.cpp +++ b/source/backends/vulkan/pipelinestate_backend.cpp @@ -374,7 +374,8 @@ void VulkanPipelineState::apply(VkCommandBuffer command_buffer) const } } - vk.CmdBindDescriptorSets(command_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS, self.shprog->layout_handle, 0, descriptor_set_handles.size(), descriptor_set_handles.data(), 0, 0); + if(!descriptor_set_handles.empty()) + vk.CmdBindDescriptorSets(command_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS, self.shprog->layout_handle, 0, descriptor_set_handles.size(), descriptor_set_handles.data(), 0, 0); VkViewport viewport = { }; if(self.viewport) -- 2.43.0