Browse Source

Update all the HLSL tests that rely on HLSL 2018 (#4878)

This updates all the tests cases that rely on HLSL 2018 behaviors that
will break if the default HLSL version updates to 2021.

These tests are updated to be passed the HLSL 2018 version so they
continue testing and working under the same behaviors.
Chris B 2 years ago
parent
commit
aac8727291
100 changed files with 123 additions and 123 deletions
  1. 1 1
      tools/clang/test/CodeGenHLSL/Samples/D12/d12_multithreading_ps.hlsl
  2. 1 1
      tools/clang/test/CodeGenHLSL/Samples/D12/d12_multithreading_vs.hlsl
  3. 1 1
      tools/clang/test/CodeGenHLSL/Samples/DX11/BC6HDecode.hlsl
  4. 1 1
      tools/clang/test/CodeGenHLSL/Samples/DX11/BC6HEncode_EncodeBlockCS.hlsl
  5. 1 1
      tools/clang/test/CodeGenHLSL/Samples/DX11/BC6HEncode_TryModeG10CS.hlsl
  6. 1 1
      tools/clang/test/CodeGenHLSL/Samples/DX11/BC6HEncode_TryModeLE10CS.hlsl
  7. 1 1
      tools/clang/test/CodeGenHLSL/Samples/DX11/ContactHardeningShadows11_PS.hlsl
  8. 1 1
      tools/clang/test/CodeGenHLSL/Samples/DX11/DecalTessellation11_DS.hlsl
  9. 1 1
      tools/clang/test/CodeGenHLSL/Samples/DX11/TessellatorCS40_NumVerticesIndicesCS.hlsl
  10. 1 1
      tools/clang/test/CodeGenHLSL/Samples/DX11/TessellatorCS40_TessellateIndicesCS.hlsl
  11. 1 1
      tools/clang/test/CodeGenHLSL/Samples/DX11/TessellatorCS40_TessellateVerticesCS.hlsl
  12. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/ApplyBloomCS.hlsl
  13. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/BicubicHorizontalUpsamplePS.hlsl
  14. 2 2
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/BicubicUpsampleGammaPS.hlsl
  15. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/BicubicUpsamplePS.hlsl
  16. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/BicubicVerticalUpsamplePS.hlsl
  17. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/BilinearUpsamplePS.hlsl
  18. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/BloomExtractAndDownsampleHdrCS.hlsl
  19. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/BloomExtractAndDownsampleLdrCS.hlsl
  20. 2 2
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/ConvertLDRToDisplayAltPS.hlsl
  21. 2 2
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/ConvertLDRToDisplayPS.hlsl
  22. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/DebugLuminanceHdrCS.hlsl
  23. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/DebugLuminanceLdrCS.hlsl
  24. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/ExtractLumaCS.hlsl
  25. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/GenerateMipsGammaCS.hlsl
  26. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/GenerateMipsGammaOddCS.hlsl
  27. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/GenerateMipsGammaOddXCS.hlsl
  28. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/GenerateMipsGammaOddYCS.hlsl
  29. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/GenerateMipsLinearCS.hlsl
  30. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/GenerateMipsLinearOddCS.hlsl
  31. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/GenerateMipsLinearOddXCS.hlsl
  32. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/GenerateMipsLinearOddYCS.hlsl
  33. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/MagnifyPixelsPS.hlsl
  34. 2 2
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/SharpeningUpsampleGammaPS.hlsl
  35. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/SharpeningUpsamplePS.hlsl
  36. 2 2
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/TemporalBlendCS.hlsl
  37. 2 2
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/ToneMap2CS.hlsl
  38. 1 1
      tools/clang/test/CodeGenHLSL/Samples/MiniEngine/ToneMapCS.hlsl
  39. 1 1
      tools/clang/test/CodeGenSPIRV/binary-op.comma.hlsl
  40. 1 1
      tools/clang/test/CodeGenSPIRV/binary-op.logical-and.hlsl
  41. 1 1
      tools/clang/test/CodeGenSPIRV/binary-op.logical-or.hlsl
  42. 1 1
      tools/clang/test/CodeGenSPIRV/cast.flat-conversion.struct-to-struct.hlsl
  43. 1 1
      tools/clang/test/CodeGenSPIRV/cast.literal-type.ternary.hlsl
  44. 1 1
      tools/clang/test/CodeGenSPIRV/cf.cond-op.hlsl
  45. 1 1
      tools/clang/test/CodeGenSPIRV/cf.logical-and.hlsl
  46. 1 1
      tools/clang/test/CodeGenSPIRV/cf.logical-or.hlsl
  47. 1 1
      tools/clang/test/CodeGenSPIRV/decoration.relaxed-precision.bool.hlsl
  48. 1 1
      tools/clang/test/CodeGenSPIRV/literal.constant-composite.hlsl
  49. 1 1
      tools/clang/test/CodeGenSPIRV/literal.vec-times-scalar.hlsl
  50. 1 1
      tools/clang/test/CodeGenSPIRV/shader.debug.line.branch.hlsl
  51. 1 1
      tools/clang/test/CodeGenSPIRV/shader.debug.line.operators.hlsl
  52. 1 1
      tools/clang/test/CodeGenSPIRV/sm6.quad-read-across-diagonal.vulkan1.2.hlsl
  53. 1 1
      tools/clang/test/CodeGenSPIRV/sm6.wave-active-all-equal.hlsl
  54. 1 1
      tools/clang/test/CodeGenSPIRV/sm6.wave-active-all-equal.vulkan1.2.hlsl
  55. 1 1
      tools/clang/test/CodeGenSPIRV/spirv.debug.opline.branch.hlsl
  56. 1 1
      tools/clang/test/CodeGenSPIRV/spirv.debug.opline.operators.hlsl
  57. 1 1
      tools/clang/test/CodeGenSPIRV/ternary-op.cond-op.hlsl
  58. 1 1
      tools/clang/test/CodeGenSPIRV/vk.layout.cbuffer.boolean.hlsl
  59. 1 1
      tools/clang/test/CodeGenSPIRV/vk.spec-constant.reuse.hlsl
  60. 2 2
      tools/clang/test/HLSL/attributes.hlsl
  61. 2 2
      tools/clang/test/HLSL/conversions-between-type-shapes.hlsl
  62. 1 1
      tools/clang/test/HLSL/cpp-errors.hlsl
  63. 1 1
      tools/clang/test/HLSL/functions.hlsl
  64. 1 1
      tools/clang/test/HLSL/implicit-casts.hlsl
  65. 1 1
      tools/clang/test/HLSL/vector-conditional.hlsl
  66. 2 2
      tools/clang/test/HLSLFileCheck/hlsl/classes/mismatch_class_implicit_cast.hlsl
  67. 1 1
      tools/clang/test/HLSLFileCheck/hlsl/compile_options/enable_templates.hlsl
  68. 1 1
      tools/clang/test/HLSLFileCheck/hlsl/control_flow/attributes/unroll/big_step_non_trivial.hlsl
  69. 1 1
      tools/clang/test/HLSLFileCheck/hlsl/control_flow/attributes/unroll/partial_cond.hlsl
  70. 1 1
      tools/clang/test/HLSLFileCheck/hlsl/control_flow/if_else/if8.hlsl
  71. 1 1
      tools/clang/test/HLSLFileCheck/hlsl/control_flow/if_else/logical_no_short_circuiting.hlsl
  72. 1 1
      tools/clang/test/HLSLFileCheck/hlsl/control_flow/if_else/ternary_conditional_to_select.hlsl
  73. 1 1
      tools/clang/test/HLSLFileCheck/hlsl/control_flow/if_else/vector_comparison.hlsl
  74. 2 2
      tools/clang/test/HLSLFileCheck/hlsl/diagnostics/warnings/using.hlsl
  75. 1 1
      tools/clang/test/HLSLFileCheck/hlsl/functions/arguments/outputArray.hlsl
  76. 1 1
      tools/clang/test/HLSLFileCheck/hlsl/intrinsics/boolean/all_lit.hlsl
  77. 1 1
      tools/clang/test/HLSLFileCheck/hlsl/intrinsics/wave/reduction/WaveBreakAndUnrollCS.hlsl
  78. 2 2
      tools/clang/test/HLSLFileCheck/hlsl/operators/binary/arithmetic.hlsl
  79. 2 2
      tools/clang/test/HLSLFileCheck/hlsl/operators/binary/vector_arithmetic.hlsl
  80. 1 1
      tools/clang/test/HLSLFileCheck/hlsl/operators/select/sel_vec1_mixed.hlsl
  81. 2 2
      tools/clang/test/HLSLFileCheck/hlsl/types/boolean/const_init_list_no_crash.hlsl
  82. 2 2
      tools/clang/test/HLSLFileCheck/hlsl/types/cast/StructCast.hlsl
  83. 1 1
      tools/clang/test/HLSLFileCheck/hlsl/types/cast/bool_cast_initializer_syntax_test.hlsl
  84. 2 2
      tools/clang/test/HLSLFileCheck/hlsl/types/cast/identical_layout_structs/explicit_cast_as_out_param.hlsl
  85. 2 2
      tools/clang/test/HLSLFileCheck/hlsl/types/cast/identical_layout_structs/implicit_cast_as_func_param_user_scenario.hlsl
  86. 2 2
      tools/clang/test/HLSLFileCheck/hlsl/types/cast/identical_layout_structs/implicit_cast_as_streamout_append.hlsl
  87. 1 1
      tools/clang/test/HLSLFileCheck/hlsl/types/conversions/between_type_shapes.hlsl
  88. 2 2
      tools/clang/test/HLSLFileCheck/hlsl/types/conversions/functions_Mod.hlsl
  89. 2 2
      tools/clang/test/HLSLFileCheck/hlsl/types/conversions/implicit-casts_Mod.hlsl
  90. 2 2
      tools/clang/test/HLSLFileCheck/hlsl/types/matrix/selMat.hlsl
  91. 2 2
      tools/clang/test/HLSLFileCheck/hlsl/types/struct/anonymous.hlsl
  92. 2 2
      tools/clang/test/HLSLFileCheck/hlsl/types/struct/structArray.hlsl
  93. 1 1
      tools/clang/test/HLSLFileCheck/samples/MiniEngine/ApplyBloomCS.hlsl
  94. 1 1
      tools/clang/test/HLSLFileCheck/samples/MiniEngine/BicubicHorizontalUpsamplePS.hlsl
  95. 2 2
      tools/clang/test/HLSLFileCheck/samples/MiniEngine/BicubicUpsampleGammaPS.hlsl
  96. 1 1
      tools/clang/test/HLSLFileCheck/samples/MiniEngine/BicubicUpsamplePS.hlsl
  97. 1 1
      tools/clang/test/HLSLFileCheck/samples/MiniEngine/BicubicVerticalUpsamplePS.hlsl
  98. 1 1
      tools/clang/test/HLSLFileCheck/samples/MiniEngine/BilinearUpsamplePS.hlsl
  99. 1 1
      tools/clang/test/HLSLFileCheck/samples/MiniEngine/BloomExtractAndDownsampleHdrCS.hlsl
  100. 1 1
      tools/clang/test/HLSLFileCheck/samples/MiniEngine/BloomExtractAndDownsampleLdrCS.hlsl

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/D12/d12_multithreading_ps.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: Sqrt
 // CHECK: Sqrt
 // CHECK: dot3
 // CHECK: dot3

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/D12/d12_multithreading_vs.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T vs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T vs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // The constant buffer should be allocated with ID zero and referenced as such.
 // The constant buffer should be allocated with ID zero and referenced as such.
 
 

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/DX11/BC6HDecode.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: groupId
 // CHECK: groupId
 // CHECK: flattenedThreadIdInGroup
 // CHECK: flattenedThreadIdInGroup

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/DX11/BC6HEncode_EncodeBlockCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // check input.
 // check input.
 // CHECK: flattenedThreadIdInGroup
 // CHECK: flattenedThreadIdInGroup

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/DX11/BC6HEncode_TryModeG10CS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // check input.
 // check input.
 // CHECK: flattenedThreadIdInGroup
 // CHECK: flattenedThreadIdInGroup

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/DX11/BC6HEncode_TryModeLE10CS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // check input.
 // check input.
 // CHECK: flattenedThreadIdInGroup
 // CHECK: flattenedThreadIdInGroup

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/DX11/ContactHardeningShadows11_PS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 -O0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -O0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: Round_ni
 // CHECK: Round_ni
 // CHECK: textureGather
 // CHECK: textureGather

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/DX11/DecalTessellation11_DS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ds_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T ds_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: domainLocation
 // CHECK: domainLocation
 // CHECK: domainLocation
 // CHECK: domainLocation

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/DX11/TessellatorCS40_NumVerticesIndicesCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 -O0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -O0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: threadId
 // CHECK: threadId
 // CHECK: bufferLoad
 // CHECK: bufferLoad

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/DX11/TessellatorCS40_TessellateIndicesCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 -O0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -O0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: threadId
 // CHECK: threadId
 // CHECK: bufferLoad
 // CHECK: bufferLoad

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/DX11/TessellatorCS40_TessellateVerticesCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 -O0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -O0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: threadId
 // CHECK: threadId
 // CHECK: bufferLoad
 // CHECK: bufferLoad

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/ApplyBloomCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: threadId
 // CHECK: threadId
 // CHECK: dot3
 // CHECK: dot3

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/BicubicHorizontalUpsamplePS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: Frc
 // CHECK: Frc
 // CHECK: IMax
 // CHECK: IMax

+ 2 - 2
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/BicubicUpsampleGammaPS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 -O0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -O0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: Frc
 // CHECK: Frc
 // CHECK: IMax
 // CHECK: IMax
@@ -22,4 +22,4 @@
 //
 //
 
 
 #define GAMMA_SPACE
 #define GAMMA_SPACE
-#include "BicubicUpsamplePS.hlsl"
+#include "BicubicUpsamplePS.hlsl"

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/BicubicUpsamplePS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 -O0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -O0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: Frc
 // CHECK: Frc
 // CHECK: IMax
 // CHECK: IMax

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/BicubicVerticalUpsamplePS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: IMax
 // CHECK: IMax
 // CHECK: UMin
 // CHECK: UMin

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/BilinearUpsamplePS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 -O0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -O0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: sampleLevel
 // CHECK: sampleLevel
 // CHECK: Log
 // CHECK: Log

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/BloomExtractAndDownsampleHdrCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: sampleLevel
 // CHECK: sampleLevel
 // CHECK: FMax
 // CHECK: FMax

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/BloomExtractAndDownsampleLdrCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: threadId
 // CHECK: threadId
 // CHECK: dot3
 // CHECK: dot3

+ 2 - 2
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/ConvertLDRToDisplayAltPS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: textureLoad
 // CHECK: textureLoad
 // CHECK: Log
 // CHECK: Log
@@ -49,4 +49,4 @@ float3 main( float4 position : SV_Position ) : SV_Target0
 	return ApplyColorProfile(LinearRGB, COLOR_FORMAT_sRGB_FULL);
 	return ApplyColorProfile(LinearRGB, COLOR_FORMAT_sRGB_FULL);
 #endif
 #endif
 
 
-}
+}

