Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
impeller::ComputePipelineDescriptor Class Referencefinal

#include <compute_pipeline_descriptor.h>

Inheritance diagram for impeller::ComputePipelineDescriptor:
impeller::Comparable< ComputePipelineDescriptor > impeller::ComparableBase

Public Member Functions

 ComputePipelineDescriptor ()
 
 ~ComputePipelineDescriptor ()
 
ComputePipelineDescriptorSetLabel (std::string_view label)
 
const std::string & GetLabel () const
 
ComputePipelineDescriptorSetStageEntrypoint (std::shared_ptr< const ShaderFunction > function)
 
std::shared_ptr< const ShaderFunctionGetStageEntrypoint () const
 
ComputePipelineDescriptorSetWorkgroupSize (std::array< uint32_t, 3 > size)
 Set the workgroup (threadgroup) size declared by the shader.
 
std::array< uint32_t, 3 > GetWorkgroupSize () const
 
std::size_t GetHash () const override
 
bool IsEqual (const ComputePipelineDescriptor &other) const override
 
template<size_t Size>
bool RegisterDescriptorSetLayouts (const std::array< DescriptorSetLayout, Size > &inputs)
 
bool RegisterDescriptorSetLayouts (const DescriptorSetLayout desc_set_layout[], size_t count)
 
const std::vector< DescriptorSetLayout > & GetDescriptorSetLayouts () const
 

Detailed Description

Definition at line 22 of file compute_pipeline_descriptor.h.

Constructor & Destructor Documentation

◆ ComputePipelineDescriptor()

impeller::ComputePipelineDescriptor::ComputePipelineDescriptor ( )
default

◆ ~ComputePipelineDescriptor()

impeller::ComputePipelineDescriptor::~ComputePipelineDescriptor ( )
default

Member Function Documentation

◆ GetDescriptorSetLayouts()

const std::vector< DescriptorSetLayout > & impeller::ComputePipelineDescriptor::GetDescriptorSetLayouts ( ) const

Definition at line 90 of file compute_pipeline_descriptor.cc.

90 {
91 return descriptor_set_layouts_;
92}

◆ GetHash()

std::size_t impeller::ComputePipelineDescriptor::GetHash ( ) const
overridevirtual

Implements impeller::Comparable< ComputePipelineDescriptor >.

Definition at line 19 of file compute_pipeline_descriptor.cc.

19 {
20 auto seed = fml::HashCombine();
21 fml::HashCombineSeed(seed, label_);
22 if (entrypoint_) {
23 fml::HashCombineSeed(seed, entrypoint_->GetHash());
24 }
25 fml::HashCombineSeed(seed, workgroup_size_[0], workgroup_size_[1],
26 workgroup_size_[2]);
27 return seed;
28}
constexpr std::size_t HashCombine()
constexpr void HashCombineSeed(std::size_t &seed, const Type &arg)

References fml::HashCombine(), and fml::HashCombineSeed().

◆ GetLabel()

const std::string & impeller::ComputePipelineDescriptor::GetLabel ( ) const

Definition at line 75 of file compute_pipeline_descriptor.cc.

75 {
76 return label_;
77}

Referenced by impeller::GetMTLComputePipelineDescriptor().

◆ GetStageEntrypoint()

std::shared_ptr< const ShaderFunction > impeller::ComputePipelineDescriptor::GetStageEntrypoint ( ) const

Definition at line 61 of file compute_pipeline_descriptor.cc.

61 {
62 return entrypoint_;
63}

Referenced by impeller::GetMTLComputePipelineDescriptor().

◆ GetWorkgroupSize()

std::array< uint32_t, 3 > impeller::ComputePipelineDescriptor::GetWorkgroupSize ( ) const

Definition at line 71 of file compute_pipeline_descriptor.cc.

71 {
72 return workgroup_size_;
73}

◆ IsEqual()

bool impeller::ComputePipelineDescriptor::IsEqual ( const ComputePipelineDescriptor other) const
overridevirtual

