[msl] Drop unittest validation to MSL 2.2.

The support for MSL 2.3 only appears on machines with OS11.*. There are
a few machines we test on which uses 10.*. This CL changes the default
to validate against MSL2.2. Using 2.3 on a 10.* machine will return a
validation failure.

Change-Id: I51abbb884cea5d7b0e3ca1f60463986b050985a4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/203134
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
diff --git a/src/tint/lang/msl/validate/validate_metal.mm b/src/tint/lang/msl/validate/validate_metal.mm
index 9804f5b..0d5d507 100644
--- a/src/tint/lang/msl/validate/validate_metal.mm
+++ b/src/tint/lang/msl/validate/validate_metal.mm
@@ -60,9 +60,7 @@
             compileOptions.languageVersion = MTLLanguageVersion2_2;
             break;
         case MslVersion::kMsl_2_3:
-            if (@available(macOS 11.0, *)) {
-                compileOptions.languageVersion = MTLLanguageVersion2_3;
-            }
+            compileOptions.languageVersion = MTLLanguageVersion2_3;
             break;
     }
 
diff --git a/src/tint/lang/msl/writer/helper_test.h b/src/tint/lang/msl/writer/helper_test.h
index dcfdba2..714b24f 100644
--- a/src/tint/lang/msl/writer/helper_test.h
+++ b/src/tint/lang/msl/writer/helper_test.h
@@ -80,7 +80,9 @@
     /// Run the writer on the IR module and validate the result.
     /// @param options the writer options
     /// @returns true if generation and validation succeeded
-    bool Generate(Options options = {}) {
+    bool Generate(
+        Options options = {},
+        [[maybe_unused]] validate::MslVersion msl_version = validate::MslVersion::kMsl_2_2) {
         auto result = writer::Generate(mod, options);
         if (result != Success) {
             err_ = result.Failure().reason.Str();
@@ -89,8 +91,7 @@
         output_ = result.Get();
 
 #if TINT_BUILD_IS_MAC
-        auto msl_validation =
-            validate::ValidateUsingMetal(output_.msl, validate::MslVersion::kMsl_2_3);
+        auto msl_validation = validate::ValidateUsingMetal(output_.msl, msl_version);
         if (msl_validation.failed) {
             err_ = msl_validation.output;
             return false;