Forráskód Böngészése

Change hctcmdtests into lit test. (#4921)

* Change hctcmdtests into lit test.
* Let hcttestcmds share file with lit test.
* normalize path for DxilSourceMainFileName.
* Use REQUIRES and UNSUPPORTED for spirv test.
* Merge hlsl version tests.
* Use cmp to compare file.
* Use file -E to check file exist.
* Use cd to test relative path and include
Xiang Li 2 éve
szülő
commit
a65e15b2f2
70 módosított fájl, 565 hozzáadás és 202 törlés
  1. 3 1
      tools/clang/lib/CodeGen/ModuleBuilder.cpp
  2. 0 0
      tools/clang/test/DXC/Inputs/TextRS.hlsli
  3. 0 0
      tools/clang/test/DXC/Inputs/batch_cmds.txt
  4. 0 0
      tools/clang/test/DXC/Inputs/batch_cmds2.txt
  5. 0 0
      tools/clang/test/DXC/Inputs/bom-inc-ascii.hlsli
  6. 0 0
      tools/clang/test/DXC/Inputs/bom-inc-utf16le.hlsli
  7. 0 0
      tools/clang/test/DXC/Inputs/bom-inc-utf8.hlsli
  8. 0 0
      tools/clang/test/DXC/Inputs/bom-main-ascii.hlsl
  9. 0 0
      tools/clang/test/DXC/Inputs/bom-main-utf16le.hlsl
  10. 0 0
      tools/clang/test/DXC/Inputs/bom-main-utf8.hlsl
  11. 1 1
      tools/clang/test/DXC/Inputs/inc/include-declarations.h
  12. 0 0
      tools/clang/test/DXC/Inputs/include/dependency0.h
  13. 0 0
      tools/clang/test/DXC/Inputs/include/dependency1.h
  14. 0 0
      tools/clang/test/DXC/Inputs/include/dependency2.h
  15. 0 0
      tools/clang/test/DXC/Inputs/include/dependency3.h
  16. 0 0
      tools/clang/test/DXC/Inputs/include/dependency4.h
  17. 0 0
      tools/clang/test/DXC/Inputs/include/dependency5.h
  18. 0 0
      tools/clang/test/DXC/Inputs/lib_entries2.hlsl
  19. 0 0
      tools/clang/test/DXC/Inputs/lib_entries3.hlsl
  20. 1 1
      tools/clang/test/DXC/Inputs/lib_inc.hlsl
  21. 1 1
      tools/clang/test/DXC/Inputs/lib_inc0.hlsl
  22. 1 1
      tools/clang/test/DXC/Inputs/lib_inc0_b.hlsl
  23. 1 1
      tools/clang/test/DXC/Inputs/lib_inc1.hlsl
  24. 1 1
      tools/clang/test/DXC/Inputs/lib_inc2.hlsl
  25. 1 1
      tools/clang/test/DXC/Inputs/lib_inc3.hlsl
  26. 1 1
      tools/clang/test/DXC/Inputs/lib_res_match.hlsl
  27. 58 0
      tools/clang/test/DXC/NonUniform.hlsl
  28. 96 0
      tools/clang/test/DXC/PipelineStage.hlsl
  29. 8 1
      tools/clang/test/DXC/TextVS.hlsl
  30. 21 0
      tools/clang/test/DXC/VersionMacro.hlsl
  31. 3 0
      tools/clang/test/DXC/ast_dump.test
  32. 5 0
      tools/clang/test/DXC/basic_smoke.test
  33. 6 0
      tools/clang/test/DXC/batch_compile.test
  34. 31 0
      tools/clang/test/DXC/binding_table.hlsl
  35. 0 0
      tools/clang/test/DXC/binding_table.txt
  36. 7 0
      tools/clang/test/DXC/bom_test.test
  37. 15 0
      tools/clang/test/DXC/denorm.test
  38. 25 0
      tools/clang/test/DXC/dump_dependency.hlsl
  39. 13 0
      tools/clang/test/DXC/embed_dbg.test
  40. 9 0
      tools/clang/test/DXC/enable_16_bits.test
  41. 10 0
      tools/clang/test/DXC/extra_output.test
  42. 8 0
      tools/clang/test/DXC/fd_strip_dbg.test
  43. 7 0
      tools/clang/test/DXC/fd_zs.test
  44. 11 0
      tools/clang/test/DXC/force_root_sig_ver.test
  45. 7 0
      tools/clang/test/DXC/global_rs.hlsl
  46. 14 0
      tools/clang/test/DXC/hlsl_ver.test
  47. 13 0
      tools/clang/test/DXC/include-main.hlsl
  48. 7 0
      tools/clang/test/DXC/local_rs.hlsl
  49. 6 0
      tools/clang/test/DXC/no_spirv.test
  50. 6 0
      tools/clang/test/DXC/preprocess.test
  51. 30 0
      tools/clang/test/DXC/private_data.test
  52. 33 0
      tools/clang/test/DXC/root_sig.test
  53. 7 0
      tools/clang/test/DXC/shader_model_update.test
  54. 7 0
      tools/clang/test/DXC/spirv.test
  55. 19 0
      tools/clang/test/DXC/strip_dbg.test
  56. 6 0
      tools/clang/test/DXC/strip_reflect.test
  57. 7 0
      tools/clang/test/DXC/warning.test
  58. 9 0
      tools/clang/test/lit.cfg
  59. 0 22
      utils/hct/cmdtestfiles/NonUniform.hlsl
  60. 0 21
      utils/hct/cmdtestfiles/PipelineStage.hlsl
  61. 0 1
      utils/hct/cmdtestfiles/VersionMacro.hlsl
  62. 0 22
      utils/hct/cmdtestfiles/binding_table.hlsl
  63. 0 7
      utils/hct/cmdtestfiles/dump_dependency.hlsl
  64. 0 4
      utils/hct/cmdtestfiles/inc2.hlsli
  65. 0 4
      utils/hct/cmdtestfiles/include-main.hlsl
  66. 0 7
      utils/hct/cmdtestfiles/include/inc1.hlsli
  67. 0 17
      utils/hct/cmdtestfiles/lib_entry4.hlsl
  68. 0 15
      utils/hct/cmdtestfiles/lib_res_match.hlsl
  69. 0 22
      utils/hct/cmdtestfiles/smoke.hlsl
  70. 50 50
      utils/hct/hcttestcmds.cmd

+ 3 - 1
tools/clang/lib/CodeGen/ModuleBuilder.cpp

@@ -308,8 +308,10 @@ namespace {
         // Add main file name to debug info
         llvm::NamedMDNode *pSourceFilename = M->getOrInsertNamedMetadata(
             hlsl::DxilMDHelper::kDxilSourceMainFileNameMDName);
+        llvm::SmallString<128> NormalizedPath;
+        llvm::sys::path::native(CodeGenOpts.MainFileName, NormalizedPath);
         llvm::MDTuple *pFileName = llvm::MDNode::get(
-          LLVMCtx, llvm::MDString::get(LLVMCtx, CodeGenOpts.MainFileName));
+            LLVMCtx, llvm::MDString::get(LLVMCtx, NormalizedPath));
         pSourceFilename->addOperand(pFileName);
 
         // Pass in any other arguments to debug info

+ 0 - 0
utils/hct/cmdtestfiles/TextRS.hlsli → tools/clang/test/DXC/Inputs/TextRS.hlsli


+ 0 - 0
utils/hct/cmdtestfiles/batch_cmds.txt → tools/clang/test/DXC/Inputs/batch_cmds.txt


+ 0 - 0
utils/hct/cmdtestfiles/batch_cmds2.txt → tools/clang/test/DXC/Inputs/batch_cmds2.txt


+ 0 - 0
utils/hct/cmdtestfiles/bom-inc-ascii.hlsli → tools/clang/test/DXC/Inputs/bom-inc-ascii.hlsli


+ 0 - 0
utils/hct/cmdtestfiles/bom-inc-utf16le.hlsli → tools/clang/test/DXC/Inputs/bom-inc-utf16le.hlsli


+ 0 - 0
utils/hct/cmdtestfiles/bom-inc-utf8.hlsli → tools/clang/test/DXC/Inputs/bom-inc-utf8.hlsli


+ 0 - 0
utils/hct/cmdtestfiles/bom-main-ascii.hlsl → tools/clang/test/DXC/Inputs/bom-main-ascii.hlsl


+ 0 - 0
utils/hct/cmdtestfiles/bom-main-utf16le.hlsl → tools/clang/test/DXC/Inputs/bom-main-utf16le.hlsl


+ 0 - 0
utils/hct/cmdtestfiles/bom-main-utf8.hlsl → tools/clang/test/DXC/Inputs/bom-main-utf8.hlsl


+ 1 - 1
utils/hct/cmdtestfiles/include-declarations.h → tools/clang/test/DXC/Inputs/inc/include-declarations.h

@@ -1,3 +1,3 @@
 struct foo {
   float4x4 MPV;
-} CB;
+} CB;

+ 0 - 0
utils/hct/cmdtestfiles/include/dependency0.h → tools/clang/test/DXC/Inputs/include/dependency0.h


