From: Mikko Rasa Date: Thu, 9 Dec 2021 10:02:41 +0000 (+0200) Subject: Don't try to bind descriptor sets if there aren't any X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=556ee970d98aff7ab6d584cf548e82193e3d6232 Don't try to bind descriptor sets if there aren't any --- 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)