mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-07 07:03:42 +00:00
ast: Remove non-group DecorationKind enums
The following DecorationKinds were sub-types of core decoration types: kStride, kStage, kWorkgroup, kStructMemberOffset, kAccess, kBinding, kBuiltin, kConstantId, kLocation These only existed for casting (not for error messages), and are no longer needed, so remove them. Change-Id: I1e4bb9bf51952c6e86bac984d0d667a071ca80bf Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34303 Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
370d20a4c6
commit
26e944bc4e
@ -17,17 +17,11 @@
|
|||||||
namespace tint {
|
namespace tint {
|
||||||
namespace ast {
|
namespace ast {
|
||||||
|
|
||||||
constexpr const DecorationKind AccessDecoration::Kind;
|
|
||||||
|
|
||||||
AccessDecoration::AccessDecoration(AccessControl val, const Source& source)
|
AccessDecoration::AccessDecoration(AccessControl val, const Source& source)
|
||||||
: Base(source), value_(val) {}
|
: Base(source), value_(val) {}
|
||||||
|
|
||||||
AccessDecoration::~AccessDecoration() = default;
|
AccessDecoration::~AccessDecoration() = default;
|
||||||
|
|
||||||
DecorationKind AccessDecoration::GetKind() const {
|
|
||||||
return Kind;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool AccessDecoration::IsAccess() const {
|
bool AccessDecoration::IsAccess() const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -26,18 +26,12 @@ namespace ast {
|
|||||||
/// An access decoration
|
/// An access decoration
|
||||||
class AccessDecoration : public Castable<AccessDecoration, TypeDecoration> {
|
class AccessDecoration : public Castable<AccessDecoration, TypeDecoration> {
|
||||||
public:
|
public:
|
||||||
/// The kind of decoration that this type represents
|
|
||||||
static constexpr const DecorationKind Kind = DecorationKind::kAccess;
|
|
||||||
|
|
||||||
/// constructor
|
/// constructor
|
||||||
/// @param value the access value
|
/// @param value the access value
|
||||||
/// @param source the source of this decoration
|
/// @param source the source of this decoration
|
||||||
explicit AccessDecoration(AccessControl value, const Source& source);
|
explicit AccessDecoration(AccessControl value, const Source& source);
|
||||||
~AccessDecoration() override;
|
~AccessDecoration() override;
|
||||||
|
|
||||||
/// @return the decoration kind
|
|
||||||
DecorationKind GetKind() const override;
|
|
||||||
|
|
||||||
/// @returns true if this is an access decoration
|
/// @returns true if this is an access decoration
|
||||||
bool IsAccess() const override;
|
bool IsAccess() const override;
|
||||||
|
|
||||||
|
@ -17,17 +17,11 @@
|
|||||||
namespace tint {
|
namespace tint {
|
||||||
namespace ast {
|
namespace ast {
|
||||||
|
|
||||||
constexpr const DecorationKind BindingDecoration::Kind;
|
|
||||||
|
|
||||||
BindingDecoration::BindingDecoration(uint32_t val, const Source& source)
|
BindingDecoration::BindingDecoration(uint32_t val, const Source& source)
|
||||||
: Base(source), value_(val) {}
|
: Base(source), value_(val) {}
|
||||||
|
|
||||||
BindingDecoration::~BindingDecoration() = default;
|
BindingDecoration::~BindingDecoration() = default;
|
||||||
|
|
||||||
DecorationKind BindingDecoration::GetKind() const {
|
|
||||||
return Kind;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool BindingDecoration::IsBinding() const {
|
bool BindingDecoration::IsBinding() const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -26,18 +26,12 @@ namespace ast {
|
|||||||
class BindingDecoration
|
class BindingDecoration
|
||||||
: public Castable<BindingDecoration, VariableDecoration> {
|
: public Castable<BindingDecoration, VariableDecoration> {
|
||||||
public:
|
public:
|
||||||
/// The kind of decoration that this type represents
|
|
||||||
static constexpr const DecorationKind Kind = DecorationKind::kBinding;
|
|
||||||
|
|
||||||
/// constructor
|
/// constructor
|
||||||
/// @param value the binding value
|
/// @param value the binding value
|
||||||
/// @param source the source of this decoration
|
/// @param source the source of this decoration
|
||||||
BindingDecoration(uint32_t value, const Source& source);
|
BindingDecoration(uint32_t value, const Source& source);
|
||||||
~BindingDecoration() override;
|
~BindingDecoration() override;
|
||||||
|
|
||||||
/// @return the decoration kind
|
|
||||||
DecorationKind GetKind() const override;
|
|
||||||
|
|
||||||
/// @returns true if this is a binding decoration
|
/// @returns true if this is a binding decoration
|
||||||
bool IsBinding() const override;
|
bool IsBinding() const override;
|
||||||
|
|
||||||
|
@ -17,17 +17,11 @@
|
|||||||
namespace tint {
|
namespace tint {
|
||||||
namespace ast {
|
namespace ast {
|
||||||
|
|
||||||
constexpr const DecorationKind BuiltinDecoration::Kind;
|
|
||||||
|
|
||||||
BuiltinDecoration::BuiltinDecoration(Builtin builtin, const Source& source)
|
BuiltinDecoration::BuiltinDecoration(Builtin builtin, const Source& source)
|
||||||
: Base(source), builtin_(builtin) {}
|
: Base(source), builtin_(builtin) {}
|
||||||
|
|
||||||
BuiltinDecoration::~BuiltinDecoration() = default;
|
BuiltinDecoration::~BuiltinDecoration() = default;
|
||||||
|
|
||||||
DecorationKind BuiltinDecoration::GetKind() const {
|
|
||||||
return Kind;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool BuiltinDecoration::IsBuiltin() const {
|
bool BuiltinDecoration::IsBuiltin() const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -25,18 +25,12 @@ namespace ast {
|
|||||||
class BuiltinDecoration
|
class BuiltinDecoration
|
||||||
: public Castable<BuiltinDecoration, VariableDecoration> {
|
: public Castable<BuiltinDecoration, VariableDecoration> {
|
||||||
public:
|
public:
|
||||||
/// The kind of decoration that this type represents
|
|
||||||
static constexpr const DecorationKind Kind = DecorationKind::kBuiltin;
|
|
||||||
|
|
||||||
/// constructor
|
/// constructor
|
||||||
/// @param builtin the builtin value
|
/// @param builtin the builtin value
|
||||||
/// @param source the source of this decoration
|
/// @param source the source of this decoration
|
||||||
BuiltinDecoration(Builtin builtin, const Source& source);
|
BuiltinDecoration(Builtin builtin, const Source& source);
|
||||||
~BuiltinDecoration() override;
|
~BuiltinDecoration() override;
|
||||||
|
|
||||||
/// @return the decoration kind
|
|
||||||
DecorationKind GetKind() const override;
|
|
||||||
|
|
||||||
/// @returns true if this is a builtin decoration
|
/// @returns true if this is a builtin decoration
|
||||||
bool IsBuiltin() const override;
|
bool IsBuiltin() const override;
|
||||||
|
|
||||||
|
@ -17,17 +17,11 @@
|
|||||||
namespace tint {
|
namespace tint {
|
||||||
namespace ast {
|
namespace ast {
|
||||||
|
|
||||||
constexpr const DecorationKind ConstantIdDecoration::Kind;
|
|
||||||
|
|
||||||
ConstantIdDecoration::ConstantIdDecoration(uint32_t val, const Source& source)
|
ConstantIdDecoration::ConstantIdDecoration(uint32_t val, const Source& source)
|
||||||
: Base(source), value_(val) {}
|
: Base(source), value_(val) {}
|
||||||
|
|
||||||
ConstantIdDecoration::~ConstantIdDecoration() = default;
|
ConstantIdDecoration::~ConstantIdDecoration() = default;
|
||||||
|
|
||||||
DecorationKind ConstantIdDecoration::GetKind() const {
|
|
||||||
return Kind;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ConstantIdDecoration::IsConstantId() const {
|
bool ConstantIdDecoration::IsConstantId() const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -25,18 +25,12 @@ namespace ast {
|
|||||||
class ConstantIdDecoration
|
class ConstantIdDecoration
|
||||||
: public Castable<ConstantIdDecoration, VariableDecoration> {
|
: public Castable<ConstantIdDecoration, VariableDecoration> {
|
||||||
public:
|
public:
|
||||||
/// The kind of decoration that this type represents
|
|
||||||
static constexpr const DecorationKind Kind = DecorationKind::kConstantId;
|
|
||||||
|
|
||||||
/// constructor
|
/// constructor
|
||||||
/// @param val the constant_id value
|
/// @param val the constant_id value
|
||||||
/// @param source the source of this decoration
|
/// @param source the source of this decoration
|
||||||
ConstantIdDecoration(uint32_t val, const Source& source);
|
ConstantIdDecoration(uint32_t val, const Source& source);
|
||||||
~ConstantIdDecoration() override;
|
~ConstantIdDecoration() override;
|
||||||
|
|
||||||
/// @return the decoration kind
|
|
||||||
DecorationKind GetKind() const override;
|
|
||||||
|
|
||||||
/// @returns true if this is a constant_id decoration
|
/// @returns true if this is a constant_id decoration
|
||||||
bool IsConstantId() const override;
|
bool IsConstantId() const override;
|
||||||
|
|
||||||
|
@ -23,34 +23,16 @@ std::ostream& operator<<(std::ostream& out, DecorationKind data) {
|
|||||||
switch (data) {
|
switch (data) {
|
||||||
case DecorationKind::kArray:
|
case DecorationKind::kArray:
|
||||||
return out << "array";
|
return out << "array";
|
||||||
case DecorationKind::kStride:
|
|
||||||
return out << "stride";
|
|
||||||
case DecorationKind::kFunction:
|
case DecorationKind::kFunction:
|
||||||
return out << "function";
|
return out << "function";
|
||||||
case DecorationKind::kStage:
|
|
||||||
return out << "stage";
|
|
||||||
case DecorationKind::kWorkgroup:
|
|
||||||
return out << "workgroup";
|
|
||||||
case DecorationKind::kStruct:
|
case DecorationKind::kStruct:
|
||||||
return out << "struct";
|
return out << "struct";
|
||||||
case DecorationKind::kStructMember:
|
case DecorationKind::kStructMember:
|
||||||
return out << "struct member";
|
return out << "struct member";
|
||||||
case DecorationKind::kStructMemberOffset:
|
|
||||||
return out << "offset";
|
|
||||||
case DecorationKind::kType:
|
case DecorationKind::kType:
|
||||||
return out << "type";
|
return out << "type";
|
||||||
case DecorationKind::kAccess:
|
|
||||||
return out << "access";
|
|
||||||
case DecorationKind::kVariable:
|
case DecorationKind::kVariable:
|
||||||
return out << "variable";
|
return out << "variable";
|
||||||
case DecorationKind::kBinding:
|
|
||||||
return out << "binding";
|
|
||||||
case DecorationKind::kBuiltin:
|
|
||||||
return out << "builtin";
|
|
||||||
case DecorationKind::kConstantId:
|
|
||||||
return out << "constant_id";
|
|
||||||
case DecorationKind::kLocation:
|
|
||||||
return out << "location";
|
|
||||||
}
|
}
|
||||||
return out << "<unknown>";
|
return out << "<unknown>";
|
||||||
}
|
}
|
||||||
|
@ -28,20 +28,11 @@ namespace ast {
|
|||||||
/// The decoration kind enumerator
|
/// The decoration kind enumerator
|
||||||
enum class DecorationKind {
|
enum class DecorationKind {
|
||||||
kArray,
|
kArray,
|
||||||
/*|*/ kStride,
|
|
||||||
kFunction,
|
kFunction,
|
||||||
/*|*/ kStage,
|
|
||||||
/*|*/ kWorkgroup,
|
|
||||||
kStruct,
|
kStruct,
|
||||||
kStructMember,
|
kStructMember,
|
||||||
/*|*/ kStructMemberOffset,
|
|
||||||
kType,
|
kType,
|
||||||
/*|*/ kAccess,
|
|
||||||
kVariable,
|
kVariable,
|
||||||
/*|*/ kBinding,
|
|
||||||
/*|*/ kBuiltin,
|
|
||||||
/*|*/ kConstantId,
|
|
||||||
/*|*/ kLocation,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
std::ostream& operator<<(std::ostream& out, DecorationKind data);
|
std::ostream& operator<<(std::ostream& out, DecorationKind data);
|
||||||
|
@ -64,21 +64,20 @@ TEST_F(DecorationTest, Is) {
|
|||||||
|
|
||||||
TEST_F(DecorationTest, Kinds) {
|
TEST_F(DecorationTest, Kinds) {
|
||||||
EXPECT_EQ(ArrayDecoration::Kind, DecorationKind::kArray);
|
EXPECT_EQ(ArrayDecoration::Kind, DecorationKind::kArray);
|
||||||
EXPECT_EQ(StrideDecoration::Kind, DecorationKind::kStride);
|
EXPECT_EQ(StrideDecoration::Kind, DecorationKind::kArray);
|
||||||
EXPECT_EQ(FunctionDecoration::Kind, DecorationKind::kFunction);
|
EXPECT_EQ(FunctionDecoration::Kind, DecorationKind::kFunction);
|
||||||
EXPECT_EQ(StageDecoration::Kind, DecorationKind::kStage);
|
EXPECT_EQ(StageDecoration::Kind, DecorationKind::kFunction);
|
||||||
EXPECT_EQ(WorkgroupDecoration::Kind, DecorationKind::kWorkgroup);
|
EXPECT_EQ(WorkgroupDecoration::Kind, DecorationKind::kFunction);
|
||||||
EXPECT_EQ(StructDecoration::Kind, DecorationKind::kStruct);
|
EXPECT_EQ(StructDecoration::Kind, DecorationKind::kStruct);
|
||||||
EXPECT_EQ(StructMemberDecoration::Kind, DecorationKind::kStructMember);
|
EXPECT_EQ(StructMemberDecoration::Kind, DecorationKind::kStructMember);
|
||||||
EXPECT_EQ(StructMemberOffsetDecoration::Kind,
|
EXPECT_EQ(StructMemberOffsetDecoration::Kind, DecorationKind::kStructMember);
|
||||||
DecorationKind::kStructMemberOffset);
|
|
||||||
EXPECT_EQ(TypeDecoration::Kind, DecorationKind::kType);
|
EXPECT_EQ(TypeDecoration::Kind, DecorationKind::kType);
|
||||||
EXPECT_EQ(AccessDecoration::Kind, DecorationKind::kAccess);
|
EXPECT_EQ(AccessDecoration::Kind, DecorationKind::kType);
|
||||||
EXPECT_EQ(VariableDecoration::Kind, DecorationKind::kVariable);
|
EXPECT_EQ(VariableDecoration::Kind, DecorationKind::kVariable);
|
||||||
EXPECT_EQ(BindingDecoration::Kind, DecorationKind::kBinding);
|
EXPECT_EQ(BindingDecoration::Kind, DecorationKind::kVariable);
|
||||||
EXPECT_EQ(BuiltinDecoration::Kind, DecorationKind::kBuiltin);
|
EXPECT_EQ(BuiltinDecoration::Kind, DecorationKind::kVariable);
|
||||||
EXPECT_EQ(ConstantIdDecoration::Kind, DecorationKind::kConstantId);
|
EXPECT_EQ(ConstantIdDecoration::Kind, DecorationKind::kVariable);
|
||||||
EXPECT_EQ(LocationDecoration::Kind, DecorationKind::kLocation);
|
EXPECT_EQ(LocationDecoration::Kind, DecorationKind::kVariable);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@ -17,17 +17,11 @@
|
|||||||
namespace tint {
|
namespace tint {
|
||||||
namespace ast {
|
namespace ast {
|
||||||
|
|
||||||
constexpr const DecorationKind LocationDecoration::Kind;
|
|
||||||
|
|
||||||
LocationDecoration::LocationDecoration(uint32_t val, const Source& source)
|
LocationDecoration::LocationDecoration(uint32_t val, const Source& source)
|
||||||
: Base(source), value_(val) {}
|
: Base(source), value_(val) {}
|
||||||
|
|
||||||
LocationDecoration::~LocationDecoration() = default;
|
LocationDecoration::~LocationDecoration() = default;
|
||||||
|
|
||||||
DecorationKind LocationDecoration::GetKind() const {
|
|
||||||
return Kind;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool LocationDecoration::IsLocation() const {
|
bool LocationDecoration::IsLocation() const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -26,18 +26,12 @@ namespace ast {
|
|||||||
class LocationDecoration
|
class LocationDecoration
|
||||||
: public Castable<LocationDecoration, VariableDecoration> {
|
: public Castable<LocationDecoration, VariableDecoration> {
|
||||||
public:
|
public:
|
||||||
/// The kind of decoration that this type represents
|
|
||||||
static constexpr const DecorationKind Kind = DecorationKind::kLocation;
|
|
||||||
|
|
||||||
/// constructor
|
/// constructor
|
||||||
/// @param value the location value
|
/// @param value the location value
|
||||||
/// @param source the source of this decoration
|
/// @param source the source of this decoration
|
||||||
explicit LocationDecoration(uint32_t value, const Source& source);
|
explicit LocationDecoration(uint32_t value, const Source& source);
|
||||||
~LocationDecoration() override;
|
~LocationDecoration() override;
|
||||||
|
|
||||||
/// @return the decoration kind
|
|
||||||
DecorationKind GetKind() const override;
|
|
||||||
|
|
||||||
/// @returns true if this is a location decoration
|
/// @returns true if this is a location decoration
|
||||||
bool IsLocation() const override;
|
bool IsLocation() const override;
|
||||||
|
|
||||||
|
@ -17,17 +17,11 @@
|
|||||||
namespace tint {
|
namespace tint {
|
||||||
namespace ast {
|
namespace ast {
|
||||||
|
|
||||||
constexpr const DecorationKind StageDecoration::Kind;
|
|
||||||
|
|
||||||
StageDecoration::StageDecoration(ast::PipelineStage stage, const Source& source)
|
StageDecoration::StageDecoration(ast::PipelineStage stage, const Source& source)
|
||||||
: Base(source), stage_(stage) {}
|
: Base(source), stage_(stage) {}
|
||||||
|
|
||||||
StageDecoration::~StageDecoration() = default;
|
StageDecoration::~StageDecoration() = default;
|
||||||
|
|
||||||
DecorationKind StageDecoration::GetKind() const {
|
|
||||||
return Kind;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool StageDecoration::IsStage() const {
|
bool StageDecoration::IsStage() const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -24,18 +24,12 @@ namespace ast {
|
|||||||
/// A workgroup decoration
|
/// A workgroup decoration
|
||||||
class StageDecoration : public Castable<StageDecoration, FunctionDecoration> {
|
class StageDecoration : public Castable<StageDecoration, FunctionDecoration> {
|
||||||
public:
|
public:
|
||||||
/// The kind of decoration that this type represents
|
|
||||||
static constexpr const DecorationKind Kind = DecorationKind::kStage;
|
|
||||||
|
|
||||||
/// constructor
|
/// constructor
|
||||||
/// @param stage the pipeline stage
|
/// @param stage the pipeline stage
|
||||||
/// @param source the source of this decoration
|
/// @param source the source of this decoration
|
||||||
StageDecoration(ast::PipelineStage stage, const Source& source);
|
StageDecoration(ast::PipelineStage stage, const Source& source);
|
||||||
~StageDecoration() override;
|
~StageDecoration() override;
|
||||||
|
|
||||||
/// @return the decoration kind
|
|
||||||
DecorationKind GetKind() const override;
|
|
||||||
|
|
||||||
/// @returns true if this is a stage decoration
|
/// @returns true if this is a stage decoration
|
||||||
bool IsStage() const override;
|
bool IsStage() const override;
|
||||||
|
|
||||||
|
@ -17,15 +17,9 @@
|
|||||||
namespace tint {
|
namespace tint {
|
||||||
namespace ast {
|
namespace ast {
|
||||||
|
|
||||||
constexpr const DecorationKind StrideDecoration::Kind;
|
|
||||||
|
|
||||||
StrideDecoration::StrideDecoration(uint32_t stride, const Source& source)
|
StrideDecoration::StrideDecoration(uint32_t stride, const Source& source)
|
||||||
: Base(source), stride_(stride) {}
|
: Base(source), stride_(stride) {}
|
||||||
|
|
||||||
DecorationKind StrideDecoration::GetKind() const {
|
|
||||||
return Kind;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool StrideDecoration::IsStride() const {
|
bool StrideDecoration::IsStride() const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -27,18 +27,12 @@ namespace ast {
|
|||||||
/// A stride decoration
|
/// A stride decoration
|
||||||
class StrideDecoration : public Castable<StrideDecoration, ArrayDecoration> {
|
class StrideDecoration : public Castable<StrideDecoration, ArrayDecoration> {
|
||||||
public:
|
public:
|
||||||
/// The kind of decoration that this type represents
|
|
||||||
static constexpr const DecorationKind Kind = DecorationKind::kStride;
|
|
||||||
|
|
||||||
/// constructor
|
/// constructor
|
||||||
/// @param stride the stride value
|
/// @param stride the stride value
|
||||||
/// @param source the source of this decoration
|
/// @param source the source of this decoration
|
||||||
StrideDecoration(uint32_t stride, const Source& source);
|
StrideDecoration(uint32_t stride, const Source& source);
|
||||||
~StrideDecoration() override;
|
~StrideDecoration() override;
|
||||||
|
|
||||||
/// @return the decoration kind
|
|
||||||
DecorationKind GetKind() const override;
|
|
||||||
|
|
||||||
/// @returns true if this is a stride decoration
|
/// @returns true if this is a stride decoration
|
||||||
bool IsStride() const override;
|
bool IsStride() const override;
|
||||||
|
|
||||||
|
@ -17,16 +17,10 @@
|
|||||||
namespace tint {
|
namespace tint {
|
||||||
namespace ast {
|
namespace ast {
|
||||||
|
|
||||||
constexpr const DecorationKind StructMemberOffsetDecoration::Kind;
|
|
||||||
|
|
||||||
StructMemberOffsetDecoration::StructMemberOffsetDecoration(uint32_t offset,
|
StructMemberOffsetDecoration::StructMemberOffsetDecoration(uint32_t offset,
|
||||||
const Source& source)
|
const Source& source)
|
||||||
: Base(source), offset_(offset) {}
|
: Base(source), offset_(offset) {}
|
||||||
|
|
||||||
DecorationKind StructMemberOffsetDecoration::GetKind() const {
|
|
||||||
return Kind;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool StructMemberOffsetDecoration::IsOffset() const {
|
bool StructMemberOffsetDecoration::IsOffset() const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -28,19 +28,12 @@ namespace ast {
|
|||||||
class StructMemberOffsetDecoration
|
class StructMemberOffsetDecoration
|
||||||
: public Castable<StructMemberOffsetDecoration, StructMemberDecoration> {
|
: public Castable<StructMemberOffsetDecoration, StructMemberDecoration> {
|
||||||
public:
|
public:
|
||||||
/// The kind of decoration that this type represents
|
|
||||||
static constexpr const DecorationKind Kind =
|
|
||||||
DecorationKind::kStructMemberOffset;
|
|
||||||
|
|
||||||
/// constructor
|
/// constructor
|
||||||
/// @param offset the offset value
|
/// @param offset the offset value
|
||||||
/// @param source the source of this decoration
|
/// @param source the source of this decoration
|
||||||
StructMemberOffsetDecoration(uint32_t offset, const Source& source);
|
StructMemberOffsetDecoration(uint32_t offset, const Source& source);
|
||||||
~StructMemberOffsetDecoration() override;
|
~StructMemberOffsetDecoration() override;
|
||||||
|
|
||||||
/// @return the decoration kind
|
|
||||||
DecorationKind GetKind() const override;
|
|
||||||
|
|
||||||
/// @returns true if this is an offset decoration
|
/// @returns true if this is an offset decoration
|
||||||
bool IsOffset() const override;
|
bool IsOffset() const override;
|
||||||
|
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
namespace tint {
|
namespace tint {
|
||||||
namespace ast {
|
namespace ast {
|
||||||
|
|
||||||
constexpr const DecorationKind WorkgroupDecoration::Kind;
|
|
||||||
|
|
||||||
WorkgroupDecoration::WorkgroupDecoration(uint32_t x, const Source& source)
|
WorkgroupDecoration::WorkgroupDecoration(uint32_t x, const Source& source)
|
||||||
: Base(source), x_(x) {}
|
: Base(source), x_(x) {}
|
||||||
|
|
||||||
@ -35,10 +33,6 @@ WorkgroupDecoration::WorkgroupDecoration(uint32_t x,
|
|||||||
|
|
||||||
WorkgroupDecoration::~WorkgroupDecoration() = default;
|
WorkgroupDecoration::~WorkgroupDecoration() = default;
|
||||||
|
|
||||||
DecorationKind WorkgroupDecoration::GetKind() const {
|
|
||||||
return Kind;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool WorkgroupDecoration::IsWorkgroup() const {
|
bool WorkgroupDecoration::IsWorkgroup() const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -28,9 +28,6 @@ namespace ast {
|
|||||||
class WorkgroupDecoration
|
class WorkgroupDecoration
|
||||||
: public Castable<WorkgroupDecoration, FunctionDecoration> {
|
: public Castable<WorkgroupDecoration, FunctionDecoration> {
|
||||||
public:
|
public:
|
||||||
/// The kind of decoration that this type represents
|
|
||||||
static constexpr const DecorationKind Kind = DecorationKind::kWorkgroup;
|
|
||||||
|
|
||||||
/// constructor
|
/// constructor
|
||||||
/// @param x the workgroup x dimension size
|
/// @param x the workgroup x dimension size
|
||||||
/// @param source the source of this decoration
|
/// @param source the source of this decoration
|
||||||
@ -48,9 +45,6 @@ class WorkgroupDecoration
|
|||||||
WorkgroupDecoration(uint32_t x, uint32_t y, uint32_t z, const Source& source);
|
WorkgroupDecoration(uint32_t x, uint32_t y, uint32_t z, const Source& source);
|
||||||
~WorkgroupDecoration() override;
|
~WorkgroupDecoration() override;
|
||||||
|
|
||||||
/// @return the decoration kind
|
|
||||||
DecorationKind GetKind() const override;
|
|
||||||
|
|
||||||
/// @returns true if this is a workgroup decoration
|
/// @returns true if this is a workgroup decoration
|
||||||
bool IsWorkgroup() const override;
|
bool IsWorkgroup() const override;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user