From 626c0cd3bf069016dfaabb6278c9158f82bb5ebd Mon Sep 17 00:00:00 2001 From: hyzboy Date: Mon, 30 Nov 2020 16:52:38 +0800 Subject: [PATCH] add offset param at BindDescriptorSets function. --- inc/hgl/graph/VKCommandBuffer.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/inc/hgl/graph/VKCommandBuffer.h b/inc/hgl/graph/VKCommandBuffer.h index bb1ddd19..13f510f8 100644 --- a/inc/hgl/graph/VKCommandBuffer.h +++ b/inc/hgl/graph/VKCommandBuffer.h @@ -99,6 +99,17 @@ public: return(true); } + bool BindDescriptorSets(DescriptorSets *dsl,const uint32_t offset) + { + if(!dsl)return(false); + + pipeline_layout=dsl->GetPipelineLayout(); + + vkCmdBindDescriptorSets(cmd_buf,VK_PIPELINE_BIND_POINT_GRAPHICS,pipeline_layout,0,1,dsl->GetDescriptorSets(),1,&offset); + + return(true); + } + bool PushDescriptorSet(VkPipelineLayout pipeline_layout,uint32_t set,uint32_t count,const VkWriteDescriptorSet *write_desc_set) { vkCmdPushDescriptorSetKHR(cmd_buf,VK_PIPELINE_BIND_POINT_GRAPHICS,pipeline_layout,set,count,write_desc_set);