Tint: add InputAttachment type class & definition in wgsl.def.
Bug: 341117913
Change-Id: Ie229d871c6bbde48f473c30bf53122481fc04a95
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/189401
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
diff --git a/src/tint/cmd/fuzz/wgsl/dictionary.txt b/src/tint/cmd/fuzz/wgsl/dictionary.txt
index fde58b9..39c4691 100644
--- a/src/tint/cmd/fuzz/wgsl/dictionary.txt
+++ b/src/tint/cmd/fuzz/wgsl/dictionary.txt
@@ -232,6 +232,7 @@
"id"
"if"
"info"
+"input_attachment"
"insertBits"
"instance_index"
"interpolate"
diff --git a/src/tint/lang/core/intrinsic/type_matchers.h b/src/tint/lang/core/intrinsic/type_matchers.h
index 349c2d4..cf04b7a 100644
--- a/src/tint/lang/core/intrinsic/type_matchers.h
+++ b/src/tint/lang/core/intrinsic/type_matchers.h
@@ -43,6 +43,7 @@
#include "src/tint/lang/core/type/f16.h"
#include "src/tint/lang/core/type/f32.h"
#include "src/tint/lang/core/type/i32.h"
+#include "src/tint/lang/core/type/input_attachment.h"
#include "src/tint/lang/core/type/manager.h"
#include "src/tint/lang/core/type/matrix.h"
#include "src/tint/lang/core/type/multisampled_texture.h"
@@ -532,6 +533,26 @@
return state.types.Get<type::ExternalTexture>();
}
+inline bool MatchInputAttachment(intrinsic::MatchState&,
+ const type::Type* ty,
+ const type::Type*& T) {
+ if (ty->Is<intrinsic::Any>()) {
+ T = ty;
+ return true;
+ }
+ if (auto* v = ty->As<type::InputAttachment>()) {
+ T = v->type();
+ return true;
+ }
+ return false;
+}
+
+inline const type::InputAttachment* BuildInputAttachment(intrinsic::MatchState& state,
+ const type::Type*,
+ const type::Type* T) {
+ return state.types.Get<type::InputAttachment>(T);
+}
+
// Builtin types starting with a _ prefix cannot be declared in WGSL, so they
// can only be used as return types. Because of this, they must only match Any,
// which is used as the return type matcher.
diff --git a/src/tint/lang/core/type/BUILD.bazel b/src/tint/lang/core/type/BUILD.bazel
index 35a5221..5682974 100644
--- a/src/tint/lang/core/type/BUILD.bazel
+++ b/src/tint/lang/core/type/BUILD.bazel
@@ -53,6 +53,7 @@
"f16.cc",
"f32.cc",
"i32.cc",
+ "input_attachment.cc",
"invalid.cc",
"manager.cc",
"matrix.cc",
@@ -92,6 +93,7 @@
"f16.h",
"f32.h",
"i32.h",
+ "input_attachment.h",
"invalid.h",
"manager.h",
"matrix.h",
@@ -149,6 +151,7 @@
"f32_test.cc",
"helper_test.h",
"i32_test.cc",
+ "input_attachment_test.cc",
"manager_test.cc",
"matrix_test.cc",
"multisampled_texture_test.cc",
diff --git a/src/tint/lang/core/type/BUILD.cmake b/src/tint/lang/core/type/BUILD.cmake
index 285a088..be27de5 100644
--- a/src/tint/lang/core/type/BUILD.cmake
+++ b/src/tint/lang/core/type/BUILD.cmake
@@ -68,6 +68,8 @@
lang/core/type/f32.h
lang/core/type/i32.cc
lang/core/type/i32.h
+ lang/core/type/input_attachment.cc
+ lang/core/type/input_attachment.h
lang/core/type/invalid.cc
lang/core/type/invalid.h
lang/core/type/manager.cc
@@ -147,6 +149,7 @@
lang/core/type/f32_test.cc
lang/core/type/helper_test.h
lang/core/type/i32_test.cc
+ lang/core/type/input_attachment_test.cc
lang/core/type/manager_test.cc
lang/core/type/matrix_test.cc
lang/core/type/multisampled_texture_test.cc
diff --git a/src/tint/lang/core/type/BUILD.gn b/src/tint/lang/core/type/BUILD.gn
index 7f64802..c635ccf 100644
--- a/src/tint/lang/core/type/BUILD.gn
+++ b/src/tint/lang/core/type/BUILD.gn
@@ -73,6 +73,8 @@
"f32.h",
"i32.cc",
"i32.h",
+ "input_attachment.cc",
+ "input_attachment.h",
"invalid.cc",
"invalid.h",
"manager.cc",
@@ -149,6 +151,7 @@
"f32_test.cc",
"helper_test.h",
"i32_test.cc",
+ "input_attachment_test.cc",
"manager_test.cc",
"matrix_test.cc",
"multisampled_texture_test.cc",
diff --git a/src/tint/lang/core/type/depth_texture_test.cc b/src/tint/lang/core/type/depth_texture_test.cc
index 849dcc1..771d8f7 100644
--- a/src/tint/lang/core/type/depth_texture_test.cc
+++ b/src/tint/lang/core/type/depth_texture_test.cc
@@ -29,6 +29,7 @@
#include "src/tint/lang/core/type/external_texture.h"
#include "src/tint/lang/core/type/helper_test.h"
+#include "src/tint/lang/core/type/input_attachment.h"
#include "src/tint/lang/core/type/sampled_texture.h"
#include "src/tint/lang/core/type/storage_texture.h"
#include "src/tint/lang/core/type/texture_dimension.h"
@@ -69,6 +70,7 @@
Texture* ty = &d;
EXPECT_TRUE(ty->Is<DepthTexture>());
EXPECT_FALSE(ty->Is<ExternalTexture>());
+ EXPECT_FALSE(ty->Is<InputAttachment>());
EXPECT_FALSE(ty->Is<SampledTexture>());
EXPECT_FALSE(ty->Is<StorageTexture>());
}
diff --git a/src/tint/lang/core/type/external_texture_test.cc b/src/tint/lang/core/type/external_texture_test.cc
index d798b90..d856dd1 100644
--- a/src/tint/lang/core/type/external_texture_test.cc
+++ b/src/tint/lang/core/type/external_texture_test.cc
@@ -29,6 +29,7 @@
#include "src/tint/lang/core/type/depth_texture.h"
#include "src/tint/lang/core/type/helper_test.h"
+#include "src/tint/lang/core/type/input_attachment.h"
#include "src/tint/lang/core/type/multisampled_texture.h"
#include "src/tint/lang/core/type/sampled_texture.h"
#include "src/tint/lang/core/type/storage_texture.h"
@@ -64,6 +65,7 @@
Texture* ty = &s;
EXPECT_FALSE(ty->Is<DepthTexture>());
EXPECT_TRUE(ty->Is<ExternalTexture>());
+ EXPECT_FALSE(ty->Is<InputAttachment>());
EXPECT_FALSE(ty->Is<MultisampledTexture>());
EXPECT_FALSE(ty->Is<SampledTexture>());
EXPECT_FALSE(ty->Is<StorageTexture>());
diff --git a/src/tint/lang/core/type/input_attachment.cc b/src/tint/lang/core/type/input_attachment.cc
new file mode 100644
index 0000000..6697e33
--- /dev/null
+++ b/src/tint/lang/core/type/input_attachment.cc
@@ -0,0 +1,67 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+// list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#include "src/tint/lang/core/type/input_attachment.h"
+
+#include "src/tint/lang/core/type/manager.h"
+#include "src/tint/lang/core/type/texture_dimension.h"
+#include "src/tint/utils/diagnostic/diagnostic.h"
+#include "src/tint/utils/ice/ice.h"
+#include "src/tint/utils/math/hash.h"
+#include "src/tint/utils/text/string_stream.h"
+
+TINT_INSTANTIATE_TYPEINFO(tint::core::type::InputAttachment);
+
+namespace tint::core::type {
+
+InputAttachment::InputAttachment(const Type* type)
+ : Base(Hash(TypeCode::Of<InputAttachment>().bits, type), TextureDimension::k2d), type_(type) {
+ TINT_ASSERT(type_);
+}
+
+InputAttachment::~InputAttachment() = default;
+
+bool InputAttachment::Equals(const UniqueNode& other) const {
+ if (auto* o = other.As<InputAttachment>()) {
+ return o->type_ == type_;
+ }
+ return false;
+}
+
+std::string InputAttachment::FriendlyName() const {
+ StringStream out;
+ out << "input_attachment"
+ << "<" << type_->FriendlyName() << ">";
+ return out.str();
+}
+
+InputAttachment* InputAttachment::Clone(CloneContext& ctx) const {
+ auto* ty = type_->Clone(ctx);
+ return ctx.dst.mgr->Get<InputAttachment>(ty);
+}
+
+} // namespace tint::core::type
diff --git a/src/tint/lang/core/type/input_attachment.h b/src/tint/lang/core/type/input_attachment.h
new file mode 100644
index 0000000..7feae62
--- /dev/null
+++ b/src/tint/lang/core/type/input_attachment.h
@@ -0,0 +1,67 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+// list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef SRC_TINT_LANG_CORE_TYPE_INPUT_ATTACHMENT_H_
+#define SRC_TINT_LANG_CORE_TYPE_INPUT_ATTACHMENT_H_
+
+#include <string>
+
+#include "src/tint/lang/core/type/texture.h"
+
+namespace tint::core::type {
+
+/// An input attachment type.
+class InputAttachment final : public Castable<InputAttachment, Texture> {
+ public:
+ /// Constructor
+ /// @param type the data type of the input attachment
+ explicit InputAttachment(const Type* type);
+ /// Destructor
+ ~InputAttachment() override;
+
+ /// @param other the other node to compare against
+ /// @returns true if the this type is equal to @p other
+ bool Equals(const UniqueNode& other) const override;
+
+ /// @returns the subtype of the input attachment
+ Type* type() const { return const_cast<Type*>(type_); }
+
+ /// @returns the name for this type that closely resembles how it would be
+ /// declared in WGSL.
+ std::string FriendlyName() const override;
+
+ /// @param ctx the clone context
+ /// @returns a clone of this type
+ InputAttachment* Clone(CloneContext& ctx) const override;
+
+ private:
+ const Type* const type_;
+};
+
+} // namespace tint::core::type
+
+#endif // SRC_TINT_LANG_CORE_TYPE_INPUT_ATTACHMENT_H_
diff --git a/src/tint/lang/core/type/input_attachment_test.cc b/src/tint/lang/core/type/input_attachment_test.cc
new file mode 100644
index 0000000..2a0584c
--- /dev/null
+++ b/src/tint/lang/core/type/input_attachment_test.cc
@@ -0,0 +1,110 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+// list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#include "src/tint/lang/core/type/input_attachment.h"
+
+#include "src/tint/lang/core/type/depth_texture.h"
+#include "src/tint/lang/core/type/external_texture.h"
+#include "src/tint/lang/core/type/helper_test.h"
+#include "src/tint/lang/core/type/multisampled_texture.h"
+#include "src/tint/lang/core/type/sampled_texture.h"
+#include "src/tint/lang/core/type/storage_texture.h"
+#include "src/tint/lang/core/type/texture_dimension.h"
+
+namespace tint::core::type {
+namespace {
+
+using InputAttachmentTest = TestHelper;
+
+TEST_F(InputAttachmentTest, Creation) {
+ auto* a = create<InputAttachment>(create<F32>());
+ auto* b = create<InputAttachment>(create<F32>());
+ auto* c = create<InputAttachment>(create<U32>());
+ auto* d = create<InputAttachment>(create<I32>());
+ EXPECT_EQ(a, b);
+ EXPECT_NE(a, c);
+ EXPECT_NE(a, d);
+ EXPECT_NE(c, d);
+}
+
+TEST_F(InputAttachmentTest, Hash) {
+ auto* a = create<InputAttachment>(create<F32>());
+ auto* b = create<InputAttachment>(create<F32>());
+ EXPECT_EQ(a->unique_hash, b->unique_hash);
+}
+
+TEST_F(InputAttachmentTest, Equals) {
+ auto* a = create<InputAttachment>(create<F32>());
+ auto* b = create<InputAttachment>(create<F32>());
+ auto* c = create<InputAttachment>(create<I32>());
+ EXPECT_TRUE(a->Equals(*b));
+ EXPECT_FALSE(a->Equals(*c));
+ EXPECT_FALSE(a->Equals(Void{}));
+}
+
+TEST_F(InputAttachmentTest, IsTexture) {
+ F32 f32;
+ InputAttachment s(&f32);
+ Texture* ty = &s;
+ EXPECT_FALSE(ty->Is<DepthTexture>());
+ EXPECT_FALSE(ty->Is<ExternalTexture>());
+ EXPECT_TRUE(ty->Is<InputAttachment>());
+ EXPECT_FALSE(ty->Is<MultisampledTexture>());
+ EXPECT_FALSE(ty->Is<SampledTexture>());
+ EXPECT_FALSE(ty->Is<StorageTexture>());
+}
+
+TEST_F(InputAttachmentTest, Dim) {
+ F32 f32;
+ InputAttachment s(&f32);
+ EXPECT_EQ(s.dim(), TextureDimension::k2d);
+}
+
+TEST_F(InputAttachmentTest, FriendlyName) {
+ F32 f32;
+ InputAttachment s(&f32);
+ EXPECT_EQ(s.FriendlyName(), "input_attachment<f32>");
+}
+
+TEST_F(InputAttachmentTest, Clone) {
+ auto* a = create<InputAttachment>(create<F32>());
+ auto* b = create<InputAttachment>(create<I32>());
+
+ core::type::Manager mgr;
+ core::type::CloneContext ctx{{nullptr}, {nullptr, &mgr}};
+
+ auto* c = a->Clone(ctx);
+ ASSERT_TRUE(c->Is<InputAttachment>());
+ EXPECT_TRUE(c->type()->Is<F32>());
+
+ auto* d = b->Clone(ctx);
+ ASSERT_TRUE(d->Is<InputAttachment>());
+ EXPECT_TRUE(d->type()->Is<I32>());
+}
+
+} // namespace
+} // namespace tint::core::type
diff --git a/src/tint/lang/core/type/multisampled_texture_test.cc b/src/tint/lang/core/type/multisampled_texture_test.cc
index 2eb6739..1368c00 100644
--- a/src/tint/lang/core/type/multisampled_texture_test.cc
+++ b/src/tint/lang/core/type/multisampled_texture_test.cc
@@ -30,6 +30,7 @@
#include "src/tint/lang/core/type/depth_texture.h"
#include "src/tint/lang/core/type/external_texture.h"
#include "src/tint/lang/core/type/helper_test.h"
+#include "src/tint/lang/core/type/input_attachment.h"
#include "src/tint/lang/core/type/sampled_texture.h"
#include "src/tint/lang/core/type/storage_texture.h"
#include "src/tint/lang/core/type/texture_dimension.h"
@@ -72,6 +73,7 @@
Texture* ty = &s;
EXPECT_FALSE(ty->Is<DepthTexture>());
EXPECT_FALSE(ty->Is<ExternalTexture>());
+ EXPECT_FALSE(ty->Is<InputAttachment>());
EXPECT_TRUE(ty->Is<MultisampledTexture>());
EXPECT_FALSE(ty->Is<SampledTexture>());
EXPECT_FALSE(ty->Is<StorageTexture>());
diff --git a/src/tint/lang/core/type/sampled_texture_test.cc b/src/tint/lang/core/type/sampled_texture_test.cc
index 4de7609..0c67600 100644
--- a/src/tint/lang/core/type/sampled_texture_test.cc
+++ b/src/tint/lang/core/type/sampled_texture_test.cc
@@ -30,6 +30,7 @@
#include "src/tint/lang/core/type/depth_texture.h"
#include "src/tint/lang/core/type/external_texture.h"
#include "src/tint/lang/core/type/helper_test.h"
+#include "src/tint/lang/core/type/input_attachment.h"
#include "src/tint/lang/core/type/storage_texture.h"
#include "src/tint/lang/core/type/texture_dimension.h"
@@ -77,6 +78,7 @@
Texture* ty = &s;
EXPECT_FALSE(ty->Is<DepthTexture>());
EXPECT_FALSE(ty->Is<ExternalTexture>());
+ EXPECT_FALSE(ty->Is<InputAttachment>());
EXPECT_TRUE(ty->Is<SampledTexture>());
EXPECT_FALSE(ty->Is<StorageTexture>());
}
diff --git a/src/tint/lang/wgsl/intrinsic/data.cc b/src/tint/lang/wgsl/intrinsic/data.cc
index 1ce3cb6..5c5b46d 100644
--- a/src/tint/lang/wgsl/intrinsic/data.cc
+++ b/src/tint/lang/wgsl/intrinsic/data.cc
@@ -973,6 +973,26 @@
};
+/// TypeMatcher for 'type input_attachment'
+constexpr TypeMatcher kInputAttachmentMatcher {
+/* match */ [](MatchState& state, const Type* ty) -> const Type* {
+ const Type* T = nullptr;
+ if (!MatchInputAttachment(state, ty, T)) {
+ return nullptr;
+ }
+ T = state.Type(T);
+ if (T == nullptr) {
+ return nullptr;
+ }
+ return BuildInputAttachment(state, ty, T);
+ },
+/* print */ []([[maybe_unused]] MatchState* state, StyledText& out) {StyledText T;
+ state->PrintType(T);
+ out << style::Type("input_attachment", "<", T, ">");
+ }
+};
+
+
/// TypeMatcher for 'type __modf_result'
constexpr TypeMatcher kModfResultMatcher {
/* match */ [](MatchState& state, const Type* ty) -> const Type* {
@@ -1787,31 +1807,32 @@
/* [46] */ kTextureStorage3DMatcher,
/* [47] */ kTextureExternalMatcher,
/* [48] */ kPackedVec3Matcher,
- /* [49] */ kModfResultMatcher,
- /* [50] */ kModfResultVecMatcher,
- /* [51] */ kFrexpResultMatcher,
- /* [52] */ kFrexpResultVecMatcher,
- /* [53] */ kAtomicCompareExchangeResultMatcher,
- /* [54] */ kScalarMatcher,
- /* [55] */ kConcreteScalarMatcher,
- /* [56] */ kScalarNoF32Matcher,
- /* [57] */ kScalarNoF16Matcher,
- /* [58] */ kScalarNoI32Matcher,
- /* [59] */ kScalarNoU32Matcher,
- /* [60] */ kScalarNoBoolMatcher,
- /* [61] */ kFiaFiu32F16Matcher,
- /* [62] */ kFiaFi32F16Matcher,
- /* [63] */ kFiaFiu32Matcher,
- /* [64] */ kFaF32Matcher,
- /* [65] */ kFaF32F16Matcher,
- /* [66] */ kIaIu32Matcher,
- /* [67] */ kIaI32Matcher,
- /* [68] */ kFiu32F16Matcher,
- /* [69] */ kFiu32Matcher,
- /* [70] */ kFi32F16Matcher,
- /* [71] */ kFi32Matcher,
- /* [72] */ kF32F16Matcher,
- /* [73] */ kIu32Matcher,
+ /* [49] */ kInputAttachmentMatcher,
+ /* [50] */ kModfResultMatcher,
+ /* [51] */ kModfResultVecMatcher,
+ /* [52] */ kFrexpResultMatcher,
+ /* [53] */ kFrexpResultVecMatcher,
+ /* [54] */ kAtomicCompareExchangeResultMatcher,
+ /* [55] */ kScalarMatcher,
+ /* [56] */ kConcreteScalarMatcher,
+ /* [57] */ kScalarNoF32Matcher,
+ /* [58] */ kScalarNoF16Matcher,
+ /* [59] */ kScalarNoI32Matcher,
+ /* [60] */ kScalarNoU32Matcher,
+ /* [61] */ kScalarNoBoolMatcher,
+ /* [62] */ kFiaFiu32F16Matcher,
+ /* [63] */ kFiaFi32F16Matcher,
+ /* [64] */ kFiaFiu32Matcher,
+ /* [65] */ kFaF32Matcher,
+ /* [66] */ kFaF32F16Matcher,
+ /* [67] */ kIaIu32Matcher,
+ /* [68] */ kIaI32Matcher,
+ /* [69] */ kFiu32F16Matcher,
+ /* [70] */ kFiu32Matcher,
+ /* [71] */ kFi32F16Matcher,
+ /* [72] */ kFi32Matcher,
+ /* [73] */ kF32F16Matcher,
+ /* [74] */ kIu32Matcher,
};
/// The template numbers, and number matchers
@@ -1895,7 +1916,7 @@
/* [58] */ MatcherIndex(0),
/* [59] */ MatcherIndex(23),
/* [60] */ MatcherIndex(1),
- /* [61] */ MatcherIndex(69),
+ /* [61] */ MatcherIndex(70),
/* [62] */ MatcherIndex(23),
/* [63] */ MatcherIndex(1),
/* [64] */ MatcherIndex(2),
@@ -1911,13 +1932,13 @@
/* [74] */ MatcherIndex(23),
/* [75] */ MatcherIndex(0),
/* [76] */ MatcherIndex(9),
- /* [77] */ MatcherIndex(52),
+ /* [77] */ MatcherIndex(53),
/* [78] */ MatcherIndex(0),
/* [79] */ MatcherIndex(1),
/* [80] */ MatcherIndex(23),
/* [81] */ MatcherIndex(0),
/* [82] */ MatcherIndex(2),
- /* [83] */ MatcherIndex(50),
+ /* [83] */ MatcherIndex(51),
/* [84] */ MatcherIndex(0),
/* [85] */ MatcherIndex(1),
/* [86] */ MatcherIndex(43),
@@ -1953,16 +1974,16 @@
/* [116] */ MatcherIndex(11),
/* [117] */ MatcherIndex(10),
/* [118] */ MatcherIndex(11),
- /* [119] */ MatcherIndex(69),
+ /* [119] */ MatcherIndex(70),
/* [120] */ MatcherIndex(13),
/* [121] */ MatcherIndex(10),
/* [122] */ MatcherIndex(11),
/* [123] */ MatcherIndex(1),
/* [124] */ MatcherIndex(12),
/* [125] */ MatcherIndex(0),
- /* [126] */ MatcherIndex(51),
+ /* [126] */ MatcherIndex(52),
/* [127] */ MatcherIndex(0),
- /* [128] */ MatcherIndex(49),
+ /* [128] */ MatcherIndex(50),
/* [129] */ MatcherIndex(0),
/* [130] */ MatcherIndex(11),
/* [131] */ MatcherIndex(9),
@@ -2014,7 +2035,7 @@
/* [177] */ MatcherIndex(0),
/* [178] */ MatcherIndex(12),
/* [179] */ MatcherIndex(1),
- /* [180] */ MatcherIndex(53),
+ /* [180] */ MatcherIndex(54),
/* [181] */ MatcherIndex(0),
/* [182] */ MatcherIndex(11),
/* [183] */ MatcherIndex(5),
@@ -2078,12 +2099,12 @@
/* [241] */ MatcherIndex(10),
/* [242] */ MatcherIndex(48),
/* [243] */ MatcherIndex(0),
- /* [244] */ MatcherIndex(61),
- /* [245] */ MatcherIndex(65),
- /* [246] */ MatcherIndex(73),
- /* [247] */ MatcherIndex(67),
- /* [248] */ MatcherIndex(54),
- /* [249] */ MatcherIndex(62),
+ /* [244] */ MatcherIndex(62),
+ /* [245] */ MatcherIndex(66),
+ /* [246] */ MatcherIndex(74),
+ /* [247] */ MatcherIndex(68),
+ /* [248] */ MatcherIndex(55),
+ /* [249] */ MatcherIndex(63),
/* [250] */ MatcherIndex(38),
/* [251] */ MatcherIndex(39),
/* [252] */ MatcherIndex(40),
@@ -2093,15 +2114,15 @@
/* [256] */ MatcherIndex(29),
/* [257] */ MatcherIndex(30),
/* [258] */ MatcherIndex(6),
- /* [259] */ MatcherIndex(68),
- /* [260] */ MatcherIndex(66),
- /* [261] */ MatcherIndex(58),
- /* [262] */ MatcherIndex(59),
- /* [263] */ MatcherIndex(56),
- /* [264] */ MatcherIndex(57),
- /* [265] */ MatcherIndex(60),
- /* [266] */ MatcherIndex(55),
- /* [267] */ MatcherIndex(72),
+ /* [259] */ MatcherIndex(69),
+ /* [260] */ MatcherIndex(67),
+ /* [261] */ MatcherIndex(59),
+ /* [262] */ MatcherIndex(60),
+ /* [263] */ MatcherIndex(57),
+ /* [264] */ MatcherIndex(58),
+ /* [265] */ MatcherIndex(61),
+ /* [266] */ MatcherIndex(56),
+ /* [267] */ MatcherIndex(73),
};
static_assert(MatcherIndicesIndex::CanIndex(kMatcherIndices),
diff --git a/src/tint/lang/wgsl/wgsl.def b/src/tint/lang/wgsl/wgsl.def
index a16ae7f..2fbd877 100644
--- a/src/tint/lang/wgsl/wgsl.def
+++ b/src/tint/lang/wgsl/wgsl.def
@@ -158,6 +158,7 @@
type texture_storage_3d<F: texel_format, A: access>
type texture_external
type packedVec3<T>
+type input_attachment<T>
@display("__modf_result_{T}") type __modf_result<T>
@display("__modf_result_vec{N}_{T}") type __modf_result_vec<N: num, T>