-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompile_modified_spirv.bat
38 lines (33 loc) · 1.3 KB
/
compile_modified_spirv.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@echo off
IF NOT EXIST "assets\shaders" mkdir "assets\shaders"
ECHO [GLSLC] SPIRV compilation starts!
for /f %%f in ('git diff --name-only --diff-filter=M') do (
if %%~xf == .vert (
.\extern\vulkan\Bin\glslc.exe %~dp0assets\glsl_shaders\%%~xnf -o %~dp0assets\shaders\%%~xnf.spv
echo "%%~xnf" is compiled ...
)
if %%~xf == .frag (
.\extern\vulkan\Bin\glslc.exe %~dp0assets\glsl_shaders\%%~xnf -o %~dp0assets\shaders\%%~xnf.spv
echo "%%~xnf" is compiled ...
)
if %%~xf == .comp (
.\extern\vulkan\Bin\glslc.exe %~dp0assets\glsl_shaders\%%~xnf -o %~dp0assets\shaders\%%~xnf.spv
echo "%%~xnf" is compiled ...
)
)
for /f %%f in ('git ls-files --others --exclude-standard') do (
if %%~xf == .vert (
.\extern\vulkan\Bin\glslc.exe %~dp0assets\glsl_shaders\%%~xnf -o %~dp0assets\shaders\%%~xnf.spv
echo "%%~xnf" is compiled ...
)
if %%~xf == .frag (
.\extern\vulkan\Bin\glslc.exe %~dp0assets\glsl_shaders\%%~xnf -o %~dp0assets\shaders\%%~xnf.spv
echo "%%~xnf" is compiled ...
)
if %%~xf == .comp (
.\extern\vulkan\Bin\glslc.exe %~dp0assets\glsl_shaders\%%~xnf -o %~dp0assets\shaders\%%~xnf.spv
echo "%%~xnf" is compiled ...
)
)
echo [GLSLC] SPIR-V compilation completes!
pause