+ 0 - 0
utils/hct/cmdtestfiles/include/dependency1.h → tools/clang/test/DXC/Inputs/include/dependency1.h


+ 0 - 0
utils/hct/cmdtestfiles/include/dependency2.h → tools/clang/test/DXC/Inputs/include/dependency2.h


+ 0 - 0
utils/hct/cmdtestfiles/include/dependency3.h → tools/clang/test/DXC/Inputs/include/dependency3.h


+ 0 - 0
utils/hct/cmdtestfiles/include/dependency4.h → tools/clang/test/DXC/Inputs/include/dependency4.h


+ 0 - 0
utils/hct/cmdtestfiles/include/dependency5.h → tools/clang/test/DXC/Inputs/include/dependency5.h


+ 0 - 0
utils/hct/cmdtestfiles/lib_entries2.hlsl → tools/clang/test/DXC/Inputs/lib_entries2.hlsl


+ 0 - 0
utils/hct/cmdtestfiles/lib_entries3.hlsl → tools/clang/test/DXC/Inputs/lib_entries3.hlsl


+ 1 - 1
utils/hct/cmdtestfiles/lib_inc.hlsl → tools/clang/test/DXC/Inputs/lib_inc.hlsl

@@ -2,4 +2,4 @@
 
 #include "lib_inc1.hlsl"
 #include "lib_inc2.hlsl"
-#include "lib_inc3.hlsl"
+#include "lib_inc3.hlsl"

+ 1 - 1
utils/hct/cmdtestfiles/lib_inc0.hlsl → tools/clang/test/DXC/Inputs/lib_inc0.hlsl

@@ -2,4 +2,4 @@
 
 cbuffer A {
   float a;
-}
+}

+ 1 - 1
utils/hct/cmdtestfiles/lib_inc0_b.hlsl → tools/clang/test/DXC/Inputs/lib_inc0_b.hlsl

@@ -2,4 +2,4 @@
 
 cbuffer E {
   float e;
-}
+}

+ 1 - 1
utils/hct/cmdtestfiles/lib_inc1.hlsl → tools/clang/test/DXC/Inputs/lib_inc1.hlsl

@@ -13,4 +13,4 @@ cbuffer B {
   float b;
 }
 
-#define M  6
+#define M  6

+ 1 - 1
utils/hct/cmdtestfiles/lib_inc2.hlsl → tools/clang/test/DXC/Inputs/lib_inc2.hlsl

@@ -2,4 +2,4 @@
 
 cbuffer C {
   float c;
-}
+}

+ 1 - 1
utils/hct/cmdtestfiles/lib_inc3.hlsl → tools/clang/test/DXC/Inputs/lib_inc3.hlsl

@@ -2,4 +2,4 @@
 
 cbuffer D {
   float d;
-}
+}

+ 1 - 1
tools/clang/test/DXC/Inputs/lib_res_match.hlsl

@@ -12,4 +12,4 @@ SamplerState	samp;
 
 export float GetV() {
   return v + tex.Load(uint3(a, v, a)).y;
-}
+}

+ 58 - 0
tools/clang/test/DXC/NonUniform.hlsl

@@ -0,0 +1,58 @@
+// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
+
+// CHECK: createHandle
+// CHECK: i1 true)
+
+// CHECK: createHandle
+// CHECK: i1 true)
+
+// CHECK: createHandle
+// CHECK: i1 true)
+
+// RUN: %dxc %s /T ps_6_0 /DDX12 /Fo %t.NonUniform.cso
+// RUN: %dxc %t.NonUniform.cso /dumpbin /Qstrip_rootsignature /Fo %t.NonUniformNoRootSig.cso
+// RUN: cat %t.NonUniformNoRootSig.cso
+// RUN:%dxa  -listparts %t.NonUniformNoRootSig.cso | FileCheck %s --check-prefix=NO_RS
+
+// NO_RS:Part count
+// NO_RS-NOT:RTS0
+
+// RUN: %dxc  %t.NonUniform.cso /dumpbin /extractrootsignature /Fo %t.NonUniformRootSig.cso
+// RUN: cat  %t.NonUniformRootSig.cso
+// RUN:%dxa  -listparts %t.NonUniformRootSig.cso | FileCheck %s --check-prefix=RS_PART
+
+// RS_PART:Part count: 1
+// RS_PART:RTS0
+
+// Verify root signature for NonUniform.cso
+// RUN: %dxc  %t.NonUniform.cso /dumpbin /verifyrootsignature %t.NonUniformRootSig.cso
+// RUN: %dxc  %t.NonUniformNoRootSig.cso /dumpbin /verifyrootsignature %t.NonUniformRootSig.cso
+
+// Verify mismatched root signatures fail verification
+
+// RUN: %dxc %S/Inputs/smoke.hlsl  /D "semantic = SV_Position" /T vs_6_0 /Zi /Qembed_debug /DDX12 /Fo %t.smoke.define.cso
+// RUN: %dxc %t.smoke.define.cso /dumpbin /Qstrip_rootsignature /Fo %t.norootsignature.cso
+// RUN: %dxc %t.smoke.define.cso /dumpbin /extractrootsignature /Fo %t.rootsig.cso
+
+// RUN: not %dxc %t.NonUniformNoRootSig.cso /dumpbin /verifyrootsignature %t.rootsig.cso > %t 2>&1
+// RUN: FileCheck --input-file=%t %s --check-prefix=RS_MISMATCH
+
+// RS_MISMATCH:Shader sampler descriptor range (RegisterSpace=0, NumDescriptors=3, BaseShaderRegister=2) is not fully bound in root signature.
+
+// RUN: not %dxc %t.norootsignature.cso /dumpbin /verifyrootsignature %t.NonUniformRootSig.cso > %t.mismatch2 2>&1
+// RUN: FileCheck --input-file=%t.mismatch2 %s --check-prefix=RS_MISMATCH2
+
+// RS_MISMATCH2:Shader CBV descriptor range (RegisterSpace=0, NumDescriptors=1, BaseShaderRegister=0) is not fully bound in root signature
+
+
+Texture1D<float4> tex[5] : register(t3);
+SamplerState SS[3] : register(s2);
+
+[RootSignature("DescriptorTable(SRV(t3, numDescriptors=5)),\
+                DescriptorTable(Sampler(s2, numDescriptors=3))")]
+float4 main(int i : A, float j : B) : SV_TARGET
+{
+  float4 r = tex[NonUniformResourceIndex(i)].Sample(SS[NonUniformResourceIndex(i)], i);
+  r += tex[NonUniformResourceIndex(j)].Sample(SS[i], j+2);
+  return r;
+}

+ 96 - 0
tools/clang/test/DXC/PipelineStage.hlsl

