20 auto seed = fml::HashCombine();
21 fml::HashCombineSeed(seed, label_);
23 fml::HashCombineSeed(seed, entrypoint_->GetHash());
25 fml::HashCombineSeed(seed, workgroup_size_[0], workgroup_size_[1],
33 return label_ == other.label_ &&
35 workgroup_size_ == other.workgroup_size_;
39 std::string_view label) {
45 std::shared_ptr<const ShaderFunction>
function) {
55 entrypoint_ = std::move(
function);
60 std::shared_ptr<const ShaderFunction>
66 std::array<uint32_t, 3> size) {
67 workgroup_size_ = size;
72 return workgroup_size_;
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]);
89 const std::vector<DescriptorSetLayout>&
91 return descriptor_set_layouts_;
const std::vector< DescriptorSetLayout > & GetDescriptorSetLayouts() const
ComputePipelineDescriptor & SetLabel(std::string_view label)
std::shared_ptr< const ShaderFunction > GetStageEntrypoint() const
bool IsEqual(const ComputePipelineDescriptor &other) const override
std::size_t GetHash() const override
~ComputePipelineDescriptor()
std::array< uint32_t, 3 > GetWorkgroupSize() const
ComputePipelineDescriptor & SetStageEntrypoint(std::shared_ptr< const ShaderFunction > function)
ComputePipelineDescriptor & SetWorkgroupSize(std::array< uint32_t, 3 > size)
Set the workgroup (threadgroup) size declared by the shader.
ComputePipelineDescriptor()
const std::string & GetLabel() const
bool RegisterDescriptorSetLayouts(const std::array< DescriptorSetLayout, Size > &inputs)
bool DeepComparePointer(const std::shared_ptr< ComparableType > &lhs, const std::shared_ptr< ComparableType > &rhs)