FPPS4/shaders/compile.cmd

20 lines
523 B
Batchfile
Raw Normal View History

2021-12-08 20:04:07 +00:00
2022-05-31 07:18:54 +00:00
@echo off
2021-12-08 20:04:07 +00:00
Set spirvgls=spirv\glslangValidator -g0 -V --target-env vulkan1.0
Set spirvopt=spirv\spirv-opt --eliminate-dead-branches --eliminate-local-multi-store --inline-entry-points-exhaustive --eliminate-dead-code-aggressive --scalar-replacement --simplify-instructions
2022-05-31 07:18:54 +00:00
For /F %%a in ('dir /B') do if "%%~xa"==".comp" (call :compil %%a %%~na)
2021-12-08 20:04:07 +00:00
2022-05-31 07:18:54 +00:00
For /F %%a in ('dir /B') do if "%%~xa"==".vert" (call :compil %%a %%~na)
2021-12-08 20:04:07 +00:00
pause
2022-05-31 07:18:54 +00:00
exit
:compil
echo %2
%spirvgls% %1 -o %2.spv
%spirvopt% %2.spv -o %2.spv
exit /b