blob: d9c4ec1167f24e394e2b8025dd117e56a69e71e5 [file] [log] [blame]
Geoff Langd47e0fc2013-08-29 11:40:43 -04001@ECHO OFF
2REM
3REM Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
4REM Use of this source code is governed by a BSD-style license that can be
5REM found in the LICENSE file.
6REM
7
8PATH %PATH%;%ProgramFiles(x86)%\Windows Kits\8.0\bin\x86;%DXSDK_DIR%\Utilities\bin\x86
9
10setlocal
11set errorCount=0
12set successCount=0
13set debug=0
14
15if "%1" == "debug" (
16 set debug=1
17)
18if "%1" == "release" (
19 set debug=0
20)
21
22:: | Input file | Entry point | Type | Output file | Debug |
23call:BuildShader Blit.vs standardvs vs_2_0 compiled\standardvs.h %debug%
24call:BuildShader Blit.vs flipyvs vs_2_0 compiled\flipyvs.h %debug%
25call:BuildShader Blit.ps passthroughps ps_2_0 compiled\passthroughps.h %debug%
26call:BuildShader Blit.ps luminanceps ps_2_0 compiled\luminanceps.h %debug%
27call:BuildShader Blit.ps componentmaskps ps_2_0 compiled\componentmaskps.h %debug%
28
29echo.
30
31if %successCount% GTR 0 (
32 echo %successCount% shaders compiled successfully.
33)
34if %errorCount% GTR 0 (
35 echo There were %errorCount% shader compilation errors.
36)
37
38endlocal
39exit /b
40
41:BuildShader
42set input=%~1
43set entry=%~2
44set type=%~3
45set output=%~4
46set debug=%~5
47
48if %debug% == 0 (
49 set "buildCMD=fxc /nologo /E %entry% /T %type% /Fh %output% %input%"
50) else (
51 set "buildCMD=fxc /nologo /Zi /Od /E %entry% /T %type% /Fh %output% %input%"
52)
53
54set error=0
55%buildCMD% || set error=1
56
57if %error% == 0 (
58 set /a successCount=%successCount%+1
59) else (
60 set /a errorCount=%errorCount%+1
61)
62
63exit /b