mirror of
https://github.com/microsoft/DirectXTex.git
synced 2026-02-09 14:26:12 +01:00
Update for recent tool improvements
This commit is contained in:
@@ -9,6 +9,7 @@ if %PROCESSOR_ARCHITECTURE%.==ARM64. (set FXCARCH=arm64) else (if %PROCESSOR_ARC
|
||||
|
||||
set FXCOPTS=/nologo /WX /Ges /Zi /Zpc /Qstrip_reflect /Qstrip_debug
|
||||
|
||||
if defined LegacyShaderCompiler goto fxcviaenv
|
||||
set PCFXC="%WindowsSdkVerBinPath%%FXCARCH%\fxc.exe"
|
||||
if exist %PCFXC% goto continue
|
||||
set PCFXC="%WindowsSdkBinPath%%WindowsSDKVersion%\%FXCARCH%\fxc.exe"
|
||||
@@ -17,6 +18,12 @@ set PCFXC="%WindowsSdkDir%bin\%WindowsSDKVersion%\%FXCARCH%\fxc.exe"
|
||||
if exist %PCFXC% goto continue
|
||||
|
||||
set PCFXC=fxc.exe
|
||||
goto continue
|
||||
|
||||
:fxcviaenv
|
||||
set PCFXC="%LegacyShaderCompiler%"
|
||||
if not exist %PCFXC% goto needfxc
|
||||
goto continue
|
||||
|
||||
:continue
|
||||
if not defined CompileShadersOutput set CompileShadersOutput=Compiled
|
||||
@@ -42,8 +49,12 @@ endlocal
|
||||
exit /b 0
|
||||
|
||||
:CompileShader
|
||||
set fxc=%PCFXC% %1.fx %FXCOPTS% /T%2_4_0 /E%3 /Fh%CompileShadersOutput%\%1_%3.inc /Fd%CompileShadersOutput%\%1_%3.pdb /Vn%1_%3
|
||||
set fxc=%PCFXC% "%1.hlsl" %FXCOPTS% /T%2_4_0 /E%3 "/Fh%CompileShadersOutput%\%1_%3.inc" "/Fd%CompileShadersOutput%\%1_%3.pdb" /Vn%1_%3
|
||||
echo.
|
||||
echo %fxc%
|
||||
%fxc% || set error=1
|
||||
exit /b
|
||||
|
||||
:needfxc
|
||||
echo ERROR: CompileShaders requires FXC.EXE
|
||||
exit /b 1
|
||||
|
||||
Reference in New Issue
Block a user