tint/resolver: Temporally ban f16 in buffer, pipeline IO and override

This patch make resolver reject using f16 types in uniform or storage
buffer, pipeline IO or overridable variable, since these are not
implemented yet. This can help prevent hitting invalid path in writers.

Bug: tint:1473, tint:1502
Change-Id: I5ea753e4254276a6d141d7012a6d0987423a61cf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/95827
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Zhaoming Jiang <zhaoming.jiang@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
diff --git a/src/tint/resolver/entry_point_validation_test.cc b/src/tint/resolver/entry_point_validation_test.cc
index 5e5df15..b0495c2 100644
--- a/src/tint/resolver/entry_point_validation_test.cc
+++ b/src/tint/resolver/entry_point_validation_test.cc
@@ -334,12 +334,26 @@
     ParamsFor<alias<i32>>(true),    //
     ParamsFor<alias<u32>>(true),    //
     ParamsFor<alias<bool>>(false),  //
+    // Currently entry point IO of f16 types are not implemented yet.
+    // TODO(tint:1473, tint:1502): Change f16 and vecN<f16> cases to valid after f16 is supported in
+    // entry point IO.
+    ParamsFor<f16>(false),          //
+    ParamsFor<vec2<f16>>(false),    //
+    ParamsFor<vec3<f16>>(false),    //
+    ParamsFor<vec4<f16>>(false),    //
+    ParamsFor<mat2x2<f16>>(false),  //
+    ParamsFor<mat3x3<f16>>(false),  //
+    ParamsFor<mat4x4<f16>>(false),  //
+    ParamsFor<alias<f16>>(false),   //
 };
 
 TEST_P(TypeValidationTest, BareInputs) {
     // @fragment
     // fn main(@location(0) @interpolate(flat) a : *) {}
     auto params = GetParam();
+
+    Enable(ast::Extension::kF16);
+
     auto* a = Param("a", params.create_ast_type(*this), {Location(0), Flat()});
     Func(Source{{12, 34}}, "main", {a}, ty.void_(), {}, {Stage(ast::PipelineStage::kFragment)});
 
@@ -357,6 +371,9 @@
     // @fragment
     // fn main(a : Input) {}
     auto params = GetParam();
+
+    Enable(ast::Extension::kF16);
+
     auto* input =
         Structure("Input", {Member("a", params.create_ast_type(*this), {Location(0), Flat()})});
     auto* a = Param("a", ty.Of(input), {});
@@ -375,6 +392,9 @@
     //   return *();
     // }
     auto params = GetParam();
+
+    Enable(ast::Extension::kF16);
+
     Func(Source{{12, 34}}, "main", {}, params.create_ast_type(*this),
          {Return(Construct(params.create_ast_type(*this)))}, {Stage(ast::PipelineStage::kFragment)},
          {Location(0)});
@@ -395,6 +415,9 @@
     //   return Output();
     // }
     auto params = GetParam();
+
+    Enable(ast::Extension::kF16);
+
     auto* output = Structure("Output", {Member("a", params.create_ast_type(*this), {Location(0)})});
     Func(Source{{12, 34}}, "main", {}, ty.Of(output), {Return(Construct(ty.Of(output)))},
          {Stage(ast::PipelineStage::kFragment)});