| 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
29 // |Pipeline|
30 ~ComputePipelineVK() override;
31
32 const vk::Pipeline& GetPipeline() const;
33
34 const vk::PipelineLayout& GetPipelineLayout() const;
35
36 const vk::DescriptorSetLayout& GetDescriptorSetLayout() const;
37
38 private:
39 friend class PipelineLibraryVK;
40
41 std::weak_ptr<DeviceHolderVK> device_holder_;
42 vk::UniquePipeline pipeline_;
43 vk::UniquePipelineLayout layout_;
44 vk::UniqueDescriptorSetLayout descriptor_set_layout_;
45 bool is_valid_ = false;
46
47 // |Pipeline|
48 bool IsValid() const override;
49
50 ComputePipelineVK(const ComputePipelineVK&) = delete;
51
52 ComputePipelineVK& operator=(const ComputePipelineVK&) = delete;
53 };
54
55 } // namespace impeller
56
57 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_COMPUTE_PIPELINE_VK_H_
impeller::Pipeline
Describes the fixed function and programmable aspects of rendering and compute operations performed b...
Definition: compute_pipeline_descriptor.h:18
impeller::ComputePipelineDescriptor
Definition: compute_pipeline_descriptor.h:20
impeller::ComputePipelineVK::GetPipelineLayout
const vk::PipelineLayout & GetPipelineLayout() const
Definition: compute_pipeline_vk.cc:45
pipeline.h
impeller::ComputePipelineVK::~ComputePipelineVK
~ComputePipelineVK() override
Definition: compute_pipeline_vk.cc:24
impeller::PipelineLibraryVK
Definition: pipeline_library_vk.h:24
vk.h
device_holder_vk.h
impeller::ComputePipelineVK::GetDescriptorSetLayout
const vk::DescriptorSetLayout & GetDescriptorSetLayout() const
Definition: compute_pipeline_vk.cc:49
backend_cast.h
impeller::BackendCast
Definition: backend_cast.h:11
impeller::ComputePipelineVK::GetPipeline
const vk::Pipeline & GetPipeline() const
Definition: compute_pipeline_vk.cc:41
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)
Definition: compute_pipeline_vk.cc:9
impeller::ComputePipelineVK
Definition: compute_pipeline_vk.h:17
impeller
Definition: aiks_blend_unittests.cc:18