| Flutter Impeller |

compute_pipeline_vk.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_COMPUTE_PIPELINE_VK_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_COMPUTE_PIPELINE_VK_H_
7
8 #include <memory>
9
10 #include "impeller/base/backend_cast.h"
11 #include "impeller/renderer/backend/vulkan/device_holder_vk.h"
12 #include "impeller/renderer/backend/vulkan/vk.h"
13 #include "impeller/renderer/pipeline.h"
14
15 namespace impeller {
16
17 class ComputePipelineVK final
18 : public Pipeline<ComputePipelineDescriptor>,
19 public BackendCast<ComputePipelineVK,
20 Pipeline<ComputePipelineDescriptor>> {
21 public:
22 ComputePipelineVK(std::weak_ptr<DeviceHolderVK> device_holder,
23 std::weak_ptr<PipelineLibrary> library,
24 const ComputePipelineDescriptor& desc,
25 vk::UniquePipeline pipeline,
26 vk::UniquePipelineLayout layout,
27 vk::UniqueDescriptorSetLayout descriptor_set_layout,
28 PipelineKey pipeline_key);
29
30 // |Pipeline|
31 ~ComputePipelineVK() override;
32
33 const vk::Pipeline& GetPipeline() const;
34
35 const vk::PipelineLayout& GetPipelineLayout() const;
36
37 const vk::DescriptorSetLayout& GetDescriptorSetLayout() const;
38
39 /// @brief Retrieve the unique identifier for this pipeline's descriptor set
40 /// layout.
41 PipelineKey GetPipelineKey() const;
42
43 private:
44 friend class PipelineLibraryVK;
45
46 std::weak_ptr<DeviceHolderVK> device_holder_;
47 vk::UniquePipeline pipeline_;
48 vk::UniquePipelineLayout layout_;
49 vk::UniqueDescriptorSetLayout descriptor_set_layout_;
50 const PipelineKey pipeline_key_;
51 bool is_valid_ = false;
52
53 // |Pipeline|
54 bool IsValid() const override;
55
56 ComputePipelineVK(const ComputePipelineVK&) = delete;
57
58 ComputePipelineVK& operator=(const ComputePipelineVK&) = delete;
59 };
60
61 } // namespace impeller
62
63 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_COMPUTE_PIPELINE_VK_H_
backend_cast.h
impeller::BackendCast
Definition: backend_cast.h:11
impeller::ComputePipelineDescriptor
Definition: compute_pipeline_descriptor.h:21
impeller::ComputePipelineVK
Definition: compute_pipeline_vk.h:20
impeller::ComputePipelineVK::GetDescriptorSetLayout
const vk::DescriptorSetLayout & GetDescriptorSetLayout() const
Definition: compute_pipeline_vk.cc:51
impeller::ComputePipelineVK::~ComputePipelineVK
~ComputePipelineVK() override
Definition: compute_pipeline_vk.cc:26
impeller::ComputePipelineVK::GetPipeline
const vk::Pipeline & GetPipeline() const
Definition: compute_pipeline_vk.cc:43
impeller::ComputePipelineVK::GetPipelineLayout
const vk::PipelineLayout & GetPipelineLayout() const
Definition: compute_pipeline_vk.cc:47
impeller::ComputePipelineVK::GetPipelineKey
PipelineKey GetPipelineKey() const
Retrieve the unique identifier for this pipeline's descriptor set layout.
Definition: compute_pipeline_vk.cc:56
impeller::ComputePipelineVK::ComputePipelineVK
ComputePipelineVK(std::weak_ptr< DeviceHolderVK > device_holder, std::weak_ptr< PipelineLibrary > library, const ComputePipelineDescriptor &desc, vk::UniquePipeline pipeline, vk::UniquePipelineLayout layout, vk::UniqueDescriptorSetLayout descriptor_set_layout, PipelineKey pipeline_key)
Definition: compute_pipeline_vk.cc:9
impeller::Pipeline
Describes the fixed function and programmable aspects of rendering and compute operations performed b...
Definition: pipeline.h:52
impeller::PipelineLibraryVK
Definition: pipeline_library_vk.h:27
device_holder_vk.h
impeller
Definition: allocation.cc:12
impeller::PipelineKey
int64_t PipelineKey
Definition: pipeline.h:21
pipeline.h
vk.h