forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompute_pipeline_vk.h
More file actions
58 lines (42 loc) · 1.83 KB
/
compute_pipeline_vk.h
File metadata and controls
58 lines (42 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_COMPUTE_PIPELINE_VK_H_
#define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_COMPUTE_PIPELINE_VK_H_
#include <memory>
#include "flutter/fml/macros.h"
#include "impeller/base/backend_cast.h"
#include "impeller/renderer/backend/vulkan/device_holder_vk.h"
#include "impeller/renderer/backend/vulkan/vk.h"
#include "impeller/renderer/pipeline.h"
namespace impeller {
class ComputePipelineVK final
: public Pipeline<ComputePipelineDescriptor>,
public BackendCast<ComputePipelineVK,
Pipeline<ComputePipelineDescriptor>> {
public:
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);
// |Pipeline|
~ComputePipelineVK() override;
const vk::Pipeline& GetPipeline() const;
const vk::PipelineLayout& GetPipelineLayout() const;
const vk::DescriptorSetLayout& GetDescriptorSetLayout() const;
private:
friend class PipelineLibraryVK;
std::weak_ptr<DeviceHolderVK> device_holder_;
vk::UniquePipeline pipeline_;
vk::UniquePipelineLayout layout_;
vk::UniqueDescriptorSetLayout descriptor_set_layout_;
bool is_valid_ = false;
// |Pipeline|
bool IsValid() const override;
ComputePipelineVK(const ComputePipelineVK&) = delete;
ComputePipelineVK& operator=(const ComputePipelineVK&) = delete;
};
} // namespace impeller
#endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_COMPUTE_PIPELINE_VK_H_