mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-08 13:14:56 +00:00
Test that entry point IO attributes are of valid types
BUG=tint:773 Change-Id: I94e8624647c645efe7ed558caa3d3bd05dd72f63 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/50260 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Auto-Submit: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com> Reviewed-by: James Price <jrprice@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
ff7a5f8dc9
commit
74490e118e
@@ -132,6 +132,15 @@ bool Type::is_bool_scalar_or_vector() const {
|
||||
return Is<Bool>() || is_bool_vector();
|
||||
}
|
||||
|
||||
bool Type::is_numeric_vector() const {
|
||||
return Is<Vector>(
|
||||
[](const Vector* v) { return v->type()->is_numeric_scalar(); });
|
||||
}
|
||||
|
||||
bool Type::is_numeric_scalar_or_vector() const {
|
||||
return is_numeric_scalar() || is_numeric_vector();
|
||||
}
|
||||
|
||||
bool Type::is_handle() const {
|
||||
return IsAnyOf<Sampler, Texture>();
|
||||
}
|
||||
|
||||
@@ -125,6 +125,10 @@ class Type : public Castable<Type, Node> {
|
||||
bool is_bool_vector() const;
|
||||
/// @returns true if this type is boolean scalar or vector
|
||||
bool is_bool_scalar_or_vector() const;
|
||||
/// @returns true if this type is a numeric vector
|
||||
bool is_numeric_vector() const;
|
||||
/// @returns true if this type is a numeric scale or vector
|
||||
bool is_numeric_scalar_or_vector() const;
|
||||
/// @returns true if this type is a handle type
|
||||
bool is_handle() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user