Skip to content

Commit

Permalink
[build] Downgrade molten-vk version to v1.1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
jim19930609 committed Nov 10, 2022
1 parent 67a7b34 commit f31f464
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ jobs:

- name: Create Python Wheel
run: |
brew install molten-vk
# Use the molten-vk v1.1.10 downloaded from taichi assets
brew uninstall molten-vk
export PATH=$(pwd)/taichi-llvm/bin/:$PATH
.github/workflows/scripts/unix-build.sh
env:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ jobs:
- name: Build & Install
if: needs.check_files.outputs.run_job == 'true'
run: |
brew install molten-vk
# Use the molten-vk v1.1.10 downloaded from taichi assets
brew uninstall molten-vk
.github/workflows/scripts/unix-build.sh
env:
CXX: clang++
Expand Down
17 changes: 12 additions & 5 deletions cmake/TaichiCore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,19 @@ endif()
if (TI_WITH_VULKAN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTI_WITH_VULKAN")
if (APPLE)
find_library(MOLTEN_VK libMoltenVK.dylib PATHS $HOMEBREW_CELLAR/molten-vk $VULKAN_SDK REQUIRED)
configure_file(${MOLTEN_VK} ${CMAKE_BINARY_DIR}/libMoltenVK.dylib COPYONLY)
message(STATUS "MoltenVK library ${MOLTEN_VK}")
if (EXISTS ${CMAKE_BINARY_DIR}/libMoltenVK.dylib)
install(FILES ${CMAKE_BINARY_DIR}/libMoltenVK.dylib DESTINATION ${INSTALL_LIB_DIR}/runtime)
# The latest Molten-vk v1.2.0 and v1.1.11 breaks GGUI: mpm3d_ggui.py
# So we have to manually download and install Molten-vk v1.10.0
#
# Uncomment the following lines if the mpm3d_ggui.py runs well with the latest Molten-vk
#find_library(MOLTEN_VK libMoltenVK.dylib PATHS $HOMEBREW_CELLAR/molten-vk $VULKAN_SDK REQUIRED)
#configure_file(${MOLTEN_VK} ${CMAKE_BINARY_DIR}/libMoltenVK.dylib COPYONLY)
#message(STATUS "MoltenVK library ${MOLTEN_VK}")

if(NOT EXISTS ${CMAKE_BINARY_DIR}/libMoltenVK.dylib)
execute_process(COMMAND curl -L -o ${CMAKE_BINARY_DIR}/libMoltenVK.zip https://github.com/taichi-dev/taichi_assets/files/9977436/libMoltenVK.dylib.zip)
execute_process(COMMAND tar -xf ${CMAKE_BINARY_DIR}/libMoltenVK.zip --directory ${CMAKE_BINARY_DIR})
endif()
install(FILES ${CMAKE_BINARY_DIR}/libMoltenVK.dylib DESTINATION ${INSTALL_LIB_DIR}/runtime)
endif()
add_subdirectory(taichi/rhi/vulkan)
add_subdirectory(taichi/runtime/program_impls/vulkan)
Expand Down

0 comments on commit f31f464

Please sign in to comment.