+ 2 - 2
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/ConvertLDRToDisplayPS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 -O0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -O0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: textureLoad
 // CHECK: textureLoad
 // CHECK: Log
 // CHECK: Log
@@ -27,4 +27,4 @@ float3 main( float4 position : SV_Position ) : SV_Target0
 {
 {
 	float3 LinearRGB = LinearizeColor(ColorTex[(int2)position.xy], LDR_COLOR_FORMAT);
 	float3 LinearRGB = LinearizeColor(ColorTex[(int2)position.xy], LDR_COLOR_FORMAT);
 	return ApplyColorProfile(LinearRGB, DISPLAY_PLANE_FORMAT);
 	return ApplyColorProfile(LinearRGB, DISPLAY_PLANE_FORMAT);
-}
+}

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/DebugLuminanceHdrCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: threadId
 // CHECK: threadId
 // CHECK: textureLoad
 // CHECK: textureLoad

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/DebugLuminanceLdrCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: threadId
 // CHECK: threadId
 // CHECK: textureLoad
 // CHECK: textureLoad

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/ExtractLumaCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: threadId
 // CHECK: threadId
 // CHECK: sampleLevel
 // CHECK: sampleLevel

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/GenerateMipsGammaCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: flattenedThreadIdInGroup
 // CHECK: flattenedThreadIdInGroup
 // CHECK: threadId
 // CHECK: threadId

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/GenerateMipsGammaOddCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: flattenedThreadIdInGroup
 // CHECK: flattenedThreadIdInGroup
 // CHECK: threadId
 // CHECK: threadId

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/GenerateMipsGammaOddXCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: flattenedThreadIdInGroup
 // CHECK: flattenedThreadIdInGroup
 // CHECK: threadId
 // CHECK: threadId

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/GenerateMipsGammaOddYCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: flattenedThreadIdInGroup
 // CHECK: flattenedThreadIdInGroup
 // CHECK: threadId
 // CHECK: threadId

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/GenerateMipsLinearCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: flattenedThreadIdInGroup
 // CHECK: flattenedThreadIdInGroup
 // CHECK: threadId
 // CHECK: threadId

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/GenerateMipsLinearOddCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: flattenedThreadIdInGroup
 // CHECK: flattenedThreadIdInGroup
 // CHECK: threadId
 // CHECK: threadId

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/GenerateMipsLinearOddXCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: flattenedThreadIdInGroup
 // CHECK: flattenedThreadIdInGroup
 // CHECK: threadId
 // CHECK: threadId

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/GenerateMipsLinearOddYCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: flattenedThreadIdInGroup
 // CHECK: flattenedThreadIdInGroup
 // CHECK: threadId
 // CHECK: threadId

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/MagnifyPixelsPS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: sampleLevel
 // CHECK: sampleLevel
 
 

