Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

115 lines
2.7 KiB

  1. @echo off
  2. setlocal
  3. set TTEXE=..\..\devtools\bin\timeprecise.exe
  4. if not exist %TTEXE% goto no_ttexe
  5. goto no_ttexe_end
  6. :no_ttexe
  7. set TTEXE=time /t
  8. :no_ttexe_end
  9. rem echo.
  10. rem echo ~~~~~~ buildallshaders %* ~~~~~~
  11. %TTEXE% -cur-Q
  12. set tt_all_start=%ERRORLEVEL%
  13. set tt_all_chkpt=%tt_start%
  14. set sourcedir="shaders"
  15. set targetdir="..\..\..\game\platform\shaders"
  16. set BUILD_SHADER=call buildshaders.bat
  17. set ARG_X360=-x360
  18. set ARG_PS3=-ps3
  19. set ARG_EXTRA=
  20. REM ****************
  21. REM usage: buildallshaders [-pc | -x360 | -ps3]
  22. REM ****************
  23. set ALLSHADERS_CONFIG=pc
  24. if /i "%1" == "-pc" goto shcfg_pc
  25. if /i "%1" == "-ps3" goto shcfg_ps3
  26. if /i "%1" == "-360" goto shcfg_x360
  27. if /i "%1" == "-x360" goto shcfg_x360
  28. if /i "%1" == "-xbox" goto shcfg_x360
  29. REM // The default is to build shaders for all platforms when not specifying -pc, -x360, or -ps3
  30. call buildallshaders.bat -pc %*
  31. call buildallshaders.bat -x360 %*
  32. call buildallshaders.bat -ps3 %*
  33. goto end_of_file
  34. :shcfg_pc
  35. echo.
  36. echo // PC (-pc command line option) ===============================================
  37. if /i "%2" == "-nompi" set ARG_EXTRA=-nompi
  38. set ALLSHADERS_CONFIG=pc
  39. goto shcfg_end
  40. :shcfg_ps3
  41. echo.
  42. echo // PS3 (-ps3 command line option) =============================================
  43. if /i "%2" == "-nompi" set ARG_EXTRA=-nompi
  44. if /i "%2" == "-ps3debug" set ARG_EXTRA=-ps3debug
  45. if /i "%2" == "-ps3scheduleoptimization" set ARG_EXTRA=-ps3scheduleoptimization
  46. set ALLSHADERS_CONFIG=ps3
  47. goto shcfg_end
  48. :shcfg_x360
  49. echo.
  50. echo // 360 (-360 command line option) =============================================
  51. if /i "%2" == "-nompi" set ARG_EXTRA=-nompi
  52. set ALLSHADERS_CONFIG=x360
  53. goto shcfg_end
  54. :shcfg_end
  55. REM ****************
  56. REM PC SHADERS
  57. REM ****************
  58. if /i "%ALLSHADERS_CONFIG%" == "pc" (
  59. %BUILD_SHADER% stdshader_dx9_20b %ARG_EXTRA%
  60. %BUILD_SHADER% stdshader_dx9_20b_new -dx9_30 %ARG_EXTRA%
  61. %BUILD_SHADER% stdshader_dx9_30 -dx9_30 -force30 %ARG_EXTRA%
  62. rem %BUILD_SHADER% stdshader_dx10 -dx10 %ARG_EXTRA%
  63. )
  64. REM ****************
  65. REM X360 SHADERS
  66. REM ****************
  67. if /i "%ALLSHADERS_CONFIG%" == "x360" (
  68. %BUILD_SHADER% stdshader_dx9_20b %ARG_X360% %ARG_EXTRA%
  69. %BUILD_SHADER% stdshader_dx9_20b_new %ARG_X360% %ARG_EXTRA%
  70. rem %BUILD_SHADER% stdshader_dx9_30 %ARG_X360% %ARG_EXTRA%
  71. rem %BUILD_SHADER% stdshader_dx10 %ARG_X360% %ARG_EXTRA%
  72. )
  73. REM ****************
  74. REM PS3 SHADERS
  75. REM ****************
  76. if /i "%ALLSHADERS_CONFIG%" == "ps3" (
  77. %BUILD_SHADER% stdshader_ps3 %ARG_PS3% %ARG_EXTRA%
  78. )
  79. REM ****************
  80. REM END
  81. REM ****************
  82. :end
  83. rem echo.
  84. if not "%dynamic_shaders%" == "1" (
  85. rem echo Finished full buildallshaders %*
  86. ) else (
  87. rem echo Finished dynamic buildallshaders %*
  88. )
  89. rem %TTEXE% -diff %tt_all_start% -cur
  90. rem echo.
  91. :end_of_file