#ifndef HGL_GRAPH_VULKAN_DESCRIPTOR_SETS_LAYOUT_INCLUDE #define HGL_GRAPH_VULKAN_DESCRIPTOR_SETS_LAYOUT_INCLUDE #include #include VK_NAMESPACE_BEGIN class GPUBuffer; class DescriptorSets { VkDevice device; int count; VkDescriptorSet desc_set; const Map *index_by_binding; VkPipelineLayout pipeline_layout; ObjectList buffer_list; ObjectList image_list; List wds_list; private: friend class DescriptorSetLayoutCreater; DescriptorSets(VkDevice dev,const int c,VkPipelineLayout pl,VkDescriptorSet ds,const Map *bi):index_by_binding(bi) { device=dev; count=c; desc_set=ds; pipeline_layout=pl; } public: ~DescriptorSets()=default; const uint32_t GetCount ()const{return count;} const VkDescriptorSet * GetDescriptorSets ()const{return &desc_set;} const VkPipelineLayout GetPipelineLayout ()const{return pipeline_layout;} void Clear(); bool BindUBO(const int binding,const GPUBuffer *); bool BindUBO(const int binding,const GPUBuffer *,const VkDeviceSize offset,const VkDeviceSize range); bool BindUBODynamic(const int binding,const GPUBuffer *); bool BindSampler(const int binding,Texture *,Sampler *); bool BindInputAttachment(const int binding,Texture *); void Update(); };//class DescriptorSets VK_NAMESPACE_END #endif//HGL_GRAPH_VULKAN_DESCRIPTOR_SETS_LAYOUT_INCLUDE