5#ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_PIPELINE_VK_H_
6#define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_PIPELINE_VK_H_
29 :
public Pipeline<PipelineDescriptor>,
30 public BackendCast<PipelineVK, Pipeline<PipelineDescriptor>> {
32 static std::unique_ptr<PipelineVK>
Create(
34 const std::shared_ptr<DeviceHolderVK>& device_holder,
35 const std::weak_ptr<PipelineLibrary>& weak_library,
36 std::shared_ptr<SamplerVK> immutable_sampler = {});
48 const std::shared_ptr<SamplerVK>& immutable_sampler)
const;
53 using ImmutableSamplerVariants =
55 std::shared_ptr<PipelineVK>,
59 std::weak_ptr<DeviceHolderVK> device_holder_;
60 vk::UniquePipeline pipeline_;
61 vk::UniqueRenderPass render_pass_;
62 vk::UniquePipelineLayout
layout_;
63 vk::UniqueDescriptorSetLayout descriptor_set_layout_;
64 std::shared_ptr<SamplerVK> immutable_sampler_;
65 mutable Mutex immutable_sampler_variants_mutex_;
66 mutable ImmutableSamplerVariants immutable_sampler_variants_
IPLR_GUARDED_BY(
67 immutable_sampler_variants_mutex_);
68 bool is_valid_ =
false;
70 PipelineVK(std::weak_ptr<DeviceHolderVK> device_holder,
71 std::weak_ptr<PipelineLibrary> library,
73 vk::UniquePipeline pipeline,
74 vk::UniqueRenderPass render_pass,
75 vk::UniquePipelineLayout layout,
76 vk::UniqueDescriptorSetLayout descriptor_set_layout,
77 std::shared_ptr<SamplerVK> immutable_sampler);
80 bool IsValid()
const override;
std::shared_ptr< PipelineVK > CreateVariantForImmutableSamplers(const std::shared_ptr< SamplerVK > &immutable_sampler) const
const vk::PipelineLayout & GetPipelineLayout() const
const vk::DescriptorSetLayout & GetDescriptorSetLayout() const
static std::unique_ptr< PipelineVK > Create(const PipelineDescriptor &desc, const std::shared_ptr< DeviceHolderVK > &device_holder, const std::weak_ptr< PipelineLibrary > &weak_library, std::shared_ptr< SamplerVK > immutable_sampler={})
vk::Pipeline GetPipeline() const
Describes the fixed function and programmable aspects of rendering and compute operations performed b...
static constexpr size_t kMaxBindings
#define IPLR_GUARDED_BY(x)