Flutter Engine
The Flutter Engine
compute_pipeline_descriptor.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_COMPUTE_PIPELINE_DESCRIPTOR_H_
6#define FLUTTER_IMPELLER_RENDERER_COMPUTE_PIPELINE_DESCRIPTOR_H_
7
8#include <memory>
9#include <string>
10
13
14namespace impeller {
15
16class ShaderFunction;
17template <typename T>
18class Pipeline;
19
21 : public Comparable<ComputePipelineDescriptor> {
22 public:
24
26
27 ComputePipelineDescriptor& SetLabel(std::string label);
28
29 const std::string& GetLabel() const;
30
32 std::shared_ptr<const ShaderFunction> function);
33
34 std::shared_ptr<const ShaderFunction> GetStageEntrypoint() const;
35
36 // Comparable<ComputePipelineDescriptor>
37 std::size_t GetHash() const override;
38
39 // Comparable<PipelineDescriptor>
40 bool IsEqual(const ComputePipelineDescriptor& other) const override;
41
42 template <size_t Size>
44 const std::array<DescriptorSetLayout, Size>& inputs) {
45 return RegisterDescriptorSetLayouts(inputs.data(), inputs.size());
46 }
47
48 bool RegisterDescriptorSetLayouts(const DescriptorSetLayout desc_set_layout[],
49 size_t count);
50
51 const std::vector<DescriptorSetLayout>& GetDescriptorSetLayouts() const;
52
53 private:
54 std::string label_;
55 std::shared_ptr<const ShaderFunction> entrypoint_;
56 std::vector<DescriptorSetLayout> descriptor_set_layouts_;
57};
58
59} // namespace impeller
60
61#endif // FLUTTER_IMPELLER_RENDERER_COMPUTE_PIPELINE_DESCRIPTOR_H_
int count
Definition: FontMgrTest.cpp:50
const std::vector< DescriptorSetLayout > & GetDescriptorSetLayouts() const
std::shared_ptr< const ShaderFunction > GetStageEntrypoint() const
bool IsEqual(const ComputePipelineDescriptor &other) const override
ComputePipelineDescriptor & SetLabel(std::string label)
ComputePipelineDescriptor & SetStageEntrypoint(std::shared_ptr< const ShaderFunction > function)
bool RegisterDescriptorSetLayouts(const std::array< DescriptorSetLayout, Size > &inputs)
Dart_NativeFunction function
Definition: fuchsia.cc:51