Skip to content

Commit

Permalink
Include the new primitive type in the pipeline hash
Browse files Browse the repository at this point in the history
  • Loading branch information
bdero committed Nov 12, 2022
1 parent e7d7eda commit d4ffd6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion impeller/renderer/pipeline_descriptor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "impeller/renderer/pipeline_descriptor.h"

#include "impeller/fml/hash_combine.h"
#include "impeller/renderer/formats.h"
#include "impeller/renderer/shader_function.h"
#include "impeller/renderer/shader_library.h"
Expand Down Expand Up @@ -40,6 +41,7 @@ std::size_t PipelineDescriptor::GetHash() const {
fml::HashCombineSeed(seed, back_stencil_attachment_descriptor_);
fml::HashCombineSeed(seed, winding_order_);
fml::HashCombineSeed(seed, cull_mode_);
fml::HashCombineSeed(seed, primitive_type_);
return seed;
}

Expand All @@ -57,7 +59,8 @@ bool PipelineDescriptor::IsEqual(const PipelineDescriptor& other) const {
back_stencil_attachment_descriptor_ ==
other.back_stencil_attachment_descriptor_ &&
winding_order_ == other.winding_order_ &&
cull_mode_ == other.cull_mode_;
cull_mode_ == other.cull_mode_ &&
primitive_type_ == other.primitive_type_;
}

PipelineDescriptor& PipelineDescriptor::SetLabel(std::string label) {
Expand Down

0 comments on commit d4ffd6c

Please sign in to comment.