X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fvulkan%2Fpipelinestate_backend.h;h=175c291383b825bcd2e348dbebb00f129ede3da6;hb=cebf1330ef6773b7b4496dc279ec02a7ca4351bb;hp=d482081bb400d4bc987c71048366eee26585536d;hpb=b7808c60e0bbbb198500066880b6ed37c0b0e9d0;p=libs%2Fgl.git diff --git a/source/backends/vulkan/pipelinestate_backend.h b/source/backends/vulkan/pipelinestate_backend.h index d482081b..175c2913 100644 --- a/source/backends/vulkan/pipelinestate_backend.h +++ b/source/backends/vulkan/pipelinestate_backend.h @@ -8,9 +8,11 @@ namespace Msp { namespace GL { class Device; +class VulkanCommandRecorder; class VulkanPipelineState: public NonCopyable { + friend class DescriptorPool; friend class PipelineCache; friend class VulkanCommands; @@ -18,8 +20,10 @@ protected: Device &device; mutable unsigned changes = 0; mutable unsigned unapplied = 0; - mutable VkPipeline handle; - mutable std::vector descriptor_set_handles; + mutable VkPipeline handle = 0; + mutable std::vector descriptor_set_slots; + mutable unsigned first_changed_desc_set = 0; + mutable std::uint32_t push_const_compat = 0; VulkanPipelineState(); VulkanPipelineState(VulkanPipelineState &&); @@ -30,11 +34,15 @@ protected: void refresh() const { if(changes) update(); } std::uint64_t compute_hash() const; void fill_creation_info(std::vector &) const; + void fill_graphics_creation_info(std::vector &) const; + void fill_compute_creation_info(std::vector &) const; std::uint64_t compute_descriptor_set_hash(unsigned) const; + bool is_descriptor_set_dynamic(unsigned) const; VkDescriptorSetLayout get_descriptor_set_layout(unsigned) const; - unsigned fill_descriptor_writes(unsigned, std::vector &) const; + unsigned fill_descriptor_writes(unsigned, unsigned, std::vector &) const; - void apply(VkCommandBuffer, const VulkanPipelineState *, unsigned, bool) const; + void synchronize_resources(bool) const; + void apply(const VulkanCommandRecorder &, const VulkanPipelineState *, unsigned, bool) const; }; using PipelineStateBackend = VulkanPipelineState;