You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

build_vulkan_vision_windows.bat 2.5 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. REM Copyright 2021 Huawei Technologies Co., Ltd.
  2. REM
  3. REM Licensed under the Apache License, Version 2.0 (the "License");
  4. REM you may not use this file except in compliance with the License.
  5. REM You may obtain a copy of the License at
  6. REM
  7. REM http://www.apache.org/licenses/LICENSE-2.0
  8. REM
  9. REM Unless required by applicable law or agreed to in writing, software
  10. REM distributed under the License is distributed on an "AS IS" BASIS,
  11. REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. REM See the License for the specific language governing permissions and
  13. REM limitations under the License.
  14. @echo off
  15. set start_dir=%cd%
  16. cd %~dp0..\..\ecosystem_tools\VulkanVision
  17. IF NOT EXIST SPIRV-Tools (
  18. echo Cloning SPIRV-Tools
  19. git clone https://github.com/KhronosGroup/SPIRV-Tools
  20. copy st-patches\*.patch SPIRV-Tools
  21. cd SPIRV-Tools
  22. git checkout 17ffa89097b26efeb323e6963220326b5ffb2baf
  23. REM These are the current stable changes and can be updated with new releases
  24. git apply 0001-spirv-opt-Add-auto-inst-passes.patch
  25. del *.patch
  26. cd ..
  27. )
  28. IF NOT EXIST Vulkan-ValidationLayers (
  29. echo Cloning Vulkan-ValidationLayers
  30. git clone https://github.com/KhronosGroup/Vulkan-ValidationLayers
  31. copy vv-patches\*.patch Vulkan-ValidationLayers
  32. cd Vulkan-ValidationLayers
  33. git checkout aa076dae88e282d7b6cada4f900b2fa7dac8ed08
  34. REM These are the current stable changes and can be updated with new releases
  35. git apply 0001-layers-Added-auto-inst-layers.patch
  36. del *.patch
  37. cd ..
  38. )
  39. set build_dir=%cd%
  40. echo Building SPIRV-Tools
  41. cd SPIRV-Tools
  42. git clone https://github.com/KhronosGroup/SPIRV-Headers.git external\spirv-headers
  43. cd external\spirv-headers
  44. git checkout f027d53ded7e230e008d37c8b47ede7cd308e19d
  45. cd ..\..
  46. git clone https://github.com/google/effcee.git external\effcee
  47. git clone https://github.com/google/re2.git external\re2
  48. mkdir build
  49. cd build
  50. mkdir install
  51. cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=install ..
  52. cmake --build . --target install --config Release
  53. cd %build_dir%
  54. echo Building Vulkan-ValidationLayers
  55. cd Vulkan-ValidationLayers
  56. mkdir build
  57. cd build
  58. mkdir install
  59. python ../scripts/update_deps.py --config release
  60. cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=install -DSPIRV_TOOLS_INSTALL_DIR=%cd%/../../SPIRV-Tools/build/install -C helper.cmake ..
  61. cmake --build . --target install --config Release
  62. echo Build completed at %build_dir%!
  63. cd %start_dir%