+ 2 - 2
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/SharpeningUpsampleGammaPS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 -O0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -O0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: sampleLevel
 // CHECK: sampleLevel
 // CHECK: Log
 // CHECK: Log
@@ -19,4 +19,4 @@
 //
 //
 
 
 #define GAMMA_SPACE
 #define GAMMA_SPACE
-#include "SharpeningUpsamplePS.hlsl"
+#include "SharpeningUpsamplePS.hlsl"

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/SharpeningUpsamplePS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 -O0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -O0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: sampleLevel
 // CHECK: sampleLevel
 // CHECK: sampleLevel
 // CHECK: sampleLevel

+ 2 - 2
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/TemporalBlendCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: threadId
 // CHECK: threadId
 // CHECK: textureLoad
 // CHECK: textureLoad
@@ -80,4 +80,4 @@ void main( uint3 Gid : SV_GroupID, uint GI : SV_GroupIndex, uint3 GTid : SV_Grou
 
 
 	DstColor[st] = displayColor;
 	DstColor[st] = displayColor;
 	TemporalOut[st] = savedColor;
 	TemporalOut[st] = savedColor;
-}
+}

+ 2 - 2
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/ToneMap2CS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: threadId
 // CHECK: threadId
 // CHECK: textureLoad
 // CHECK: textureLoad
