tint_cmd: force DXC to use HLSL 2018 like Dawn

The latest DXC changed the default to use HLSL 2021, which fails to
compile some of our e2e tests because of changes in how ternary
expressions with vectors work. Let's just do as Dawn does, and force DXC
to use HLSL 2018 rules.

Bug: tint:2018
Change-Id: I471a851afba8d5f8fc9e71262062c0ee96ffe8a3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/148740
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
diff --git a/src/tint/lang/hlsl/validate/hlsl.cc b/src/tint/lang/hlsl/validate/hlsl.cc
index 323885d..bbcde35 100644
--- a/src/tint/lang/hlsl/validate/hlsl.cc
+++ b/src/tint/lang/hlsl/validate/hlsl.cc
@@ -74,6 +74,7 @@
         // and dawn_native\d3d12\ShaderModuleD3D12.cpp (GetDXCArguments)
         auto res = dxc(
             "-T " + std::string(stage_prefix) + "_" + std::string(shader_model_version),  // Profile
+            "-HV 2018 ",                                       // Use HLSL 2018
             "-E " + ep.first,                                  // Entry point
             "/Zpr",                                            // D3DCOMPILE_PACK_MATRIX_ROW_MAJOR
             "/Gis",                                            // D3DCOMPILE_IEEE_STRICTNESS