mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 18:29:23 +00:00
Implement vector initialization from single scalar (aka "splat")
Updated spir-v and HSLS backends to emit valid constructors. Bug: tint:656 Change-Id: I53356945563b633239b12c0f4e207f160dbc23d8 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53780 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@chromium.org> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
5b2f49b5df
commit
b5508fdcb5
@@ -119,6 +119,10 @@ bool Type::is_numeric_vector() const {
|
||||
[](const Vector* v) { return v->type()->is_numeric_scalar(); });
|
||||
}
|
||||
|
||||
bool Type::is_scalar_vector() const {
|
||||
return Is<Vector>([](const Vector* v) { return v->type()->is_scalar(); });
|
||||
}
|
||||
|
||||
bool Type::is_numeric_scalar_or_vector() const {
|
||||
return is_numeric_scalar() || is_numeric_vector();
|
||||
}
|
||||
|
||||
@@ -85,6 +85,8 @@ class Type : public Castable<Type, Node> {
|
||||
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 vector of scalar type
|
||||
bool is_scalar_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
|
||||
|
||||
Reference in New Issue
Block a user