@@ -0,0 +1,96 @@
+// RUN: %dxc -T vs_6_5 -P -Fi %t.vs_65.hlsl.pp %s
+// RUN: FileCheck --input-file=%t.vs_65.hlsl.pp %s --check-prefix=VS_65
+// VS_65:vs 6 5
+
+// RUN: %dxc -T vs_6_6 -P -Fi %t.vs_66.hlsl.pp %s
+// RUN: FileCheck --input-file=%t.vs_66.hlsl.pp %s --check-prefix=VS_66
+// VS_66:vs 6 6
+
+// RUN: %dxc -T ps_6_5 -P -Fi %t.ps_65.hlsl.pp %s
+// RUN: FileCheck --input-file=%t.ps_65.hlsl.pp %s --check-prefix=PS_65
+// PS_65:ps 6 5
+
+// RUN: %dxc -T ps_6_6 -P -Fi %t.ps_66.hlsl.pp %s
+// RUN: FileCheck --input-file=%t.ps_66.hlsl.pp %s --check-prefix=PS_66
+// PS_66:ps 6 6
+
+// RUN: %dxc -T gs_6_5 -P -Fi %t.gs_65.hlsl.pp %s
+// RUN: FileCheck --input-file=%t.gs_65.hlsl.pp %s --check-prefix=GS_65
+// GS_65:gs 6 5
+
+// RUN: %dxc -T gs_6_6 -P -Fi %t.gs_66.hlsl.pp %s
+// RUN: FileCheck --input-file=%t.gs_66.hlsl.pp %s --check-prefix=GS_66
+// GS_66:gs 6 6
+
+// RUN: %dxc -T hs_6_5 -P -Fi %t.hs_65.hlsl.pp %s
+// RUN: FileCheck --input-file=%t.hs_65.hlsl.pp %s --check-prefix=HS_65
+// HS_65:hs 6 5
+
+// RUN: %dxc -T hs_6_6 -P -Fi %t.hs_66.hlsl.pp %s
+// RUN: FileCheck --input-file=%t.hs_66.hlsl.pp %s --check-prefix=HS_66
+// HS_66:hs 6 6
+
+// RUN: %dxc -T ds_6_5 -P -Fi %t.ds_65.hlsl.pp %s
+// RUN: FileCheck --input-file=%t.ds_65.hlsl.pp %s --check-prefix=DS_65
+// DS_65:ds 6 5
+
+// RUN: %dxc -T ds_6_6 -P -Fi %t.ds_66.hlsl.pp %s
+// RUN: FileCheck --input-file=%t.ds_66.hlsl.pp %s --check-prefix=DS_66
+// DS_66:ds 6 6
+
+// RUN: %dxc -T cs_6_5 -P -Fi %t.cs_65.hlsl.pp %s
+// RUN: FileCheck --input-file=%t.cs_65.hlsl.pp %s --check-prefix=CS_65
+// CS_65:cs 6 5
+
+// RUN: %dxc -T cs_6_6 -P -Fi %t.cs_66.hlsl.pp %s
+// RUN: FileCheck --input-file=%t.cs_66.hlsl.pp %s --check-prefix=CS_66
+// CS_66:cs 6 6
+
+// RUN: %dxc -T lib_6_5 -P -Fi %t.lib_65.hlsl.pp %s
+// RUN: FileCheck --input-file=%t.lib_65.hlsl.pp %s --check-prefix=LIB_65
+// LIB_65:lib 6 5
+
+// RUN: %dxc -T lib_6_6 -P -Fi %t.lib_66.hlsl.pp %s
+// RUN: FileCheck --input-file=%t.lib_66.hlsl.pp %s --check-prefix=LIB_66
+// LIB_66:lib 6 6
+
+// RUN: %dxc -T ms_6_5 -P -Fi %t.ms_65.hlsl.pp %s
+// RUN: FileCheck --input-file=%t.ms_65.hlsl.pp %s --check-prefix=MS_65
+// MS_65:ms 6 5
+
+// RUN: %dxc -T ms_6_6 -P -Fi %t.ms_66.hlsl.pp %s
+// RUN: FileCheck --input-file=%t.ms_66.hlsl.pp %s --check-prefix=MS_66
+// MS_66:ms 6 6
+
+// RUN: %dxc -T as_6_5 -P -Fi %t.as_65.hlsl.pp %s
+// RUN: FileCheck --input-file=%t.as_65.hlsl.pp %s --check-prefix=AS_65
+// AS_65:as 6 5
+
+// RUN: %dxc -T as_6_6 -P -Fi %t.as_66.hlsl.pp %s
+// RUN: FileCheck --input-file=%t.as_66.hlsl.pp %s --check-prefix=AS_66
+// AS_66:as 6 6
+
+
+// VS PS GS HS DS CS LIB MS AS
+
+#if __SHADER_TARGET_STAGE == __SHADER_STAGE_VERTEX
+#define __SHADER_STAGE_PREFIX vs
+#elif __SHADER_TARGET_STAGE == __SHADER_STAGE_PIXEL
+#define __SHADER_STAGE_PREFIX ps
+#elif __SHADER_TARGET_STAGE == __SHADER_STAGE_GEOMETRY
+#define __SHADER_STAGE_PREFIX gs
+#elif __SHADER_TARGET_STAGE == __SHADER_STAGE_HULL
+#define __SHADER_STAGE_PREFIX hs
+#elif __SHADER_TARGET_STAGE == __SHADER_STAGE_DOMAIN
+#define __SHADER_STAGE_PREFIX ds
+#elif __SHADER_TARGET_STAGE == __SHADER_STAGE_COMPUTE
+#define __SHADER_STAGE_PREFIX cs
+#elif __SHADER_TARGET_STAGE == __SHADER_STAGE_AMPLIFICATION
+#define __SHADER_STAGE_PREFIX as
+#elif __SHADER_TARGET_STAGE == __SHADER_STAGE_MESH
+#define __SHADER_STAGE_PREFIX ms
+#elif __SHADER_TARGET_STAGE == __SHADER_STAGE_LIBRARY
+#define __SHADER_STAGE_PREFIX lib
+#endif
+
+__SHADER_STAGE_PREFIX __SHADER_TARGET_MAJOR __SHADER_TARGET_MINOR

+ 8 - 1
utils/hct/cmdtestfiles/TextVS.hlsl → tools/clang/test/DXC/TextVS.hlsl

@@ -1,7 +1,14 @@
-// RUN: %dxc -E main -T vs_6_0 %s | FileCheck %s
+// RUN: %dxc -E main -T vs_6_0 -I %S/Inputs %s | FileCheck %s
 
 // CHECK: SV_VertexID
 
+// RUN: %dxc %s /Tvs_6_0 /Zi /Qembed_debug -I %S/Inputs /Fo %t.TextVS.cso
+
+// RUN: %dxc %S/Inputs/smoke.hlsl /D "semantic = SV_Position" /T vs_6_0 /Zi /Qembed_debug /DDX12 /Fo %t.test.vs.cso
+
+// RUN: %dxc %t.test.vs.cso /dumpbin /verifyrootsignature %t.TextVS.cso
+
+
 //
 // Copyright (c) Microsoft. All rights reserved.
 // This code is licensed under the MIT License (MIT).

+ 21 - 0
tools/clang/test/DXC/VersionMacro.hlsl

@@ -0,0 +1,21 @@
+// RUN: %dxc  -HV 202x %s -P %t.v202x.hlsl.pp
+// RUN: FileCheck --input-file=%t.v202x.hlsl.pp %s --check-prefix=LATEST
+// LATEST: 2029
+
+// RUN: %dxc  -HV 2016 %s -P %t.v2016.hlsl.pp
+// RUN: FileCheck --input-file=%t.v2016.hlsl.pp %s --check-prefix=HV16
+// HV16: 2016
+
+// RUN: %dxc  -HV 2017 %s -P %t.v2017.hlsl.pp
+// RUN: FileCheck --input-file=%t.v2017.hlsl.pp %s --check-prefix=HV17
+// HV17: 2017
+
+// RUN: %dxc  -HV 2018 %s -P %t.v2018.hlsl.pp
+// RUN: FileCheck --input-file=%t.v2018.hlsl.pp %s --check-prefix=HV18
+// HV18: 2018
+
+// RUN: %dxc  -HV 2021 %s -P %t.v2021.hlsl.pp
+// RUN: FileCheck --input-file=%t.v2021.hlsl.pp %s --check-prefix=HV21
+// HV21: 2021
+
+__HLSL_VERSION

+ 3 - 0
tools/clang/test/DXC/ast_dump.test

@@ -0,0 +1,3 @@
+// ast-dump
+// RUN: %dxc /T ps_6_0 %S/Inputs/smoke.hlsl /ast-dump | FileCheck %s --check-prefix=AST
+// AST:TranslationUnitDecl

+ 5 - 0
tools/clang/test/DXC/basic_smoke.test

@@ -0,0 +1,5 @@
+// Basic DXC Smoke Test
+// RUN: %dxc /T ps_6_0 %S/Inputs/smoke.hlsl /Fc %t
+// RUN: FileCheck --input-file=%t %s --check-prefix=FC
+
+// FC:define void @main()

+ 6 - 0
tools/clang/test/DXC/batch_compile.test

@@ -0,0 +1,6 @@
+
+// REQUIRES: system-windows
+
+// RUN: %batch -lib-link -multi-thread %S\Inputs\batch_cmds2.txt
+// RUN: %batch -lib-link -multi-thread %S\Inputs\batch_cmds.txt
+// RUN: %batch  -multi-thread %S\Inputs\batch_cmds.txt

+ 31 - 0
tools/clang/test/DXC/binding_table.hlsl

@@ -0,0 +1,31 @@
+// RUN: %dxc /T ps_6_0 %s -import-binding-table %S/binding_table.txt 
+
+// Make sure the resource table match binding table input.
+// CHECK:; cb                                cbuffer      NA          NA     CB0   cb10,space30     1
+// CHECK:; resource                          cbuffer      NA          NA     CB1  cb42,space999     1
+// CHECK:; samp0                             sampler      NA          NA      S0      s1,space2     1
+// CHECK:; resource                          texture     f32          2d      T0      t1,space2     1
+// CHECK:; uav_0                                 UAV     f32          1d      U0      u1,space2     1
+
+// List of things tested in this:
+//  - Arbitrary capitalization of the headers
+//  - Quotes
+//  - Optional trailing commas
+//  - Arbitrary spaces
+//  - Resources with the same names (but different classes)
+
+cbuffer cb {
+  float a;
+};
+cbuffer resource {
+  float b;
+};
+
+SamplerState samp0;
+Texture2D resource;
+RWTexture1D<float> uav_0;
+
+[RootSignature("CBV(b10,space=30), CBV(b42,space=999), DescriptorTable(Sampler(s1,space=2)), DescriptorTable(SRV(t1,space=2)), DescriptorTable(UAV(u1,space=2))")]
+float main(float2 uv : UV, uint i : I) :SV_Target {
+  return a + b + resource.Sample(samp0, uv).r + uav_0[i];
+}

+ 0 - 0
utils/hct/cmdtestfiles/binding_table.txt → tools/clang/test/DXC/binding_table.txt


+ 7 - 0
tools/clang/test/DXC/bom_test.test

@@ -0,0 +1,7 @@
+// REQUIRES: system-windows
+
+// RUN: %dxc /T ps_6_0 %S/Inputs/bom-main-ascii.hlsl -I Inputs | FileCheck %s
+// RUN: %dxc /T ps_6_0 %S/Inputs/bom-main-utf8.hlsl -I Inputs | FileCheck %s
+// RUN: %dxc /T ps_6_0 %S/Inputs/bom-main-utf16le.hlsl -I Inputs | FileCheck %s
+
+// CHECK:define void @main()