@@ -21,4 +21,4 @@
 //
 //
 
 
 #define PRESERVE_HUE 1
 #define PRESERVE_HUE 1
-#include "ToneMapCS.hlsl"
+#include "ToneMapCS.hlsl"

+ 1 - 1
tools/clang/test/CodeGenHLSL/Samples/MiniEngine/ToneMapCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: threadId
 // CHECK: threadId
 
 

+ 1 - 1
tools/clang/test/CodeGenSPIRV/binary-op.comma.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T ps_6_0 -E main
+// RUN: %dxc -T ps_6_0 -HV 2018 -E main
 
 
 void foo() { int x = 1; }
 void foo() { int x = 1; }
 
 

+ 1 - 1
tools/clang/test/CodeGenSPIRV/binary-op.logical-and.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T ps_6_0 -E main
+// RUN: %dxc -T ps_6_0 -HV 2018 -E main
 
 
 void main() {
 void main() {
 // CHECK-LABEL: %bb_entry = OpLabel
 // CHECK-LABEL: %bb_entry = OpLabel

+ 1 - 1
tools/clang/test/CodeGenSPIRV/binary-op.logical-or.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T ps_6_0 -E main
+// RUN: %dxc -T ps_6_0 -HV 2018 -E main
 
 
 void main() {
 void main() {
 // CHECK-LABEL: %bb_entry = OpLabel
 // CHECK-LABEL: %bb_entry = OpLabel

+ 1 - 1
tools/clang/test/CodeGenSPIRV/cast.flat-conversion.struct-to-struct.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T cs_6_0 -E main
+// RUN: %dxc -T cs_6_0 -HV 2018 -E main
 
 
 // Processing FlatConversion when source and destination
 // Processing FlatConversion when source and destination
 // are both structures with identical members.
 // are both structures with identical members.

+ 1 - 1
tools/clang/test/CodeGenSPIRV/cast.literal-type.ternary.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T ps_6_0 -E main
+// RUN: %dxc -T ps_6_0 -HV 2018 -E main
 
 
 // The 'out' argument in the function should be handled correctly when deducing
 // The 'out' argument in the function should be handled correctly when deducing
 // the literal type.
 // the literal type.

+ 1 - 1
tools/clang/test/CodeGenSPIRV/cf.cond-op.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T ps_6_0 -E main
+// RUN: %dxc -T ps_6_0 -HV 2018 -E main
 
 
 // TODO: write to global variable
 // TODO: write to global variable
 bool fn() { return true; }
 bool fn() { return true; }

+ 1 - 1
tools/clang/test/CodeGenSPIRV/cf.logical-and.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T ps_6_0 -E main
+// RUN: %dxc -T ps_6_0 -HV 2018 -E main
 
 
 // TODO: write to global variable
 // TODO: write to global variable
 bool fn() { return true; }
 bool fn() { return true; }

+ 1 - 1
tools/clang/test/CodeGenSPIRV/cf.logical-or.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T ps_6_0 -E main
+// RUN: %dxc -T ps_6_0 -HV 2018 -E main
 
 
 // TODO: write to global variable
 // TODO: write to global variable
 bool fn() { return true; }
 bool fn() { return true; }

+ 1 - 1
tools/clang/test/CodeGenSPIRV/decoration.relaxed-precision.bool.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T cs_6_0 -E main
+// RUN: %dxc -T cs_6_0 -HV 2018 -E main
 
 
 // According to the SPIR-V spec (2.14. Relaxed Precision):
 // According to the SPIR-V spec (2.14. Relaxed Precision):
 // The RelaxedPrecision decoration can be applied to:
 // The RelaxedPrecision decoration can be applied to:

+ 1 - 1
tools/clang/test/CodeGenSPIRV/literal.constant-composite.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T ps_6_0 -E main
+// RUN: %dxc -T ps_6_0 -HV 2018 -E main
 
 
 float func(float3 i) { return i.x; }
 float func(float3 i) { return i.x; }
 
 

+ 1 - 1
tools/clang/test/CodeGenSPIRV/literal.vec-times-scalar.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T ps_6_0 -E main
+// RUN: %dxc -T ps_6_0 -HV 2018 -E main
 
 
 float func(float3 i) { return i.x; }
 float func(float3 i) { return i.x; }
 
 

+ 1 - 1
tools/clang/test/CodeGenSPIRV/shader.debug.line.branch.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T ps_6_0 -E main -fspv-debug=vulkan
+// RUN: %dxc -T ps_6_0 -HV 2018 -E main -fspv-debug=vulkan
 
 
 // CHECK:      [[file:%\d+]] = OpString
 // CHECK:      [[file:%\d+]] = OpString
 // CHECK:      [[dbgsrc:%\d+]] = OpExtInst %void %1 DebugSource [[file]]
 // CHECK:      [[dbgsrc:%\d+]] = OpExtInst %void %1 DebugSource [[file]]

+ 1 - 1
tools/clang/test/CodeGenSPIRV/shader.debug.line.operators.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T ps_6_0 -E main -fspv-debug=vulkan -no-warnings
+// RUN: %dxc -T ps_6_0 -HV 2018 -E main -fspv-debug=vulkan -no-warnings
 
 
 // CHECK:      [[file:%\d+]] = OpString
 // CHECK:      [[file:%\d+]] = OpString
 // CHECK:      [[src:%\d+]] = OpExtInst %void %1 DebugSource [[file]]
 // CHECK:      [[src:%\d+]] = OpExtInst %void %1 DebugSource [[file]]

+ 1 - 1
tools/clang/test/CodeGenSPIRV/sm6.quad-read-across-diagonal.vulkan1.2.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T cs_6_0 -E main -fspv-target-env=vulkan1.2
+// RUN: %dxc -T cs_6_0 -E main -HV 2018 -fspv-target-env=vulkan1.2
 
 
 // CHECK: ; Version: 1.5
 // CHECK: ; Version: 1.5
 
 

+ 1 - 1
tools/clang/test/CodeGenSPIRV/sm6.wave-active-all-equal.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T cs_6_0 -E main -fspv-target-env=vulkan1.1
+// RUN: %dxc -T cs_6_0 -HV 2018 -E main -fspv-target-env=vulkan1.1
 
 
 // CHECK: ; Version: 1.3
 // CHECK: ; Version: 1.3
 
 

+ 1 - 1
tools/clang/test/CodeGenSPIRV/sm6.wave-active-all-equal.vulkan1.2.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T cs_6_0 -E main -fspv-target-env=vulkan1.2
+// RUN: %dxc -T cs_6_0 -E main -HV 2018 -fspv-target-env=vulkan1.2
 
 
 // CHECK: ; Version: 1.5
 // CHECK: ; Version: 1.5
 
 

+ 1 - 1
tools/clang/test/CodeGenSPIRV/spirv.debug.opline.branch.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T ps_6_0 -E main -Zi
+// RUN: %dxc -T ps_6_0 -HV 2018 -E main -Zi
 
 
 // CHECK:      [[file:%\d+]] = OpString
 // CHECK:      [[file:%\d+]] = OpString
 // CHECK-SAME: spirv.debug.opline.branch.hlsl
 // CHECK-SAME: spirv.debug.opline.branch.hlsl

+ 1 - 1
tools/clang/test/CodeGenSPIRV/spirv.debug.opline.operators.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T ps_6_0 -E main -Zi
+// RUN: %dxc -T ps_6_0 -HV 2018 -E main -Zi
 
 
 // CHECK:      [[file:%\d+]] = OpString
 // CHECK:      [[file:%\d+]] = OpString
 // CHECK-SAME: spirv.debug.opline.operators.hlsl
 // CHECK-SAME: spirv.debug.opline.operators.hlsl

+ 1 - 1
tools/clang/test/CodeGenSPIRV/ternary-op.cond-op.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T ps_6_0 -E main
+// RUN: %dxc -T ps_6_0 -HV 2018 -E main
 
 
 // CHECK: [[v3i0:%\d+]] = OpConstantComposite %v3int %int_0 %int_0 %int_0
 // CHECK: [[v3i0:%\d+]] = OpConstantComposite %v3int %int_0 %int_0 %int_0
 SamplerState gSS1;
 SamplerState gSS1;

+ 1 - 1
tools/clang/test/CodeGenSPIRV/vk.layout.cbuffer.boolean.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T ps_6_0 -E main
+// RUN: %dxc -T ps_6_0 -HV 2018 -E main
 
 
 // CHECK: OpDecorate %_arr_v3uint_uint_2 ArrayStride 16
 // CHECK: OpDecorate %_arr_v3uint_uint_2 ArrayStride 16
 // CHECK: OpMemberDecorate %FrameConstants 0 Offset 0
 // CHECK: OpMemberDecorate %FrameConstants 0 Offset 0

+ 1 - 1
tools/clang/test/CodeGenSPIRV/vk.spec-constant.reuse.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T ps_6_0 -E main
+// RUN: %dxc -T ps_6_0 -HV 2018 -E main
 
 
 // CHECK: OpDecorate %y SpecId 0
 // CHECK: OpDecorate %y SpecId 0
 [[vk::constant_id(0)]] const bool y = false;
 [[vk::constant_id(0)]] const bool y = false;

+ 2 - 2
tools/clang/test/HLSL/attributes.hlsl

@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -ffreestanding -verify %s
+// RUN: %clang_cc1 -fsyntax-only -ffreestanding -HV 2018 -verify %s
 
 
 // To test with the classic compiler, run
 // To test with the classic compiler, run
 // %sdxroot%\tools\x86\fxc.exe /T ps_5_1 attributes.hlsl
 // %sdxroot%\tools\x86\fxc.exe /T ps_5_1 attributes.hlsl
@@ -934,4 +934,4 @@ bool Test_Unknown() {
   [unknown] bool b1 = false;                  /* expected-warning {{unknown attribute 'unknown' ignored}} fxc-pass {{}} */
   [unknown] bool b1 = false;                  /* expected-warning {{unknown attribute 'unknown' ignored}} fxc-pass {{}} */
   [unknown(1)] bool b2 = false;               /* expected-warning {{unknown attribute 'unknown' ignored}} fxc-pass {{}} */
   [unknown(1)] bool b2 = false;               /* expected-warning {{unknown attribute 'unknown' ignored}} fxc-pass {{}} */
   [unknown(1)] while (g_bool) return g_bool;  /* expected-warning {{unknown attribute 'unknown' ignored}} fxc-pass {{}} */
   [unknown(1)] while (g_bool) return g_bool;  /* expected-warning {{unknown attribute 'unknown' ignored}} fxc-pass {{}} */
-}
+}

+ 2 - 2
tools/clang/test/HLSL/conversions-between-type-shapes.hlsl

@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -Wno-unused-value -fsyntax-only -ffreestanding -verify -verify-ignore-unexpected=note %s
+// RUN: %clang_cc1 -Wno-unused-value -fsyntax-only -ffreestanding -verify -verify-ignore-unexpected=note -HV 2018 %s
 
 
 // Tests all implicit conversions and explicit casts between type shapes
 // Tests all implicit conversions and explicit casts between type shapes
 // (scalars, vectors, matrices, arrays and structs).
 // (scalars, vectors, matrices, arrays and structs).
@@ -312,4 +312,4 @@ void main()
     (S5)m2x2;                                               /* expected-error {{cannot convert from 'int2x2' to 'S5'}} fxc-error {{X3017: cannot convert from 'int2x2' to 'struct S5'}} */
     (S5)m2x2;                                               /* expected-error {{cannot convert from 'int2x2' to 'S5'}} fxc-error {{X3017: cannot convert from 'int2x2' to 'struct S5'}} */
     (S4)a2;                                                 /* expected-error {{cannot convert from 'A2' (aka 'int [2]') to 'S4'}} fxc-error {{X3017: cannot convert from 'typedef int[2]' to 'struct S4'}} */
     (S4)a2;                                                 /* expected-error {{cannot convert from 'A2' (aka 'int [2]') to 'S4'}} fxc-error {{X3017: cannot convert from 'typedef int[2]' to 'struct S4'}} */
     (S4)s2;                                                 /* expected-error {{cannot convert from 'S2' to 'S4'}} fxc-error {{X3017: cannot convert from 'struct S2' to 'struct S4'}} */
     (S4)s2;                                                 /* expected-error {{cannot convert from 'S2' to 'S4'}} fxc-error {{X3017: cannot convert from 'struct S2' to 'struct S4'}} */
-}
+}

+ 1 - 1
tools/clang/test/HLSL/cpp-errors.hlsl

@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -Wno-unused-value -ffreestanding -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wno-unused-value -ffreestanding -HV 2018 -verify %s
 
 
 float f_arr_empty_init[] = { 1, 2, 3 };
 float f_arr_empty_init[] = { 1, 2, 3 };
 float f_arr_empty_pack[] = { 1, 2 ... }; // expected-error {{expansion is unsupported in HLSL}}
 float f_arr_empty_pack[] = { 1, 2 ... }; // expected-error {{expansion is unsupported in HLSL}}

+ 1 - 1
tools/clang/test/HLSL/functions.hlsl

@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -Wno-unused-value -ffreestanding -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wno-unused-value -ffreestanding -HV 2018 -verify %s
 
 
 // __decltype is the GCC way of saying 'decltype', but doesn't require C++11
 // __decltype is the GCC way of saying 'decltype', but doesn't require C++11
 // _Static_assert is the C11 way of saying 'static_assert', but doesn't require C++11
 // _Static_assert is the C11 way of saying 'static_assert', but doesn't require C++11

+ 1 - 1
tools/clang/test/HLSL/implicit-casts.hlsl

@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -Wno-unused-value -fsyntax-only -ffreestanding -verify %s
+// RUN: %clang_cc1 -Wno-unused-value -fsyntax-only -ffreestanding -HV 2018 -verify %s
 
 
 // To test with the classic compiler, run
 // To test with the classic compiler, run
 // %sdxroot%\tools\x86\fxc.exe /T ps_5_1 implicit-casts.hlsl
 // %sdxroot%\tools\x86\fxc.exe /T ps_5_1 implicit-casts.hlsl

+ 1 - 1
tools/clang/test/HLSL/vector-conditional.hlsl

@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -ffreestanding -verify %s
+// RUN: %clang_cc1 -fsyntax-only -ffreestanding -verify -HV 2018 %s
 
 
 // Disable validation on fxc (/Vd) because
 // Disable validation on fxc (/Vd) because
 // non-literal ternary with objects results in bad code.
 // non-literal ternary with objects results in bad code.

+ 2 - 2
tools/clang/test/HLSLFileCheck/hlsl/classes/mismatch_class_implicit_cast.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -HV 2018 %s | FileCheck %s
 // RUN: %dxc -E main -T ps_6_0 -HV 2021 %s | FileCheck %s -check-prefix=ERROR
 // RUN: %dxc -E main -T ps_6_0 -HV 2021 %s | FileCheck %s -check-prefix=ERROR
 
 
 // CHECK: define void @main()
 // CHECK: define void @main()
@@ -30,4 +30,4 @@ A g_dnc;
 float4  main() : SV_Target {
 float4  main() : SV_Target {
   A dnc = g_dnc;
   A dnc = g_dnc;
   return badCall(dnc);
   return badCall(dnc);
-}
+}

+ 1 - 1
tools/clang/test/HLSLFileCheck/hlsl/compile_options/enable_templates.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 %s | FileCheck -check-prefix=DISABLED %s
+// RUN: %dxc -E main -T ps_6_0 -HV 2018 %s | FileCheck -check-prefix=DISABLED %s
 // RUN: %dxc -E main -T ps_6_0 -HV 2021 %s | FileCheck -check-prefix=ENABLED %s
 // RUN: %dxc -E main -T ps_6_0 -HV 2021 %s | FileCheck -check-prefix=ENABLED %s
 
 
 // DISABLED: error: 'template' is a reserved keyword in HLSL
 // DISABLED: error: 'template' is a reserved keyword in HLSL

+ 1 - 1
tools/clang/test/HLSLFileCheck/hlsl/control_flow/attributes/unroll/big_step_non_trivial.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -Od -E main -T ps_6_0 %s | FileCheck %s
+// RUN: %dxc -Od -E main -T ps_6_0 -HV 2018 %s | FileCheck %s
 // CHECK: @main
 // CHECK: @main
 
 
 // CHECK: @dx.op.unary.f32(i32 13
 // CHECK: @dx.op.unary.f32(i32 13

+ 1 - 1
tools/clang/test/HLSLFileCheck/hlsl/control_flow/attributes/unroll/partial_cond.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -Od -E main -T ps_6_0 %s | FileCheck %s
+// RUN: %dxc -Od -E main -T ps_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: call float @dx.op.dot3
 // CHECK: call float @dx.op.dot3
 // CHECK: call float @dx.op.dot3
 // CHECK: call float @dx.op.dot3

+ 1 - 1
tools/clang/test/HLSLFileCheck/hlsl/control_flow/if_else/if8.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECKNOT: bitcast
 // CHECKNOT: bitcast
 // CHECKNOT: i64 2
 // CHECKNOT: i64 2

+ 1 - 1
tools/clang/test/HLSLFileCheck/hlsl/control_flow/if_else/logical_no_short_circuiting.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T vs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T vs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // HLSL's logical operators are not short-circuiting.
 // HLSL's logical operators are not short-circuiting.
 // Test that the right-hand side is always executed.
 // Test that the right-hand side is always executed.

+ 1 - 1
tools/clang/test/HLSLFileCheck/hlsl/control_flow/if_else/ternary_conditional_to_select.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_2 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_2 -HV 2018 %s | FileCheck %s
 
 
 // Make sure no branch.
 // Make sure no branch.
 // CHECK-NOT:br i1
 // CHECK-NOT:br i1

+ 1 - 1
tools/clang/test/HLSLFileCheck/hlsl/control_flow/if_else/vector_comparison.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: fcmp
 // CHECK: fcmp
 // CHECK: fcmp
 // CHECK: fcmp

+ 2 - 2
tools/clang/test/HLSLFileCheck/hlsl/diagnostics/warnings/using.hlsl

@@ -1,6 +1,6 @@
 // RUN: %dxc -E main -T ps_6_0 %s -HV 2021  | FileCheck -check-prefix=HV2021 %s
 // RUN: %dxc -E main -T ps_6_0 %s -HV 2021  | FileCheck -check-prefix=HV2021 %s
 
 
-// RUN: %dxc -E main -T ps_6_0 %s  | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 %s -HV 2018 | FileCheck %s
 
 
 // CHECK:using.hlsl:14:5: warning: keyword 'using' is a HLSL 2021 feature, and is available in older versions as a non-portable extension.
 // CHECK:using.hlsl:14:5: warning: keyword 'using' is a HLSL 2021 feature, and is available in older versions as a non-portable extension.
 // CHECK:using.hlsl:21:1: warning: keyword 'using' is a HLSL 2021 feature, and is available in older versions as a non-portable extension.
 // CHECK:using.hlsl:21:1: warning: keyword 'using' is a HLSL 2021 feature, and is available in older versions as a non-portable extension.
@@ -27,4 +27,4 @@ using n2::foo;
 f32 main(f32 a:A) : SV_Target {
 f32 main(f32 a:A) : SV_Target {
 
 
   f32 r = foo(a);
   f32 r = foo(a);
-}
+}

+ 1 - 1
tools/clang/test/HLSLFileCheck/hlsl/functions/arguments/outputArray.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T vs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T vs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: switch
 // CHECK: switch
 
 

+ 1 - 1
tools/clang/test/HLSLFileCheck/hlsl/intrinsics/boolean/all_lit.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: @main
 // CHECK: @main
 uint4 a;
 uint4 a;

+ 1 - 1
tools/clang/test/HLSLFileCheck/hlsl/intrinsics/wave/reduction/WaveBreakAndUnrollCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -T cs_6_0 -Od %s | FileCheck %s
+// RUN: %dxc -T cs_6_0 -Od -HV 2018 %s | FileCheck %s
 // A test of explicit loop unrolling on a loop that uses a wave op in a break block
 // A test of explicit loop unrolling on a loop that uses a wave op in a break block
 
 
 // CHECK: void @main
 // CHECK: void @main

+ 2 - 2
tools/clang/test/HLSLFileCheck/hlsl/operators/binary/arithmetic.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T vs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T vs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // Tests the implementation of unary and binary matrix operators
 // Tests the implementation of unary and binary matrix operators
 
 
@@ -128,4 +128,4 @@ void main()
     Append(output_b, fm0_5 == f1_5); // EQ
     Append(output_b, fm0_5 == f1_5); // EQ
     // CHECK: i32 1, i32 undef
     // CHECK: i32 1, i32 undef
     Append(output_b, fm0_5 != f1_5); // NE
     Append(output_b, fm0_5 != f1_5); // NE
-}
+}

