X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fvulkan%2Fpipelinestate_backend.h;h=d033fbb8591897309cd4e7c106a204600cd19063;hb=c737d292d49d2d39b44e1cd903c1f8b79174f0d7;hp=d7ef4a20bf97483ade9b2c818228d59352e2628e;hpb=99ca354f18119f82f1adeca100cd665a8f640317;p=libs%2Fgl.git diff --git a/source/backends/vulkan/pipelinestate_backend.h b/source/backends/vulkan/pipelinestate_backend.h index d7ef4a20..d033fbb8 100644 --- a/source/backends/vulkan/pipelinestate_backend.h +++ b/source/backends/vulkan/pipelinestate_backend.h @@ -11,27 +11,34 @@ class Device; 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 &&); + static bool can_bind_tex_level(unsigned) { return true; } + void update() const; void refresh() const { if(changes) update(); } 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) const; + void apply(VkCommandBuffer, const VulkanPipelineState *, unsigned, bool) const; }; using PipelineStateBackend = VulkanPipelineState;