+ 15 - 0
tools/clang/test/DXC/denorm.test

@@ -0,0 +1,15 @@
+// Test for denorm options
+// RUN: %dxc  %S/Inputs/smoke.hlsl /Tps_6_2 /denorm preserve | FileCheck %s
+// CHECK:"fp32-denorm-mode"="preserve"
+// RUN: %dxc  %S/Inputs/smoke.hlsl /Tps_6_2 | FileCheck %s --check-prefix=CLEAN
+// CLEAN:define void @main() 
+// CLEAN-NOT:"fp32-denorm-mode"
+
+// RUN: %dxc  %S/Inputs/smoke.hlsl /Tps_6_2 /denorm ftz | FileCheck %s --check-prefix=FTZ
+// FTZ:"fp32-denorm-mode"="ftz"
+
+// RUN: not %dxc  %S/Inputs/smoke.hlsl /Tps_6_2 /denorm abc 2>&1 | FileCheck %s --check-prefix=UNSUPPORTED
+// UNSUPPORTED:Unsupported value 'abc' for denorm option.
+
+// RUN: not %dxc  %S/Inputs/smoke.hlsl /Tps_6_1 /denorm any 2>&1 | FileCheck %s --check-prefix=SM62
+// SM62:denorm option is only allowed for shader model 6.2 and above.

+ 25 - 0
tools/clang/test/DXC/dump_dependency.hlsl

@@ -0,0 +1,25 @@
+// RUN: %dxc /T ps_6_0 %s -I %S/Inputs /M | FileCheck %s
+
+// RUN: %dxc /T ps_6_0 %s -I %S/Inputs /MF%t.deps
+// RUN: FileCheck --input-file=%t.deps %s
+
+// RUN: %dxc /T ps_6_0 %s -I %S/Inputs /MD
+// RUN: FileCheck --input-file=%S/dump_dependency.d %s
+
+// CHECK-DAG:dependency0.h
+// CHECK-DAG:dependency1.h
+// CHECK-DAG:dependency2.h
+// CHECK-DAG:dependency3.h
+// CHECK-DAG:dependency4.h
+// CHECK-DAG:dependency5.h
+
+// RUN: rm %S/dump_dependency.d
+
+
+#include "include/dependency0.h"
+#include "include/dependency2.h"
+
+float4 main() : SV_Target
+{
+  return 0;
+}

+ 13 - 0
tools/clang/test/DXC/embed_dbg.test

@@ -0,0 +1,13 @@
+// Embed debug info
+// RUN: %dxc /T ps_6_0 %S/Inputs/smoke.hlsl /Zi /Qembed_debug /Fo %t.embedpdb
+// RUN: %dxc -dumpbin %t.embedpdb | FileCheck  %s --check-prefix=EMBED_PDB
+// RUN: not file -E *.pdb
+
+// Auto-embed debug info when no debug output, and expect warning signifying that this is the case.
+// RUN: %dxc /T ps_6_0 %S/Inputs/smoke.hlsl  /Zi /Fo %t.embedpdb2 /Fe %t.err.embedpdb
+// RUN: FileCheck --input-file=%t.err.embedpdb %s --check-prefix=ERR_EMBED_PDB
+// ERR_EMBED_PDB:warning: no output provided for debug - embedding PDB in shader container.  Use -Qembed_debug to silence this warning.
+
+// RUN: %dxc -dumpbin %t.embedpdb2 | FileCheck  %s --check-prefix=EMBED_PDB
+// EMBED_PDB:shader debug name: {{[0-9a-z]+}}.pdb
+// EMBED_PDB:DICompileUnit

+ 9 - 0
tools/clang/test/DXC/enable_16_bits.test

@@ -0,0 +1,9 @@
+// Test /enable-16bit-types option
+// RUN: %dxc  %S/Inputs/smoke.hlsl /Tps_6_2 /enable-16bit-types
+
+// RUN: not %dxc  %S/Inputs/smoke.hlsl /Tps_6_1 /enable-16bit-types > %t.ps61 2>&1 
+// RUN: FileCheck --input-file=%t.ps61 %s
+// RUN: not %dxc  %S/Inputs/smoke.hlsl /Tps_6_2 /enable-16bit-types /HV 2017 > %t 2>&1
+// RUN: FileCheck --input-file=%t %s
+
+// CHECK:enable-16bit-types is only allowed for shader model >= 6.2 and HLSL Language >= 2018

+ 10 - 0
tools/clang/test/DXC/extra_output.test

@@ -0,0 +1,10 @@
+// Test extra DXC outputs together
+// RUN: %dxc /T ps_6_0 %S/Inputs/smoke.hlsl /DDX12 /Dcheck_warning /Fh %t.h /Vn g_myvar /Fc %t.ll /Fo %t.cso /Fre %t.reflection /Frs %t.rootsig /Fe %t.err
+// RUN: FileCheck --input-file=%t.h %s --check-prefix=HEADER
+// RUN: FileCheck --input-file=%t.ll %s --check-prefix=IR
+
+// HEADER:define void @main()
+// HEADER:g_myvar
+// HEADER:0x44, 0x58
+
+// IR:define void @main()

+ 8 - 0
tools/clang/test/DXC/fd_strip_dbg.test

@@ -0,0 +1,8 @@
+// /Fd implies /Qstrip_debug
+// RUN: %dxc /T ps_6_0 %S/Inputs/smoke.hlsl /Zi /Fd %t.fd /Fo %t.dxo
+// RUN:FileCheck --input-file=%t.fd %s --check-prefix=FD | %dxc -dumpbin %t.dxo | FileCheck %s --check-prefix=FO
+
+// Make sure FD not empty.
+// FD:{{.+}}
+// FO:shader debug name: {{.*}}fd_strip_dbg.test.tmp.fd
+// FO-not:DICompileUnit

+ 7 - 0
tools/clang/test/DXC/fd_zs.test

@@ -0,0 +1,7 @@
+// /Fd plus /Zs
+// RUN: %dxc /T ps_6_0 %S/Inputs/smoke.hlsl /Zs /Fd %t.pdb /Fo %t.dxo_fd
+// RUN:FileCheck --input-file=%t.pdb %s --check-prefix=PDB
+// Make sure PDB not empty.
+// PDB:{{.+}}
+// RUN:FileCheck --input-file=%t.dxo_fd %s --check-prefix=FD_FO
+// FD_FO:{{.+}}

+ 11 - 0
tools/clang/test/DXC/force_root_sig_ver.test

@@ -0,0 +1,11 @@
+
+// force_rootsig_ver
+// RUN: %dxc /T ps_6_0 %S/Inputs/smoke.hlsl -force_rootsig_ver rootsig_1_0 | FileCheck %s --check-prefix=IR
+// RUN: %dxc /T ps_6_0 %S/Inputs/smoke.hlsl -force_rootsig_ver rootsig_1_1 | FileCheck %s --check-prefix=IR
+// RUN: not %dxc /T ps_6_0 %S/Inputs/smoke.hlsl -force_rootsig_ver rootsig_2_0 > %t 2>&1
+// RUN: FileCheck --input-file=%t %s
+
+// CHECK:Unsupported value 'rootsig_2_0' for root signature profile
+
+// IR:define void @main()
+// IR:!{!"ps", i32 6, i32 0}

+ 7 - 0
tools/clang/test/DXC/global_rs.hlsl

@@ -0,0 +1,7 @@
+// RUN:%dxc -T rootsig_1_1 %s -rootsig-define main -Fo %t
+// RUN:%dxa  -listparts %t | FileCheck %s
+
+#define main "CBV(b0)"
+
+// CHECK:Part count: 1
+// CHECK:#0 - RTS0

+ 14 - 0
tools/clang/test/DXC/hlsl_ver.test

@@ -0,0 +1,14 @@
+// HLSL Version
+// RUN: %dxc /T ps_6_0 %S/Inputs/smoke.hlsl  /HV 2016
+// RUN: not %dxc /T ps_6_0 %S/Inputs/smoke.hlsl  /HV 2015 > %t 2>&1
+// RUN: FileCheck --input-file=%t %s
+// CHECK:HLSL Version 2015 is only supported for language services
+
+// dxc.exe shader model version promtion warning
+// RUN: %dxc  %S/Inputs/smoke.hlsl /Emain /Tps_5_0 2>%t.version.err
+// RUN: FileCheck --input-file=%t.version.err %s --check-prefix=VERSION_WARNING
+
+// RUN: %dxc  %S/Inputs/smoke.hlsl /Emain /Tps_5_1 2>%t.version2.err
+// RUN: FileCheck --input-file=%t.version2.err %s --check-prefix=VERSION_WARNING
+
+// VERSION_WARNING:warning: Promoting older shader model profile to 6.0 version

+ 13 - 0
tools/clang/test/DXC/include-main.hlsl

