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.4 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 --branch v2020.6
  20. copy st-patches\*.patch SPIRV-Tools
  21. cd SPIRV-Tools
  22. REM These are the current stable changes and can be updated with new releases
  23. git apply 0001-spirv-opt-Add-auto-inst-passes.patch
  24. del *.patch
  25. git clone https://github.com/KhronosGroup/SPIRV-Headers.git external\spirv-headers --branch 1.5.4.raytracing.fixed
  26. git clone https://github.com/google/effcee.git external\effcee --branch v2019.1
  27. git clone https://github.com/google/re2.git external\re2 --branch 2020-11-01
  28. cd ..
  29. )
  30. IF NOT EXIST Vulkan-ValidationLayers (
  31. echo Cloning Vulkan-ValidationLayers
  32. git clone https://github.com/KhronosGroup/Vulkan-ValidationLayers --branch sdk-1.2.162
  33. copy vv-patches\*.patch Vulkan-ValidationLayers
  34. cd Vulkan-ValidationLayers
  35. REM These are the current stable changes and can be updated with new releases
  36. git apply 0001-layers-Added-auto-inst-layers.patch
  37. del *.patch
  38. cd ..
  39. )
  40. set build_dir=%cd%
  41. echo Building SPIRV-Tools
  42. cd SPIRV-Tools
  43. mkdir build
  44. cd build
  45. mkdir install
  46. cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=install ..
  47. cmake --build . --target install --config Release
  48. cd %build_dir%
  49. echo Building Vulkan-ValidationLayers
  50. cd Vulkan-ValidationLayers
  51. mkdir build
  52. cd build
  53. mkdir install
  54. python ../scripts/update_deps.py --config release
  55. cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=install -DSPIRV_TOOLS_INSTALL_DIR=%cd%/../../SPIRV-Tools/build/install -C helper.cmake ..
  56. cmake --build . --target install --config Release
  57. echo Build completed at %build_dir%!
  58. cd %start_dir%