+ 2 - 2
tools/clang/test/HLSLFileCheck/hlsl/operators/binary/vector_arithmetic.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T vs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T vs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // Tests the implementation of unary and binary matrix operators
 // Tests the implementation of unary and binary matrix operators
 
 
@@ -125,4 +125,4 @@ void main()
     output_b.Append(fm0_5 == f1_5); // EQ
     output_b.Append(fm0_5 == f1_5); // EQ
     // CHECK: i32 1, i32 undef
     // CHECK: i32 1, i32 undef
     output_b.Append(fm0_5 != f1_5); // NE
     output_b.Append(fm0_5 != f1_5); // NE
-}
+}

+ 1 - 1
tools/clang/test/HLSLFileCheck/hlsl/operators/select/sel_vec1_mixed.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T vs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T vs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // Make sure 1-component vector in conditional compiles
 // Make sure 1-component vector in conditional compiles
 // CHECK: = select i1
 // CHECK: = select i1

+ 2 - 2
tools/clang/test/HLSLFileCheck/hlsl/types/boolean/const_init_list_no_crash.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T vs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T vs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // Regression test for bools in constant initialization lists crashing
 // Regression test for bools in constant initialization lists crashing
 // due to a mismatch between register and memory representations (GitHub #1880, #1881)
 // due to a mismatch between register and memory representations (GitHub #1880, #1881)