@@ -0,0 +1,13 @@
+// Test display include process with /Vi
+// RUN: %dxc -T ps_6_0 -Vi -I %S/Inputs/inc %s | FileCheck %s --check-prefix=VI
+
+// Test file with relative path and include
+// RUN: cd %T && %dxc -T ps_6_0 -Vi -I %S/Inputs/inc %s | FileCheck %s --check-prefix=VI
+
+// VI:; Opening file [
+// VI-SAME:inc{{/|\\}}include-declarations.h], stack top [0]
+
+#include "include-declarations.h"
+
+void main() {
+}

+ 7 - 0
tools/clang/test/DXC/local_rs.hlsl

@@ -0,0 +1,7 @@
+// RUN:%dxc -T rootsig_1_1 %s -rootsig-define main -Fo %t
+// RUN:%dxa  -listparts %t | FileCheck %s
+
+#define main "CBV(b0), RootFlags(LOCAL_ROOT_SIGNATURE)"
+
+// CHECK:Part count: 1
+// CHECK:#0 - RTS0

+ 6 - 0
tools/clang/test/DXC/no_spirv.test

@@ -0,0 +1,6 @@
+
+// UNSUPPORTED: spirv
+
+// RUN:not %dxc %S/Inputs/smoke.hlsl  /T ps_6_0 -spirv > %t.nospirv.log 2>&1
+// RUN: FileCheck %s --input-file=%t.nospirv.log
+// CHECK:SPIR-V CodeGen not available

+ 6 - 0
tools/clang/test/DXC/preprocess.test

@@ -0,0 +1,6 @@
+
+
+// Preprocess
+// RUN: %dxc /T ps_6_0 %S/Inputs/smoke.hlsl /P %t.preprocessed.hlsl
+// RUN: FileCheck --input-file=%t.preprocessed.hlsl %s --check-prefix=PREPROCESSED
+// PREPROCESSED:float4 main

+ 30 - 0
tools/clang/test/DXC/private_data.test

@@ -0,0 +1,30 @@
+// Set private data
+// RUN: echo private data > %t.private.txt
+// RUN: %dxc %S/Inputs/smoke.hlsl /D "semantic = SV_Position" /T vs_6_0 /Zi /Qembed_debug /DDX12 /Fo %t.private.smoke.cso
+
+// RUN: %dxc %t.private.smoke.cso /dumpbin /setprivate %t.private.txt /Fo %t.private.cso
+
+// RUN: %dxc %t.private.cso /dumpbin /setprivate %t.private.txt /Fo %t.private.cso
+
+// RUN: %dxc %t.private.cso /dumpbin /Qstrip_priv /Fo %t.noprivate.cso
+
+// RUN: %dxc %t.private.cso /dumpbin /getprivate %t.private1.txt
+// RUN: FileCheck %s --input-file=%t.private1.txt --check-prefix=PRIVATE1
+// PRIVATE1:private data
+
+// Appending and removing private data blob roundtrip
+// RUN: cmp %t.private.smoke.cso %t.noprivate.cso
+
+// Strip multiple, verify stripping
+
+// RUN: %dxc %t.private.cso /dumpbin /Qstrip_priv /Qstrip_debug /Qstrip_rootsignature /Fo %t.noprivdebugroot.cso
+
+// RUN: not %dxc %t.noprivdebugroot.cso /dumpbin /getprivate %t.private2.txt
+
+// RUN: not %dxc %t.noprivdebugroot.cso /dumpbin /extractrootsignature %t.rootsig1.cso
+// Make sure %t.rootsig1.cso not exist.
+// RUN: not %dxc -dumpbin %t.rootsig1.cso
+
+// RUN: %dxc %t.noprivdebugroot.cso /dumpbin | FileCheck %s --check-prefix=NO_PRIVATE_DBG_ROOT
+// NO_PRIVATE_DBG_ROOT:define void @main()
+// NO_PRIVATE_DBG_ROOT-NOT:DICompileUnit

+ 33 - 0
tools/clang/test/DXC/root_sig.test

@@ -0,0 +1,33 @@
+// RUN: %dxc  %S/Inputs/smoke.hlsl  /D "semantic = SV_Position" /T vs_6_0 /Zi /Qembed_debug /DDX12 /Fo %t.define.cso
+
+// Strip Root Signature from compiled object
+// RUN: %dxc %t.define.cso /dumpbin /Qstrip_rootsignature /Fo %t.norootsignature.cso
+// RUN:%dxa  -listparts %t.norootsignature.cso | FileCheck %s --check-prefix=NO_RS
+
+// NO_RS:Part count
+// NO_RS-NOT:RTS0
+
+// Extract rootsignature from compiled object
+// RUN: %dxc %t.define.cso /dumpbin /extractrootsignature /Fo %t.rootsig.cso
+// RUN:%dxa  -listparts %t.rootsig.cso | FileCheck %s --check-prefix=RS_PART
+
+
+// Add rootsignature to compiled object
+// RUN: %dxc %t.norootsignature.cso /dumpbin /setrootsignature %t.rootsig.cso /Fo %t.merged.cso
+// RUN:%dxa  -listparts %t.merged.cso | FileCheck %s --check-prefix=RS_PART
+
+// RS_PART:Part count
+// RS_PART:RTS0
+
+
+// Verify root signature for smoke.cso
+// RUN: %dxc %t.define.cso /dumpbin /verifyrootsignature %t.rootsig.cso
+// RUN: %dxc %t.norootsignature.cso /dumpbin /verifyrootsignature %t.rootsig.cso
+
+// Set root signature when already has one should succeed
+// RUN: %dxc %t.define.cso /dumpbin /setrootsignature %t.rootsig.cso /Fo %t.smoke.rsadded.cso
+// Make sure %t.smoke.rsadded.cso exist.
+// RUN: file -E %t.smoke.rsadded.cso
+
+// Set mismatched root signature when already has one should fail
+// RUN: not %dxc %t.define.cso /dumpbin /setrootsignature %t.NonUniformRootSig.cso /Fo %t.smoke.rsadded.cso

+ 7 - 0
tools/clang/test/DXC/shader_model_update.test

@@ -0,0 +1,7 @@
+
+// dxc.exe shader model upgrade
+
+// RUN: %dxc  %S/Inputs/smoke.hlsl   /T ps_5_0 | FileCheck  %s --check-prefix=MODEL_UPGRADE
+
+// Make sure shader model upgrade to 6.0.
+// MODEL_UPGRADE:!{!"ps", i32 6, i32 0}

+ 7 - 0
tools/clang/test/DXC/spirv.test

@@ -0,0 +1,7 @@
+
+// REQUIRES: spirv
+
+// RUN:%dxc %s  /T ps_6_0 %S/Inputs/smoke.hlsl -spirv | FileCheck %s
+
+// CHECK: SPIR-V
+// CHECK:OpName %main "main"

+ 19 - 0
tools/clang/test/DXC/strip_dbg.test

@@ -0,0 +1,19 @@
+// /Fd implies /Qstrip_debug ; path with / produces auto hash-named .pdb file
+// RUN: %dxc /T ps_6_0 %S/Inputs/smoke.hlsl /Zi /Fd ./ /Fo %t.strip
+// RUN: %dxc -dumpbin %t.strip | FileCheck  %s --check-prefix=STRIP_DBG
+// RUN: file -E *.pdb && rm *.pdb
+
+// /Zi with /Qstrip_debug and no output should not embed
+// RUN: %dxc /T ps_6_0 %S/Inputs/smoke.hlsl /Zi /Qstrip_debug /Fo %t.strip2
+// RUN: %dxc -dumpbin %t.strip2 | FileCheck  %s --check-prefix=STRIP_DBG
+
+// STRIP_DBG:shader debug name: {{[0-9a-z]+}}.pdb
+// STRIP_DBG-NOT:DICompileUnit
+
+
+// Strip Debug from compiled object
+// RUN: %dxc %S/Inputs/smoke.hlsl  /D "semantic = SV_Position" /T vs_6_0 /Zi /Qembed_debug /DDX12 /Fo %t.define.cso
+// RUN: %dxc %t.define.cso /dumpbin /Qstrip_debug /Fo %t.nodebug.cso
+// RUN: %dxc -dumpbin %t.nodebug.cso | FileCheck %s --check-prefix=STRIP_DEBUG_CSO
+// STRIP_DEBUG_CSO:define void @main()
+// STRIP_DEBUG_CSO-NOT:DICompileUnit

+ 6 - 0
tools/clang/test/DXC/strip_reflect.test

@@ -0,0 +1,6 @@
+
+// /Qstrip_reflect strips reflection
+// RUN: %dxc /T ps_6_0 %S/Inputs/smoke.hlsl -D DX12 /Qstrip_reflect /Fo %t.strip.reflection
+// RUN: %dxc -dumpbin %t.strip.reflection | FileCheck  %s --check-prefix=STRIP_REFLECTION
+// STRIP_REFLECTION:define void @main()
+// STRIP_REFLECTION-NOT:i32 6, !"g"

+ 7 - 0
tools/clang/test/DXC/warning.test

