X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fvulkan%2Fpipelinestate_backend.h;h=37c96a4e2d394f967f0f75d0f0b4f802bea6bab2;hb=2a70fecfbbe8708be2bdaa75d222dd5a889a8ed3;hp=82f664c1c9b881ae7ffafd083111317cde9f6e29;hpb=6d2e2a0bb28496a8c25b441009bdd2a1a1e72d81;p=libs%2Fgl.git diff --git a/source/backends/vulkan/pipelinestate_backend.h b/source/backends/vulkan/pipelinestate_backend.h index 82f664c1..37c96a4e 100644 --- a/source/backends/vulkan/pipelinestate_backend.h +++ b/source/backends/vulkan/pipelinestate_backend.h @@ -8,17 +8,22 @@ namespace Msp { namespace GL { class Device; +class VulkanCommandRecorder; class VulkanPipelineState: public NonCopyable { + friend class DescriptorPool; friend class PipelineCache; friend class VulkanCommands; protected: Device &device; mutable unsigned changes = 0; - mutable VkPipeline handle; - mutable std::vector descriptor_set_handles; + mutable unsigned unapplied = 0; + 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,10 +35,12 @@ protected: std::uint64_t compute_hash() const; void fill_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, unsigned, bool) const; + void synchronize_resources(bool) const; + void apply(const VulkanCommandRecorder &, const VulkanPipelineState *, unsigned, bool) const; }; using PipelineStateBackend = VulkanPipelineState;