@@ -36,4 +36,4 @@ bool main() : OUT
         && ab[0] && av[0].x && am[0]._11
         && ab[0] && av[0].x && am[0]._11
         && sb.x && sv.x && sm.x._11
         && sb.x && sv.x && sm.x._11
         && ab_b[0] && ab_v[0] && ab_m[0] && ab_a[0] && ab_s[0];
         && ab_b[0] && ab_v[0] && ab_m[0] && ab_a[0] && ab_s[0];
-}
+}

+ 2 - 2
tools/clang/test/HLSLFileCheck/hlsl/types/cast/StructCast.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T vs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T vs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: SV_RenderTargetArrayIndex or SV_ViewportArrayIndex from any shader feeding rasterizer
 // CHECK: SV_RenderTargetArrayIndex or SV_ViewportArrayIndex from any shader feeding rasterizer
 
 
@@ -45,4 +45,4 @@ Interpolants main(  Vertex In)
   else if (i > -1)
   else if (i > -1)
      return (Interpolants )c2;
      return (Interpolants )c2;
   return In;
   return In;
-}
+}

+ 1 - 1
tools/clang/test/HLSLFileCheck/hlsl/types/cast/bool_cast_initializer_syntax_test.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc /T ps_6_0 /E main %s | FileCheck %s
+// RUN: %dxc /T ps_6_0 /E main -HV 2018 %s | FileCheck %s
 
 
 // Ensure that when casting to bool, we never use fptoui or fptosi instruction
 // Ensure that when casting to bool, we never use fptoui or fptosi instruction
 // CHECK-NOT: fptoui
 // CHECK-NOT: fptoui

