diff options
Diffstat (limited to 'source/opt/types.cpp')
-rw-r--r-- | source/opt/types.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/source/opt/types.cpp b/source/opt/types.cpp index ab95906b..056acebb 100644 --- a/source/opt/types.cpp +++ b/source/opt/types.cpp @@ -24,6 +24,7 @@ #include "source/util/hash_combine.h" #include "source/util/make_unique.h" +#include "spirv/unified1/spirv.h" namespace spvtools { namespace opt { @@ -64,7 +65,7 @@ bool CompareTwoVectors(const U32VecVec a, const U32VecVec b) { return true; } -} // namespace +} // anonymous namespace std::string Type::GetDecorationStr() const { std::ostringstream oss; @@ -131,7 +132,6 @@ std::unique_ptr<Type> Type::Clone() const { DeclareKindCase(AccelerationStructureNV); DeclareKindCase(CooperativeMatrixNV); DeclareKindCase(RayQueryKHR); - DeclareKindCase(HitObjectNV); #undef DeclareKindCase default: assert(false && "Unhandled type"); @@ -178,7 +178,6 @@ bool Type::operator==(const Type& other) const { DeclareKindCase(AccelerationStructureNV); DeclareKindCase(CooperativeMatrixNV); DeclareKindCase(RayQueryKHR); - DeclareKindCase(HitObjectNV); #undef DeclareKindCase default: assert(false && "Unhandled type"); @@ -233,7 +232,6 @@ size_t Type::ComputeHashValue(size_t hash, SeenTypes* seen) const { DeclareKindCase(AccelerationStructureNV); DeclareKindCase(CooperativeMatrixNV); DeclareKindCase(RayQueryKHR); - DeclareKindCase(HitObjectNV); #undef DeclareKindCase default: assert(false && "Unhandled type"); @@ -359,9 +357,8 @@ size_t Matrix::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const { return element_type_->ComputeHashValue(hash, seen); } -Image::Image(Type* type, spv::Dim dimen, uint32_t d, bool array, - bool multisample, uint32_t sampling, spv::ImageFormat f, - spv::AccessQualifier qualifier) +Image::Image(Type* type, SpvDim dimen, uint32_t d, bool array, bool multisample, + uint32_t sampling, SpvImageFormat f, SpvAccessQualifier qualifier) : Type(kImage), sampled_type_(type), dim_(dimen), @@ -386,9 +383,9 @@ bool Image::IsSameImpl(const Type* that, IsSameCache* seen) const { std::string Image::str() const { std::ostringstream oss; - oss << "image(" << sampled_type_->str() << ", " << uint32_t(dim_) << ", " - << depth_ << ", " << arrayed_ << ", " << ms_ << ", " << sampled_ << ", " - << uint32_t(format_) << ", " << uint32_t(access_qualifier_) << ")"; + oss << "image(" << sampled_type_->str() << ", " << dim_ << ", " << depth_ + << ", " << arrayed_ << ", " << ms_ << ", " << sampled_ << ", " << format_ + << ", " << access_qualifier_ << ")"; return oss.str(); } @@ -560,7 +557,7 @@ size_t Opaque::ComputeExtraStateHash(size_t hash, SeenTypes*) const { return hash_combine(hash, name_); } -Pointer::Pointer(const Type* type, spv::StorageClass sc) +Pointer::Pointer(const Type* type, SpvStorageClass sc) : Type(kPointer), pointee_type_(type), storage_class_(sc) {} bool Pointer::IsSameImpl(const Type* that, IsSameCache* seen) const { @@ -639,7 +636,7 @@ bool Pipe::IsSameImpl(const Type* that, IsSameCache*) const { std::string Pipe::str() const { std::ostringstream oss; - oss << "pipe(" << uint32_t(access_qualifier_) << ")"; + oss << "pipe(" << access_qualifier_ << ")"; return oss.str(); } |