@@ -0,0 +1,7 @@
+// Check Warning
+// RUN: %dxc /T ps_6_0 %S/Inputs/smoke.hlsl /Dcheck_warning 2>&1 | FileCheck %s --check-prefix=CHECK_WARNING
+// CHECK_WARNING:warning:
+
+// /no-warnings
+// RUN: %dxc /T ps_6_0 %S/Inputs/smoke.hlsl /Dcheck_warning /no-warnings 2>&1 | FileCheck %s --check-prefix=CHECK_NOWARNING
+// CHECK_NOWARNING-NOT:warning:

+ 9 - 0
tools/clang/test/lit.cfg

@@ -287,6 +287,10 @@ config.substitutions.append( ('%listparts',
 config.substitutions.append( ('%dxl',
                             lit.util.which('dxl', llvm_tools_dir)) )
 
+if platform.system() in ['Windows']:
+    config.substitutions.append( ('%batch',
+                                lit.util.which('dxc_batch', llvm_tools_dir)) )
+
 # The host triple might not be set, at least if we're compiling clang from
 # an already installed llvm.
 if config.host_triple and config.host_triple != '@LLVM_HOST_TRIPLE@':
@@ -489,6 +493,11 @@ else:
 if config.enable_backtrace == "1":
     config.available_features.add("backtrace")
 
+if config.spirv:
+    config.available_features.add("spirv")
+else:
+    config.limit_to_features.add("spirv")
+
 # Check if we should run long running tests.
 if lit_config.params.get("run_long_tests", None) == "true":
     config.available_features.add("long_tests")

+ 0 - 22
utils/hct/cmdtestfiles/NonUniform.hlsl

@@ -1,22 +0,0 @@
-// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
-
-// CHECK: createHandle
-// CHECK: i1 true)
-
-// CHECK: createHandle
-// CHECK: i1 true)
-
-// CHECK: createHandle
-// CHECK: i1 true)
-
-Texture1D<float4> tex[5] : register(t3);
-SamplerState SS[3] : register(s2);
-
-[RootSignature("DescriptorTable(SRV(t3, numDescriptors=5)),\
-                DescriptorTable(Sampler(s2, numDescriptors=3))")]
-float4 main(int i : A, float j : B) : SV_TARGET
-{
-  float4 r = tex[NonUniformResourceIndex(i)].Sample(SS[NonUniformResourceIndex(i)], i);
-  r += tex[NonUniformResourceIndex(j)].Sample(SS[i], j+2);
-  return r;
-}

+ 0 - 21
utils/hct/cmdtestfiles/PipelineStage.hlsl

@@ -1,21 +0,0 @@
-#if __SHADER_TARGET_STAGE == __SHADER_STAGE_VERTEX
-#define __SHADER_STAGE_PREFIX vs
-#elif __SHADER_TARGET_STAGE == __SHADER_STAGE_PIXEL
-#define __SHADER_STAGE_PREFIX ps
-#elif __SHADER_TARGET_STAGE == __SHADER_STAGE_GEOMETRY
-#define __SHADER_STAGE_PREFIX gs
-#elif __SHADER_TARGET_STAGE == __SHADER_STAGE_HULL
-#define __SHADER_STAGE_PREFIX hs
-#elif __SHADER_TARGET_STAGE == __SHADER_STAGE_DOMAIN
-#define __SHADER_STAGE_PREFIX ds
-#elif __SHADER_TARGET_STAGE == __SHADER_STAGE_COMPUTE
-#define __SHADER_STAGE_PREFIX cs
-#elif __SHADER_TARGET_STAGE == __SHADER_STAGE_AMPLIFICATION
-#define __SHADER_STAGE_PREFIX as
-#elif __SHADER_TARGET_STAGE == __SHADER_STAGE_MESH
-#define __SHADER_STAGE_PREFIX ms
-#elif __SHADER_TARGET_STAGE == __SHADER_STAGE_LIBRARY
-#define __SHADER_STAGE_PREFIX lib
-#endif
-
-__SHADER_STAGE_PREFIX __SHADER_TARGET_MAJOR __SHADER_TARGET_MINOR)

+ 0 - 1
utils/hct/cmdtestfiles/VersionMacro.hlsl

@@ -1 +0,0 @@
-__HLSL_VERSION

+ 0 - 22
utils/hct/cmdtestfiles/binding_table.hlsl

@@ -1,22 +0,0 @@
-// List of things tested in this:
-//  - Arbitrary capitalization of the headers
-//  - Quotes
-//  - Optional trailing commas
-//  - Arbitrary spaces
-//  - Resources with the same names (but different classes)
-
-cbuffer cb {
-  float a;
-};
-cbuffer resource {
-  float b;
-};
-
-SamplerState samp0;
-Texture2D resource;
-RWTexture1D<float> uav_0;
-
-[RootSignature("CBV(b10,space=30), CBV(b42,space=999), DescriptorTable(Sampler(s1,space=2)), DescriptorTable(SRV(t1,space=2)), DescriptorTable(UAV(u1,space=2))")]
-float main(float2 uv : UV, uint i : I) :SV_Target {
-  return a + b + resource.Sample(samp0, uv).r + uav_0[i];
-}

+ 0 - 7
utils/hct/cmdtestfiles/dump_dependency.hlsl

@@ -1,7 +0,0 @@
-#include "include/dependency0.h"
-#include "include/dependency2.h"
-
-float4 main() : SV_Target
-{
-  return 0;
-}

+ 0 - 4
utils/hct/cmdtestfiles/inc2.hlsli

@@ -1,4 +0,0 @@
-int f2(int g)
-{
-  return g*42;
-}

+ 0 - 4
utils/hct/cmdtestfiles/include-main.hlsl

@@ -1,4 +0,0 @@
-#include "include-declarations.h"
-
-void main() {
-}

+ 0 - 7
utils/hct/cmdtestfiles/include/inc1.hlsli

@@ -1,7 +0,0 @@
-// Verify that we can find an include header in the original directory
-#include "inc2.hlsli"
-
-int f1(int g)
-{
-  return f2(g);
-}

+ 0 - 17
utils/hct/cmdtestfiles/lib_entry4.hlsl

@@ -1,17 +0,0 @@
-// Make sure same cbuffer decalred in different lib works.
-
-cbuffer A {
-  float a;
-  float v;
-}
-
-Texture2D	tex;
-SamplerState	samp;
-
-float GetV();
-
-[shader("pixel")]
-float4 main() : SV_Target
-{
-   return tex.Sample(samp, float2(a, GetV()));
-}

+ 0 - 15
utils/hct/cmdtestfiles/lib_res_match.hlsl

@@ -1,15 +0,0 @@
-
-
-// Make sure same cbuffer decalred in different lib works.
-
-cbuffer A {
-  float a;
-  float v;
-}
-
-Texture2D	tex;
-SamplerState	samp;
-
-export float GetV() {
-  return v + tex.Load(uint3(a, v, a)).y;
-}

+ 0 - 22
utils/hct/cmdtestfiles/smoke.hlsl

@@ -1,22 +0,0 @@
-// Verify that we can successfully process an include
-#include "include/inc1.hlsli"
-
-int g;
-static int g_unused;
-
-#ifndef semantic
-#define semantic SV_Target
-#endif
-#ifdef DX12
-#define RS "CBV(b0)"
-[RootSignature ( RS )]
-#endif
-
-float4 main() : semantic
-{
-  #ifdef check_warning
-  int x = 3;
-  x;
-  #endif
-  return f1(g);
-}

+ 50 - 50
utils/hct/hcttestcmds.cmd

@@ -10,7 +10,7 @@ echo Testing command line programs at %1 ...
 setlocal enableextensions enabledelayedexpansion
 
 set script_dir=%~dp0
-set testfiles=%script_dir%cmdtestfiles
+set testfiles=%script_dir%..\..\tools\clang\test\DXC
 set Failed=0
 set FailingCmdWritten=0
 set OutputLog=%1\testcmd.log
@@ -21,7 +21,7 @@ if "%HLSL_TESTCMD_CLEANUP_ON_FAILURE%" == "" set HLSL_TESTCMD_CLEANUP_ON_FAILURE
 pushd %1
 
 set testname=Basic Rewriter Smoke Test
-call :run dxr.exe -remove-unused-globals "%testfiles%\smoke.hlsl" -Emain
+call :run dxr.exe -remove-unused-globals "%testfiles%\Inputs\smoke.hlsl" -Emain
 call :check_file log find-not g_unused
 if %Failed% neq 0 goto :failed
 
@@ -29,12 +29,12 @@ if %Failed% neq 0 goto :failed
 echo Smoke test for dxc command line program ...
 
 set testname=Basic DXC Smoke Test
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Fc smoke.hlsl.h
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" /Fc smoke.hlsl.h
 call :check_file smoke.hlsl.h find "define void @main()" del
 if %Failed% neq 0 goto :failed
 
 set testname=Test extra DXC outputs together
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /DDX12 /Dcheck_warning /Fh smoke.hlsl.h /Vn g_myvar /Fc smoke.ll /Fo smoke.cso /Fre smoke.reflection /Frs smoke.rootsig /Fe smoke.err
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" /DDX12 /Dcheck_warning /Fh smoke.hlsl.h /Vn g_myvar /Fc smoke.ll /Fo smoke.cso /Fre smoke.reflection /Frs smoke.rootsig /Fe smoke.err
 call :check_file smoke.hlsl.h find g_myvar find "0x44, 0x58" find "define void @main()" del
 call :check_file smoke.ll find "define void @main()" del
 call :check_file smoke.cso del
@@ -48,7 +48,7 @@ call :run dxc.exe /T ps_6_0 "%testfiles%\binding_table.hlsl" -import-binding-tab
 if %Failed% neq 0 goto :failed
 
 set testname=/Fd implies /Qstrip_debug
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Zi /Fd smoke.hlsl.d /Fo smoke.hlsl.Fd.dxo
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" /Zi /Fd smoke.hlsl.d /Fo smoke.hlsl.Fd.dxo
 call :check_file smoke.hlsl.d del
 call :check_file smoke.hlsl.Fd.dxo
 if %Failed% neq 0 goto :failed
@@ -58,7 +58,7 @@ call :check_file log find "shader debug name: smoke.hlsl.d" find-not "DICompileU
 if %Failed% neq 0 goto :failed
 
 set testname=/Fd plus /Zs
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Zs /Fd smoke.hlsl.pdb /Fo smoke.hlsl.Fd.dxo
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" /Zs /Fd smoke.hlsl.pdb /Fo smoke.hlsl.Fd.dxo
 call :check_file smoke.hlsl.pdb del
 call :check_file smoke.hlsl.Fd.dxo
 if %Failed% neq 0 goto :failed
@@ -67,7 +67,7 @@ rem del .pdb file if exists
 del %CD%\*.pdb 1>nul 2>nul
 
 set testname=/Fd implies /Qstrip_debug ; path with \ produces auto hash-named .pdb file
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Zi /Fd .\ /Fo smoke.hlsl.strip
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" /Zi /Fd .\ /Fo smoke.hlsl.strip
 rem .pdb file should be produced
 call :check_file *.PDB del
 if %Failed% neq 0 goto :failed
@@ -80,7 +80,7 @@ rem del .pdb file if exists
 del %CD%\*.pdb 1>nul 2>nul
 
 set testname=Embed debug info
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Zi /Qembed_debug /Fo smoke.hlsl.embedpdb
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" /Zi /Qembed_debug /Fo smoke.hlsl.embedpdb
 call :check_file smoke.hlsl.embedpdb
 if %Failed% neq 0 goto :failed
 rem .pdb file should NOT be produced
@@ -92,7 +92,7 @@ call :check_file smoke.hlsl.embedpdb del
 if %Failed% neq 0 goto :failed
 
 set testname=Auto-embed debug info when no debug output, and expect warning signifying that this is the case.
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Zi /Fo smoke.hlsl.embedpdb /Fe smoke.err.embedpdb
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" /Zi /Fo smoke.hlsl.embedpdb /Fe smoke.err.embedpdb
 call :check_file smoke.hlsl.embedpdb
 rem Search for warning:
 call :check_file smoke.err.embedpdb find "warning: no output provided for debug - embedding PDB in shader container.  Use -Qembed_debug to silence this warning." del
@@ -106,7 +106,7 @@ call :check_file smoke.hlsl.embedpdb del
 if %Failed% neq 0 goto :failed
 
 set testname=/Zi with /Qstrip_debug and no output should not embed
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Zi /Qstrip_debug /Fo smoke.hlsl.strip
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" /Zi /Qstrip_debug /Fo smoke.hlsl.strip
 call :check_file smoke.hlsl.strip
 if %Failed% neq 0 goto :failed
 call :run dxc.exe -dumpbin smoke.hlsl.strip
@@ -115,7 +115,7 @@ call :check_file smoke.hlsl.strip del
 if %Failed% neq 0 goto :failed
 
 set testname=/Qstrip_reflect strips reflection
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" -D DX12 /Qstrip_reflect /Fo smoke.hlsl.strip
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" -D DX12 /Qstrip_reflect /Fo smoke.hlsl.strip
 call :check_file smoke.hlsl.strip
 if %Failed% neq 0 goto :failed
 call :run dxc.exe -dumpbin smoke.hlsl.strip
@@ -124,50 +124,50 @@ call :check_file smoke.hlsl.strip del
 if %Failed% neq 0 goto :failed
 
 set testname=Dump dependency files
-call :run dxc.exe /T ps_6_0 "%testfiles%\dump_dependency.hlsl" /M
+call :run dxc.exe /T ps_6_0 -I"%testfiles%\Inputs" "%testfiles%\dump_dependency.hlsl" /M
 call :check_file log find dump_dependency.hlsl find dependency0.h find dependency1.h find dependency2.h find dependency3.h find dependency4.h find dependency5.h del
-call :run dxc.exe /T ps_6_0 "%testfiles%\dump_dependency.hlsl" /MFdeps
+call :run dxc.exe /T ps_6_0 -I"%testfiles%\Inputs" "%testfiles%\dump_dependency.hlsl" /MFdeps
 call :check_file deps find dump_dependency.hlsl find dependency0.h find dependency1.h find dependency2.h find dependency3.h find dependency4.h find dependency5.h del
-call :run dxc.exe /T ps_6_0 "%testfiles%\dump_dependency.hlsl" /MD
+call :run dxc.exe /T ps_6_0 -I"%testfiles%\Inputs" "%testfiles%\dump_dependency.hlsl" /MD
 call :check_file "%testfiles%\dump_dependency.d" find dump_dependency.hlsl find dependency0.h find dependency1.h find dependency2.h find dependency3.h find dependency4.h find dependency5.h del
 if %Failed% neq 0 goto :failed
 
 set testname=ast-dump
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /ast-dump
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" /ast-dump
 call :check_file log find TranslationUnitDecl
 if %Failed% neq 0 goto :failed
 
 set testname=time-report
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" -ftime-report
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" -ftime-report
 call :check_file log find "Pass execution timing report"
 if %Failed% neq 0 goto :failed
 
 set testname=time-report
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" -ftime-trace
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" -ftime-trace
 call :check_file log find "traceEvents"
 if %Failed% neq 0 goto :failed
 
 set testname=Check Warning
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Dcheck_warning
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" /Dcheck_warning
 call :check_file log find warning:
 if %Failed% neq 0 goto :failed
 
 set testname=/no-warnings
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Dcheck_warning /no-warnings
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" /Dcheck_warning /no-warnings
 call :check_file log find-not warning:
 if %Failed% neq 0 goto :failed
 
 set testname=Preprocess
-call :run dxc.exe "%testfiles%\smoke.hlsl" /P preprocessed.hlsl
+call :run dxc.exe "%testfiles%\Inputs\smoke.hlsl" /P preprocessed.hlsl
 call :check_file preprocessed.hlsl find "float4 main"
 if %Failed% neq 0 goto :failed
 
 set testname=-force_rootsig_ver
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" -force_rootsig_ver rootsig_1_0
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" -force_rootsig_ver rootsig_1_0
 if %Failed% neq 0 goto :failed
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" -force_rootsig_ver rootsig_1_1
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" -force_rootsig_ver rootsig_1_1
 if %Failed% neq 0 goto :failed
-call :run-fail dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" -force_rootsig_ver rootsig_2_0
+call :run-fail dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" -force_rootsig_ver rootsig_2_0
 if %Failed% neq 0 goto :failed
 
 set testname=Root Signature target
@@ -183,19 +183,19 @@ call :check_file test-local-rs.cso del
 if %Failed% neq 0 goto :failed
 
 set testname=HLSL Version
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /HV 2016
-call :run-fail dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /HV 2015
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" /HV 2016
+call :run-fail dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" /HV 2015
 if %Failed% neq 0 goto :failed
 
 set testname=Embed Debug, Recompile
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Zi /Qembed_debug /Fo smoke.cso 1> nul
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" /Zi /Qembed_debug /Fo smoke.cso 1> nul
 call :check_file smoke.cso
 if %Failed% neq 0 goto :failed
 call :run dxc.exe -dumpbin smoke.cso
 call :check_file log find "DICompileUnit"
 call :check_file smoke.cso del
 if %Failed% neq 0 goto :failed
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Zi /Qembed_debug /Fo smoke.cso /Cc /Ni /No /Lx
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" /Zi /Qembed_debug /Fo smoke.cso /Cc /Ni /No /Lx
 call :check_file smoke.cso
 if %Failed% neq 0 goto :failed
 call :run dxc.exe -dumpbin smoke.cso
@@ -207,7 +207,7 @@ call :run dxc.exe smoke.cso /recompile /T ps_6_0 /E main
 if %Failed% neq 0 goto :failed
 
 set testname=Strip Debug, Recompile PDB
-call :run dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Zi /Fd smoke.pdb 1> nul
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" /Zi /Fd smoke.pdb 1> nul
 call :check_file smoke.pdb
 if %Failed% neq 0 goto :failed
 call :run dxc.exe -dumpbin smoke.pdb
@@ -221,7 +221,7 @@ call :check_file smoke.pdb del
 
 rem Note: this smoke.cso is used for a lot of other tests, and they rely on options set here
 set testname=Command-line Defines, Recompile
-call :run dxc.exe "%testfiles%\smoke.hlsl" /D "semantic = SV_Position" /T vs_6_0 /Zi /Qembed_debug /DDX12 /Fo smoke.cso
+call :run dxc.exe "%testfiles%\Inputs\smoke.hlsl" /D "semantic = SV_Position" /T vs_6_0 /Zi /Qembed_debug /DDX12 /Fo smoke.cso
 call :check_file smoke.cso
 if %Failed% neq 0 goto :failed
 call :run dxc.exe smoke.cso /recompile
@@ -294,7 +294,7 @@ call :check_file_not smoke.rsadded.cso del
 if %Failed% neq 0 goto :failed
 
 set testname=Compile TextVS.hlsl
-call :run dxc.exe "%testfiles%\TextVS.hlsl" /Tvs_6_0 /Zi /Qembed_debug /Fo TextVS.cso
+call :run dxc.exe "%testfiles%\TextVS.hlsl" -I"%testfiles%\Inputs" /Tvs_6_0 /Zi /Qembed_debug /Fo TextVS.cso
 call :check_file TextVS.cso
 if %Failed% neq 0 goto :failed
 call :run dxc.exe smoke.cso /dumpbin /verifyrootsignature TextVS.cso
@@ -346,10 +346,10 @@ if %Failed% neq 0 goto :failed
 
 set testname=dxc.exe shader model version promtion warning
 rem shader model version promotion warning prints to stderr, so not captured in /Fe
-dxc.exe "%testfiles%\smoke.hlsl" /Emain /Tps_5_0 2>smoke.err
+dxc.exe "%testfiles%\Inputs\smoke.hlsl" /Emain /Tps_5_0 2>smoke.err
 call :check_file smoke.err find "warning: Promoting older shader model profile to 6.0 version."
 if %Failed% neq 0 goto :failed
-dxc.exe "%testfiles%\smoke.hlsl" /Emain /Tps_5_1 2>smoke.err
+dxc.exe "%testfiles%\Inputs\smoke.hlsl" /Emain /Tps_5_1 2>smoke.err
 call :check_file smoke.err find "warning: Promoting older shader model profile to 6.0 version."
 if %Failed% neq 0 goto :failed
 
@@ -394,11 +394,11 @@ call :check_file smoke.rebuilt-container2.cso del
 if %Failed% neq 0 goto :failed
 
 set testname=Smoke test for dxopt command line
-call :run-nolog dxc /Odump /T ps_6_0 "%testfiles%\smoke.hlsl" > passes.txt
+call :run-nolog dxc /Odump /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" > passes.txt
 call :check_file passes.txt find emit
 if %Failed% neq 0 goto :failed
 echo -print-module >> passes.txt
-call :run dxc /T ps_6_0 "%testfiles%\smoke.hlsl" /fcgl -Fc smoke.hl.ll
+call :run dxc /T ps_6_0 "%testfiles%\Inputs\smoke.hlsl" /fcgl -Fc smoke.hl.ll
 call :check_file smoke.hl.ll
 if %Failed% neq 0 goto :failed
 call :run-nolog dxopt -pf passes.txt -o=smoke.opt.bc smoke.hl.ll > smoke.opt.prn.txt
@@ -407,18 +407,18 @@ call :check_file smoke.opt.prn.txt find MODULE-PRINT del
 if %Failed% neq 0 goto :failed
 
 set testname=Smoke test for dxc_batch command line
-call :run dxc_batch.exe -lib-link -multi-thread "%testfiles%\batch_cmds2.txt"
+call :run dxc_batch.exe -lib-link -multi-thread "%testfiles%\Inputs\batch_cmds2.txt"
 if %Failed% neq 0 goto :failed
-call :run dxc_batch.exe -lib-link -multi-thread "%testfiles%\batch_cmds.txt"
+call :run dxc_batch.exe -lib-link -multi-thread "%testfiles%\Inputs\batch_cmds.txt"
 if %Failed% neq 0 goto :failed
-call :run dxc_batch.exe -multi-thread "%testfiles%\batch_cmds.txt"
+call :run dxc_batch.exe -multi-thread "%testfiles%\Inputs\batch_cmds.txt"
 if %Failed% neq 0 goto :failed
 
 set testname=Smoke test for dxl command line
 call :run dxc.exe -T lib_6_x "%testfiles%\lib_entry4.hlsl" -Fo lib_entry4.dxbc
 call :check_file lib_entry4.dxbc
 if %Failed% neq 0 goto :failed
-call :run dxc.exe -T lib_6_x "%testfiles%\lib_res_match.hlsl" -Fo lib_res_match.dxbc
+call :run dxc.exe -T lib_6_x "%testfiles%\Inputs\lib_res_match.hlsl" -Fo lib_res_match.dxbc
 call :check_file lib_res_match.dxbc
 if %Failed% neq 0 goto :failed
 call :run dxl.exe -T ps_6_0 lib_res_match.dxbc;lib_entry4.dxbc -Fo res_match_entry.dxbc
@@ -428,21 +428,21 @@ call :check_file res_match_entry.dxbc del
 if %Failed% neq 0 goto :failed
 
 set testname=Test for denorm options
-call :run dxc.exe "%testfiles%\smoke.hlsl" /Tps_6_2 /denorm preserve
+call :run dxc.exe "%testfiles%\Inputs\smoke.hlsl" /Tps_6_2 /denorm preserve
 if %Failed% neq 0 goto :failed
-call :run dxc.exe "%testfiles%\smoke.hlsl" /Tps_6_2 /denorm ftz
+call :run dxc.exe "%testfiles%\Inputs\smoke.hlsl" /Tps_6_2 /denorm ftz
 if %Failed% neq 0 goto :failed
-call :run-fail dxc.exe "%testfiles%\smoke.hlsl" /Tps_6_2 /denorm abc
+call :run-fail dxc.exe "%testfiles%\Inputs\smoke.hlsl" /Tps_6_2 /denorm abc
 if %Failed% neq 0 goto :failed
-call :run-fail dxc.exe "%testfiles%\smoke.hlsl" /Tps_6_1 /denorm any
+call :run-fail dxc.exe "%testfiles%\Inputs\smoke.hlsl" /Tps_6_1 /denorm any
 if %Failed% neq 0 goto :failed
 
 set testname=Test /enable-16bit-types
-call :run dxc.exe "%testfiles%\smoke.hlsl" /Tps_6_2 /enable-16bit-types
+call :run dxc.exe "%testfiles%\Inputs\smoke.hlsl" /Tps_6_2 /enable-16bit-types
 if %Failed% neq 0 goto :failed
-call :run-fail dxc.exe "%testfiles%\smoke.hlsl" /Tps_6_1 /enable-16bit-types
+call :run-fail dxc.exe "%testfiles%\Inputs\smoke.hlsl" /Tps_6_1 /enable-16bit-types
 if %Failed% neq 0 goto :failed
-call :run-fail dxc.exe "%testfiles%\smoke.hlsl" /Tps_6_2 /enable-16bit-types /HV 2017
+call :run-fail dxc.exe "%testfiles%\Inputs\smoke.hlsl" /Tps_6_2 /enable-16bit-types /HV 2017
 if %Failed% neq 0 goto :failed
 
 set testname=Test file with relative path and include
@@ -450,7 +450,7 @@ mkdir subfolder 2>nul
 mkdir inc       2>nul
 copy "%testfiles%\include-main.hlsl" subfolder >nul
 call :check_file subfolder\include-main.hlsl
-copy "%testfiles%\include-declarations.h" inc  >nul
+copy "%testfiles%\Inputs\inc\include-declarations.h" inc  >nul
 call :check_file inc\include-declarations.h
 call :run dxc.exe -Tps_6_0 -I inc subfolder\include-main.hlsl
 if %Failed% neq 0 goto :failed
@@ -495,15 +495,15 @@ for %%p in (vs ps gs hs ds cs lib) do (
 )
 
 set testname=Byte Order Markers
-call :run dxc.exe /T ps_6_0 "%testfiles%\bom-main-ascii.hlsl"
-call :run dxc.exe /T ps_6_0 "%testfiles%\bom-main-utf8.hlsl"
-call :run dxc.exe /T ps_6_0 "%testfiles%\bom-main-utf16le.hlsl"
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\bom-main-ascii.hlsl"
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\bom-main-utf8.hlsl"
+call :run dxc.exe /T ps_6_0 "%testfiles%\Inputs\bom-main-utf16le.hlsl"
 if %Failed% neq 0 goto :failed
 
 rem SPIR-V Change Starts
 echo Smoke test for SPIR-V CodeGen ...
 set spirv_smoke_success=0
-dxc.exe "%testfiles%\smoke.hlsl" /T ps_6_0 -spirv 1>%CD%\smoke.spirv.log 2>&1
+dxc.exe "%testfiles%\Inputs\smoke.hlsl" /T ps_6_0 -spirv 1>%CD%\smoke.spirv.log 2>&1
 if %errorlevel% equ 0 set spirv_smoke_success=1
 findstr /c:"SPIR-V CodeGen not available" %CD%\smoke.spirv.log >nul
 if %errorlevel% equ 0 set spirv_smoke_success=1