+ 2 - 2
tools/clang/test/HLSLFileCheck/hlsl/types/cast/identical_layout_structs/explicit_cast_as_out_param.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc /Tvs_6_0 /Emain %s | FileCheck %s
+// RUN: %dxc /Tvs_6_0 /Emain -HV 2018 %s | FileCheck %s
 // Test explicit cast between structs of identical layout where
 // Test explicit cast between structs of identical layout where
 // the destination struct is marked as out param.
 // the destination struct is marked as out param.
 
 
@@ -147,4 +147,4 @@ void main(out VSOut o1 : A, out VSOut o2 : B)
    input.f7 = true;
    input.f7 = true;
    o1 = input;
    o1 = input;
    o2 = (VSOut)input;
    o2 = (VSOut)input;
-}
+}

+ 2 - 2
tools/clang/test/HLSLFileCheck/hlsl/types/cast/identical_layout_structs/implicit_cast_as_func_param_user_scenario.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -HV 2018 %s | FileCheck %s
 // github issue #1725
 // github issue #1725
 // Test implicit cast scenario between structs of identical layout
 // Test implicit cast scenario between structs of identical layout
 // which would crash as reported by a user.
 // which would crash as reported by a user.
@@ -51,4 +51,4 @@ BUFF main(VSOUT_D input)
     foo(input.standard.position);        // comment out and it will compile fine
     foo(input.standard.position);        // comment out and it will compile fine
     float3 N = getNormal( input.standard ); // comment this out and it will compile fine    
     float3 N = getNormal( input.standard ); // comment this out and it will compile fine    
     return (BUFF)0;
     return (BUFF)0;