Implements impeller::Comparable< ComputePipelineDescriptor >.

Definition at line 31 of file compute_pipeline_descriptor.cc.

32 {
33 return label_ == other.label_ &&
34 DeepComparePointer(entrypoint_, other.entrypoint_) &&
35 workgroup_size_ == other.workgroup_size_;
36}
bool DeepComparePointer(const std::shared_ptr< ComparableType > &lhs, const std::shared_ptr< ComparableType > &rhs)
Definition comparable.h:55

References impeller::DeepComparePointer().

◆ RegisterDescriptorSetLayouts() [1/2]

bool impeller::ComputePipelineDescriptor::RegisterDescriptorSetLayouts ( const DescriptorSetLayout  desc_set_layout[],
size_t  count 
)

Definition at line 79 of file compute_pipeline_descriptor.cc.

81 {
82 descriptor_set_layouts_.reserve(descriptor_set_layouts_.size() + count);
83 for (size_t i = 0; i < count; i++) {
84 descriptor_set_layouts_.emplace_back(desc_set_layout[i]);
85 }
86 return true;
87}

References i.

◆ RegisterDescriptorSetLayouts() [2/2]

template<size_t Size>
bool impeller::ComputePipelineDescriptor::RegisterDescriptorSetLayouts ( const std::array< DescriptorSetLayout, Size > &  inputs)
inline

Definition at line 56 of file compute_pipeline_descriptor.h.

57 {
58 return RegisterDescriptorSetLayouts(inputs.data(), inputs.size());
59 }
bool RegisterDescriptorSetLayouts(const std::array< DescriptorSetLayout, Size > &inputs)

References RegisterDescriptorSetLayouts().

Referenced by impeller::ComputePipelineBuilder< ComputeShader_ >::InitializePipelineDescriptorDefaults(), and RegisterDescriptorSetLayouts().

◆ SetLabel()

ComputePipelineDescriptor & impeller::ComputePipelineDescriptor::SetLabel ( std::string_view  label)

Definition at line 38 of file compute_pipeline_descriptor.cc.

39 {
40 label_ = label;
41 return *this;
42}

Referenced by impeller::ComputePipelineBuilder< ComputeShader_ >::InitializePipelineDescriptorDefaults().

◆ SetStageEntrypoint()

ComputePipelineDescriptor & impeller::ComputePipelineDescriptor::SetStageEntrypoint ( std::shared_ptr< const ShaderFunction function)

Definition at line 44 of file compute_pipeline_descriptor.cc.

45 {
46 FML_DCHECK(!function || function->GetStage() == ShaderStage::kCompute);
47 if (!function || function->GetStage() != ShaderStage::kCompute) {
48 return *this;
49 }
50
51 if (function->GetStage() == ShaderStage::kUnknown) {
52 return *this;
53 }
54
55 entrypoint_ = std::move(function);
56
57 return *this;
58}
#define FML_DCHECK(condition)
Definition logging.h:122
Dart_NativeFunction function
Definition fuchsia.cc:51

References FML_DCHECK, function, impeller::kCompute, and impeller::kUnknown.

Referenced by impeller::ComputePipelineBuilder< ComputeShader_ >::InitializePipelineDescriptorDefaults().

◆ SetWorkgroupSize()

ComputePipelineDescriptor & impeller::ComputePipelineDescriptor::SetWorkgroupSize ( std::array< uint32_t, 3 >  size)

Set the workgroup (threadgroup) size declared by the shader.

        A dimension of 0 is sized by a specialization constant and
        resolved by the backend at dispatch (for example, to the
        device maximum).

Definition at line 65 of file compute_pipeline_descriptor.cc.

66 {
67 workgroup_size_ = size;
68 return *this;
69}
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size

Referenced by impeller::ComputePipelineBuilder< ComputeShader_ >::InitializePipelineDescriptorDefaults().


The documentation for this class was generated from the following files: