|
@@ -5,44 +5,40 @@ if "%1"=="" (
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-if "%2"=="" (
|
|
|
- echo Second argument to hcttestcmds should be the absolute path to tools\clang\test\HLSL
|
|
|
- exit /b 1
|
|
|
-)
|
|
|
-
|
|
|
echo Testing command line programs at %1 ...
|
|
|
|
|
|
setlocal
|
|
|
|
|
|
set script_dir=%~dp0
|
|
|
+set testfiles=%script_dir%cmdtestfiles
|
|
|
|
|
|
pushd %1
|
|
|
|
|
|
echo Smoke test for dxr command line program ...
|
|
|
-dxr.exe -remove-unused-globals %script_dir%\smoke.hlsl -Emain 1>nul 2>nul
|
|
|
+dxr.exe -remove-unused-globals "%testfiles%\smoke.hlsl" -Emain 1>nul 2>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed - %CD%\dxr.exe -remove-unused-globals %script_dir%\smoke.hlsl -Emain
|
|
|
+ echo Failed - %CD%\dxr.exe -remove-unused-globals "%testfiles%\smoke.hlsl" -Emain
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Fc smoke.hlsl.c 1>nul
|
|
|
+dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Fc smoke.hlsl.c 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed - %CD%\dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Fc %CD%\smoke.hlsl.c
|
|
|
+ echo Failed - %CD%\dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Fc %CD%\smoke.hlsl.c
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Zi /Fd smoke.hlsl.d 1>nul
|
|
|
+dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Zi /Fd smoke.hlsl.d 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed - %CD%\dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Zi /Fd %CD%\smoke.hlsl.d
|
|
|
+ echo Failed - %CD%\dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Zi /Fd %CD%\smoke.hlsl.d
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Zi /Fd %CD%\ /Fo smoke.hlsl.strip 1>nul
|
|
|
+dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Zi /Fd %CD%\ /Fo smoke.hlsl.strip 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed - %CD%\dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Zi /Fd %CD%\
|
|
|
+ echo Failed - %CD%\dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Zi /Fd %CD%\
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
@@ -67,60 +63,60 @@ if %errorlevel% equ 0 (
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Fe smoke.hlsl.e 1>nul
|
|
|
+dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Fe smoke.hlsl.e 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed - %CD%\dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Fe %CD%\smoke.hlsl.e
|
|
|
+ echo Failed - %CD%\dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Fe %CD%\smoke.hlsl.e
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /ast-dump 1>nul
|
|
|
+dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /ast-dump 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed - %CD%\dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /ast-dump
|
|
|
+ echo Failed - %CD%\dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /ast-dump
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Dcheck_warning 1>nul 2>smoke.warning.txt
|
|
|
+dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Dcheck_warning 1>nul 2>smoke.warning.txt
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed - %CD%\dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Dcheck_warning
|
|
|
+ echo Failed - %CD%\dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Dcheck_warning
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
findstr warning: %CD%\smoke.warning.txt 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed to get warning message from command %CD%\dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Dcheck_warning
|
|
|
+ echo Failed to get warning message from command %CD%\dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Dcheck_warning
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Dcheck_warning /no-warnings 1>nul 2>smoke.no.warning.txt
|
|
|
+dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Dcheck_warning /no-warnings 1>nul 2>smoke.no.warning.txt
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed - %CD%\dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Dcheck_warning /no-warnings
|
|
|
+ echo Failed - %CD%\dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Dcheck_warning /no-warnings
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
findstr warning: %CD%\smoke.no.warning.txt 1>nul
|
|
|
if %errorlevel% equ 0 (
|
|
|
- echo no-warning option failed : %CD%\dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Dcheck_warning /no-warnings
|
|
|
+ echo no-warning option failed : %CD%\dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Dcheck_warning /no-warnings
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
|
|
|
echo Smoke test for dxc command line program ...
|
|
|
-dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Fh smoke.hlsl.h /Vn g_myvar 1> nul
|
|
|
+dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Fh smoke.hlsl.h /Vn g_myvar 1> nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed - %CD%\dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Fh %CD%\smoke.hlsl.h /Vn g_myvar
|
|
|
+ echo Failed - %CD%\dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Fh %CD%\smoke.hlsl.h /Vn g_myvar
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
findstr g_myvar %CD%\smoke.hlsl.h 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
echo Failed to find the variable g_myvar in %CD%\smoke.hlsl.h
|
|
|
- echo Debug with start devenv /debugexe %CD%\dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Fh %CD%\smoke.hlsl.h /Vn g_myvar
|
|
|
+ echo Debug with start devenv /debugexe %CD%\dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Fh %CD%\smoke.hlsl.h /Vn g_myvar
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
@@ -131,28 +127,28 @@ if %errorlevel% neq 0 (
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe %script_dir%\smoke.hlsl /P preprocessed.hlsl 1>nul
|
|
|
+dxc.exe "%testfiles%\smoke.hlsl" /P preprocessed.hlsl 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
echo Failed to preprocess smoke.hlsl
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl -force_rootsig_ver rootsig_1_0 1>nul
|
|
|
+dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" -force_rootsig_ver rootsig_1_0 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
echo Failed to compile with forcing rootsignature rootsig_1_0
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl -force_rootsig_ver rootsig_1_1 1>nul
|
|
|
+dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" -force_rootsig_ver rootsig_1_1 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
echo Failed to compile with forcing rootsignature rootsig_1_1
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl -force_rootsig_ver rootsig_2_0 2>nul
|
|
|
+dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" -force_rootsig_ver rootsig_2_0 2>nul
|
|
|
if %errorlevel% equ 0 (
|
|
|
echo rootsig_2_0 is not supported but compilation passed
|
|
|
call :cleanup 2>nul
|
|
@@ -175,30 +171,30 @@ if %errorlevel% neq 0 (
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /HV 2016 1>nul
|
|
|
+dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /HV 2016 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
echo Failed to compile with HLSL version 2016
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /HV 2015 2>nul
|
|
|
+dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /HV 2015 2>nul
|
|
|
if %errorlevel% equ 0 (
|
|
|
echo Unsupported HLSL version 2015 should fail but did not fail
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Zi /Fo smoke.cso 1> nul
|
|
|
+dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Zi /Fo smoke.cso 1> nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
echo Failed to compile to binary object from %CD%\smoke.hlsl
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe /T ps_6_0 %script_dir%\smoke.hlsl /Zi /Fo smoke.cso /Cc /Ni /No /Lx 1> nul
|
|
|
+dxc.exe /T ps_6_0 "%testfiles%\smoke.hlsl" /Zi /Fo smoke.cso /Cc /Ni /No /Lx 1> nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed to compile to binary object from %script_dir%\smoke.hlsl with disassembly options
|
|
|
+ echo Failed to compile to binary object from "%testfiles%\smoke.hlsl" with disassembly options
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
@@ -224,9 +220,9 @@ if %errorlevel% neq 0 (
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe %script_dir%\smoke.hlsl /D "semantic = SV_Position" /T vs_6_0 /Zi /DDX12 /Fo smoke.cso 1> nul
|
|
|
+dxc.exe "%testfiles%\smoke.hlsl" /D "semantic = SV_Position" /T vs_6_0 /Zi /DDX12 /Fo smoke.cso 1> nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed to compile %script_dir%\smoke.hlsl with command line defines
|
|
|
+ echo Failed to compile "%testfiles%\smoke.hlsl" with command line defines
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
@@ -267,7 +263,7 @@ if %errorlevel% neq 0 (
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe "%2"\..\CodeGenHLSL\NonUniform.hlsl /T ps_6_0 /DDX12 /Fo NonUniform.cso 1>nul
|
|
|
+dxc.exe "%testfiles%\NonUniform.hlsl" /T ps_6_0 /DDX12 /Fo NonUniform.cso 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
echo Failed to compile NonUniform.hlsl
|
|
|
call :cleanup 2>nul
|
|
@@ -344,9 +340,9 @@ if %errorlevel% equ 0 (
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe %2\..\CodeGenHLSL\Samples\MiniEngine\TextVS.hlsl /Tvs_6_0 /Zi /Fo TextVS.cso 1>nul
|
|
|
+dxc.exe "%testfiles%\TextVS.hlsl" /Tvs_6_0 /Zi /Fo TextVS.cso 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo failed to compile %2\..\CodeGenHLSL\Samples\MiniEngine\TextVS.hlsl
|
|
|
+ echo failed to compile "%testfiles%\TextVS.hlsl"
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
@@ -409,7 +405,7 @@ if %errorlevel% neq 0 (
|
|
|
)
|
|
|
|
|
|
echo Smoke test for dxc.exe shader model upgrade...
|
|
|
-dxc.exe /T ps_5_0 %script_dir%\smoke.hlsl 1> nul
|
|
|
+dxc.exe /T ps_5_0 "%testfiles%\smoke.hlsl" 1> nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
echo Failed shader model upgrade test - %CD%\dxc.exe /T ps_5_0 %CD%\smoke.hlsl
|
|
|
call :cleanup 2>nul
|
|
@@ -481,7 +477,7 @@ if %errorlevel% neq 0 (
|
|
|
)
|
|
|
|
|
|
echo Smoke test for dxopt command line ...
|
|
|
-dxc /Odump /T ps_6_0 %script_dir%\smoke.hlsl > passes.txt
|
|
|
+dxc /Odump /T ps_6_0 "%testfiles%\smoke.hlsl" > passes.txt
|
|
|
if %errorlevel% neq 0 (
|
|
|
echo Failed to /ODump
|
|
|
call :cleanup 2>nul
|
|
@@ -494,7 +490,7 @@ if %errorlevel% neq 0 (
|
|
|
exit /b 1
|
|
|
)
|
|
|
echo -print-module >> passes.txt
|
|
|
-dxc /T ps_6_0 %script_dir%\smoke.hlsl /fcgl > smoke.hl.txt
|
|
|
+dxc /T ps_6_0 "%testfiles%\smoke.hlsl" /fcgl > smoke.hl.txt
|
|
|
if %errorlevel% neq 0 (
|
|
|
echo Failed to do a high-level codegen.
|
|
|
call :cleanup 2>nul
|
|
@@ -514,37 +510,37 @@ if %errorlevel% neq 0 (
|
|
|
)
|
|
|
|
|
|
echo Smoke test for dxc_batch command line ...
|
|
|
-dxc_batch.exe -lib-link -multi-thread "%2"\..\CodeGenHLSL\batch_cmds2.txt 1>nul
|
|
|
+dxc_batch.exe -lib-link -multi-thread "%testfiles%\batch_cmds2.txt" 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed to run dxc_batch -lib-link -multi-thread %2\..\CodeGenHLSL\batch_cmds2.txt
|
|
|
+ echo Failed to run dxc_batch -lib-link -multi-thread "%testfiles%\batch_cmds2.txt"
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc_batch.exe -lib-link -multi-thread "%2"\..\CodeGenHLSL\batch_cmds.txt 1>nul
|
|
|
+dxc_batch.exe -lib-link -multi-thread "%testfiles%\batch_cmds.txt" 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed to run dxc_batch -lib-link -multi-thread %2\..\CodeGenHLSL\batch_cmds.txt
|
|
|
+ echo Failed to run dxc_batch -lib-link -multi-thread "%testfiles%\batch_cmds.txt"
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc_batch.exe -multi-thread "%2"\..\CodeGenHLSL\batch_cmds.txt 1>nul
|
|
|
+dxc_batch.exe -multi-thread "%testfiles%\batch_cmds.txt" 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed to run dxc_batch -multi-thread %2\..\CodeGenHLSL\batch_cmds.txt
|
|
|
+ echo Failed to run dxc_batch -multi-thread "%testfiles%\batch_cmds.txt"
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
echo Smoke test for dxl command line ...
|
|
|
-dxc.exe -T lib_6_x "%2"\..\CodeGenHLSL\lib_entry4.hlsl -Fo lib_entry4.dxbc 1>nul
|
|
|
+dxc.exe -T lib_6_x "%testfiles%\lib_entry4.hlsl" -Fo lib_entry4.dxbc 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed to run dxc.exe -T "%2"\..\CodeGenHLSL\lib_6_x lib_entry4.hlsl -Fo lib_entry4.dxbc
|
|
|
+ echo Failed to run dxc.exe -T lib_6_x "%testfiles%\lib_entry4.hlsl" -Fo lib_entry4.dxbc
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
-dxc.exe -T lib_6_x "%2"\..\CodeGenHLSL\lib_res_match.hlsl -Fo lib_res_match.dxbc 1>nul
|
|
|
+dxc.exe -T lib_6_x "%testfiles%\lib_res_match.hlsl" -Fo lib_res_match.dxbc 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed to run dxc.exe -T "%2"\..\CodeGenHLSL\lib_6_x lib_res_match.hlsl -Fo lib_res_match.dxbc
|
|
|
+ echo Failed to run dxc.exe -T lib_6_x "%testfiles%\lib_res_match.hlsl" -Fo lib_res_match.dxbc
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
@@ -557,51 +553,51 @@ if %errorlevel% neq 0 (
|
|
|
)
|
|
|
|
|
|
echo Test for denorm options ...
|
|
|
-dxc.exe %script_dir%\smoke.hlsl /Tps_6_2 /denorm preserve 1>nul
|
|
|
+dxc.exe "%testfiles%\smoke.hlsl" /Tps_6_2 /denorm preserve 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed to compile %script_dir%\smoke.hlsl with /denorm ieee option
|
|
|
+ echo Failed to compile "%testfiles%\smoke.hlsl" with /denorm ieee option
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe %script_dir%\smoke.hlsl /Tps_6_2 /denorm ftz 1>nul
|
|
|
+dxc.exe "%testfiles%\smoke.hlsl" /Tps_6_2 /denorm ftz 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed to compile %script_dir%\smoke.hlsl with /denorm ftz option
|
|
|
+ echo Failed to compile "%testfiles%\smoke.hlsl" with /denorm ftz option
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe %script_dir%\smoke.hlsl /Tps_6_2 /denorm abc 2>nul
|
|
|
+dxc.exe "%testfiles%\smoke.hlsl" /Tps_6_2 /denorm abc 2>nul
|
|
|
if %errorlevel% equ 0 (
|
|
|
- echo dxc incorrectly compiled %script_dir%\smoke.hlsl with invalid /denorm option
|
|
|
+ echo dxc incorrectly compiled "%testfiles%\smoke.hlsl" with invalid /denorm option
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe %script_dir%\smoke.hlsl /Tps_6_1 /denorm any 2>nul
|
|
|
+dxc.exe "%testfiles%\smoke.hlsl" /Tps_6_1 /denorm any 2>nul
|
|
|
if %errorlevel% equ 0 (
|
|
|
- echo dxc incorrectly compiled %script_dir%\smoke.hlsl shader model 6.1 with /denorm option
|
|
|
+ echo dxc incorrectly compiled "%testfiles%\smoke.hlsl" shader model 6.1 with /denorm option
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe %script_dir%\smoke.hlsl /Tps_6_2 /enable-16bit-types 1>nul
|
|
|
+dxc.exe "%testfiles%\smoke.hlsl" /Tps_6_2 /enable-16bit-types 1>nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
- echo Failed to compile %script_dir%\smoke.hlsl with /enable-16bit-types option
|
|
|
+ echo Failed to compile "%testfiles%\smoke.hlsl" with /enable-16bit-types option
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe %script_dir%\smoke.hlsl /Tps_6_1 /enable-16bit-types 2>nul
|
|
|
+dxc.exe "%testfiles%\smoke.hlsl" /Tps_6_1 /enable-16bit-types 2>nul
|
|
|
if %errorlevel% equ 0 (
|
|
|
- echo dxc incorrectly compiled %script_dir%\smoke.hlsl shader model 6.1 with /enable-16bit-types option
|
|
|
+ echo dxc incorrectly compiled "%testfiles%\smoke.hlsl" shader model 6.1 with /enable-16bit-types option
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
|
|
|
|
-dxc.exe %script_dir%\smoke.hlsl /Tps_6_2 /enable-16bit-types /HV 2017 2>nul
|
|
|
+dxc.exe "%testfiles%\smoke.hlsl" /Tps_6_2 /enable-16bit-types /HV 2017 2>nul
|
|
|
if %errorlevel% equ 0 (
|
|
|
- echo dxc incorrectly compiled %script_dir%\smoke.hlsl shader model 6.2 with /enable-16bit-types and /HV 2017 option
|
|
|
+ echo dxc incorrectly compiled "%testfiles%\smoke.hlsl" shader model 6.2 with /enable-16bit-types and /HV 2017 option
|
|
|
call :cleanup 2>nul
|
|
|
exit /b 1
|
|
|
)
|
|
@@ -609,8 +605,8 @@ if %errorlevel% equ 0 (
|
|
|
echo Test file with relative path and include
|
|
|
mkdir subfolder 2>nul
|
|
|
mkdir inc 2>nul
|
|
|
-copy "%2"\include-main.hlsl subfolder >nul
|
|
|
-copy "%2"\include-declarations.h inc >nul
|
|
|
+copy "%testfiles%\include-main.hlsl" subfolder >nul
|
|
|
+copy "%testfiles%\include-declarations.h" inc >nul
|
|
|
dxc.exe -Tps_6_0 -I inc subfolder\include-main.hlsl >nul
|
|
|
if %errorlevel% neq 0 (
|
|
|
echo Failed to compile subfolder\include-main.hlsl
|
|
@@ -628,7 +624,7 @@ if %errorlevel% neq 0 (
|
|
|
rem SPIR-V Change Starts
|
|
|
echo Smoke test for SPIR-V CodeGen ...
|
|
|
set spirv_smoke_success=0
|
|
|
-dxc.exe %script_dir%\smoke.hlsl /T ps_6_0 -spirv 1>%CD%\smoke.spirv.log 2>&1
|
|
|
+dxc.exe "%testfiles%\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
|