| Flutter Impeller |

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 #pragma once
6
7 #include <memory>
8
9 #include "flutter/fml/macros.h"
10 #include "impeller/base/backend_cast.h"
11 #include "impeller/renderer/backend/vulkan/device_holder.h"
12 #include "impeller/renderer/backend/vulkan/vk.h"
13 #include "impeller/renderer/pipeline.h"
14
15 namespace impeller {
16
17 class PipelineVK final
18 : public Pipeline<PipelineDescriptor>,
19 public BackendCast<PipelineVK, Pipeline<PipelineDescriptor>> {
20 public:
21 PipelineVK(std::weak_ptr<DeviceHolder> device_holder,
22 std::weak_ptr<PipelineLibrary> library,
23 const PipelineDescriptor& desc,
24 vk::UniquePipeline pipeline,
25 vk::UniqueRenderPass render_pass,
26 vk::UniquePipelineLayout layout,
27 vk::UniqueDescriptorSetLayout descriptor_set_layout);
28
29 // |Pipeline|
30 ~PipelineVK() override;
31
32 const vk::Pipeline& GetPipeline() const;
33
34 const vk::RenderPass& GetRenderPass() const;
35
36 const vk::PipelineLayout& GetPipelineLayout() const;
37
38 const vk::DescriptorSetLayout& GetDescriptorSetLayout() const;
39
40 private:
41 friend class PipelineLibraryVK;
42
43 std::weak_ptr<DeviceHolder> device_holder_;
44 vk::UniquePipeline pipeline_;
45 vk::UniqueRenderPass render_pass_;
46 vk::UniquePipelineLayout layout_;
47 vk::UniqueDescriptorSetLayout descriptor_set_layout_;
48 bool is_valid_ = false;
49
50 // |Pipeline|
51 bool IsValid() const override;
52
53 FML_DISALLOW_COPY_AND_ASSIGN(PipelineVK);
54 };
55
56 } // namespace impeller
impeller::PipelineDescriptor
Definition: pipeline_descriptor.h:30
impeller::Pipeline
Describes the fixed function and programmable aspects of rendering and compute operations performed b...
Definition: compute_pipeline_descriptor.h:27
pipeline.h
impeller::PipelineLibraryVK
Definition: pipeline_library_vk.h:25
impeller::PipelineVK::GetRenderPass
const vk::RenderPass & GetRenderPass() const
Definition: pipeline_vk.cc:48
device_holder.h
impeller::PipelineVK::~PipelineVK
~PipelineVK() override
Definition: pipeline_vk.cc:25
impeller::PipelineVK::GetPipelineLayout
const vk::PipelineLayout & GetPipelineLayout() const
Definition: pipeline_vk.cc:52
impeller::PipelineVK::GetPipeline
const vk::Pipeline & GetPipeline() const
Definition: pipeline_vk.cc:44
impeller::PipelineVK
Definition: pipeline_vk.h:17
vk.h
backend_cast.h
impeller::PipelineVK::PipelineVK
PipelineVK(std::weak_ptr< DeviceHolder > device_holder, std::weak_ptr< PipelineLibrary > library, const PipelineDescriptor &desc, vk::UniquePipeline pipeline, vk::UniqueRenderPass render_pass, vk::UniquePipelineLayout layout, vk::UniqueDescriptorSetLayout descriptor_set_layout)
Definition: pipeline_vk.cc:9
impeller::BackendCast
Definition: backend_cast.h:12
impeller::PipelineVK::GetDescriptorSetLayout
const vk::DescriptorSetLayout & GetDescriptorSetLayout() const
Definition: pipeline_vk.cc:56
impeller
Definition: aiks_context.cc:10