-}
+}

+ 2 - 2
tools/clang/test/HLSLFileCheck/hlsl/types/cast/identical_layout_structs/implicit_cast_as_streamout_append.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc /Tgs_6_0 /Emain %s | FileCheck %s
+// RUN: %dxc /Tgs_6_0 /Emain -HV 2018 %s | FileCheck %s
 // github issue #1560
 // github issue #1560
 
 
 // CHECK: main
 // CHECK: main
@@ -59,4 +59,4 @@ void main(inout TriangleStream<GSOutPSIn> stream)
     stream.Append(tri[0]);
     stream.Append(tri[0]);
     stream.Append(tri[1]);
     stream.Append(tri[1]);
     stream.Append(tri[2]);
     stream.Append(tri[2]);
-}
+}

+ 1 - 1
tools/clang/test/HLSLFileCheck/hlsl/types/conversions/between_type_shapes.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T vs_6_0 -no-warnings %s | FileCheck -check-prefix=DXC %s
+// RUN: %dxc -E main -T vs_6_0 -no-warnings -HV 2018 %s | FileCheck -check-prefix=DXC %s
 
 
 // Tests all implicit conversions and explicit casts between type shapes
 // Tests all implicit conversions and explicit casts between type shapes
 // (scalars, vectors, matrices, arrays and structs).
 // (scalars, vectors, matrices, arrays and structs).

+ 2 - 2
tools/clang/test/HLSLFileCheck/hlsl/types/conversions/functions_Mod.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: @main
 // CHECK: @main
 
 
@@ -193,4 +193,4 @@ void main() {
 
 
   fn_float_arr_out(arr2);
   fn_float_arr_out(arr2);
   // arr2 = arr_return();
   // arr2 = arr_return();
-}
+}

+ 2 - 2
tools/clang/test/HLSLFileCheck/hlsl/types/conversions/implicit-casts_Mod.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: @main
 // CHECK: @main
 
 
@@ -914,4 +914,4 @@ bool1 stresstest() {
 float4 main() : SV_Target
 float4 main() : SV_Target
 {
 {
   return test();
   return test();
-}
+}

+ 2 - 2
tools/clang/test/HLSLFileCheck/hlsl/types/matrix/selMat.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: fcmp fast olt
 // CHECK: fcmp fast olt
 // CHECK: 3.000000e+00
 // CHECK: 3.000000e+00
@@ -82,4 +82,4 @@ float4 main(uint4 a : A) : SV_TARGET
   float4x4 x = (x4 < 3)?xa:xb;
   float4x4 x = (x4 < 3)?xa:xb;
   x += (i > 0)?xa:xb;
   x += (i > 0)?xa:xb;
   return x[i];
   return x[i];
-}
+}

+ 2 - 2
tools/clang/test/HLSLFileCheck/hlsl/types/struct/anonymous.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T vs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T vs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // Tests declarations and uses of anonymous structs.
 // Tests declarations and uses of anonymous structs.
 
 
@@ -20,4 +20,4 @@ int main(Outer input : IN) : OUT
     struct { int x; } local = input.field;
     struct { int x; } local = input.field;
     typedefed retval = local;
     typedefed retval = local;
     return retval.x + global.x;
     return retval.x + global.x;
-}
+}

+ 2 - 2
tools/clang/test/HLSLFileCheck/hlsl/types/struct/structArray.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T vs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T vs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: @main
 // CHECK: @main
 struct Vertex
 struct Vertex
@@ -32,4 +32,4 @@ Interpolants main(  Vertex In)
   TA ta = In;
   TA ta = In;
 
 
   return test(ta.ta);
   return test(ta.ta);
-}
+}

+ 1 - 1
tools/clang/test/HLSLFileCheck/samples/MiniEngine/ApplyBloomCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: threadId
 // CHECK: threadId
 // CHECK: dot3
 // CHECK: dot3

+ 1 - 1
tools/clang/test/HLSLFileCheck/samples/MiniEngine/BicubicHorizontalUpsamplePS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: Frc
 // CHECK: Frc
 // CHECK: IMax
 // CHECK: IMax

+ 2 - 2
tools/clang/test/HLSLFileCheck/samples/MiniEngine/BicubicUpsampleGammaPS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 -O0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -O0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: Frc
 // CHECK: Frc
 // CHECK: IMax
 // CHECK: IMax
@@ -22,4 +22,4 @@
 //
 //
 
 
 #define GAMMA_SPACE
 #define GAMMA_SPACE
-#include "BicubicUpsamplePS.hlsl"
+#include "BicubicUpsamplePS.hlsl"

+ 1 - 1
tools/clang/test/HLSLFileCheck/samples/MiniEngine/BicubicUpsamplePS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 -O0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -O0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: Frc
 // CHECK: Frc
 // CHECK: IMax
 // CHECK: IMax

+ 1 - 1
tools/clang/test/HLSLFileCheck/samples/MiniEngine/BicubicVerticalUpsamplePS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: IMax
 // CHECK: IMax
 // CHECK: UMin
 // CHECK: UMin

+ 1 - 1
tools/clang/test/HLSLFileCheck/samples/MiniEngine/BilinearUpsamplePS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T ps_6_0 -O0 %s | FileCheck %s
+// RUN: %dxc -E main -T ps_6_0 -O0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: sampleLevel
 // CHECK: sampleLevel
 // CHECK: Log
 // CHECK: Log

+ 1 - 1
tools/clang/test/HLSLFileCheck/samples/MiniEngine/BloomExtractAndDownsampleHdrCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: sampleLevel
 // CHECK: sampleLevel
 // CHECK: FMax
 // CHECK: FMax

+ 1 - 1
tools/clang/test/HLSLFileCheck/samples/MiniEngine/BloomExtractAndDownsampleLdrCS.hlsl

@@ -1,4 +1,4 @@
-// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T cs_6_0 -HV 2018 %s | FileCheck %s
 
 
 // CHECK: threadId
 // CHECK: threadId
 // CHECK: dot3
 // CHECK: dot3

Some files were not shown because too many files changed in this diff