Skip to content

Commit

Permalink
Add more checks
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Aug 30, 2024
1 parent 16c9c64 commit 2ac780e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Src/Shaders/CompileShaders.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ if exist %PCDXC% goto dxilver
set PCDXC=dxc.exe
goto continue

:dxcviaenv
set PCDXC="%DirectXShaderCompiler%"
if exist %PCDXC% goto continue
goto needdxil

:dxilver
if not defined WindowsSDKVersion goto continue
REM known DXC.EXE versions that don't support -HV 2021
Expand All @@ -72,6 +67,15 @@ if not "x%WindowsSDKVersion:10.0.20348.0=%"=="x%WindowsSDKVersion%" set DXILOPTS
if not "x%WindowsSDKVersion:10.0.22000.0=%"=="x%WindowsSDKVersion%" set DXILOPTS=%DXILOPTS:-HV 2021=%
goto continue

:dxcviaenv
set PCDXC="%DirectXShaderCompiler%"
if not exist %PCDXC% goto needdxil

if not "x%DirectXShaderCompiler:10.0.19041.0=%"=="x%DirectXShaderCompiler%" set DXILOPTS=%DXILOPTS:-HV 2021=%
if not "x%DirectXShaderCompiler:10.0.20348.0=%"=="x%DirectXShaderCompiler%" set DXILOPTS=%DXILOPTS:-HV 2021=%
if not "x%DirectXShaderCompiler:10.0.22000.0=%"=="x%DirectXShaderCompiler%" set DXILOPTS=%DXILOPTS:-HV 2021=%
goto continue

:continuepc
set PCOPTS=

Expand Down

0 comments on commit 2ac780e

Please sign in to comment.