Skip to content

[build] Upgrade Vulkan and Fix imgui #8715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/scripts/ti_build/dep.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ def download_dep(url, outdir, *, strip=0, force=False, args=None, plain=False, e
elif name.endswith(".tar.gz") or name.endswith(".tgz"):
outdir.mkdir(parents=True, exist_ok=True)
tar("-xzf", local_cached, "-C", outdir, f"--strip-components={strip}")
elif name.endswith(".tar.xz"):
outdir.mkdir(parents=True, exist_ok=True)
tar("-xJf", local_cached, "-C", outdir, f"--strip-components={strip}")
elif name.endswith(".sh"):
bash(local_cached, *args)
elif "." not in name and args is not None:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/scripts/ti_build/llvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def setup_llvm() -> None:
Download and install LLVM.
"""
u = platform.uname()
if u.system == "Linux":
if (u.system, u.machine) == ("Linux", "x86_64"):
if cmake_args.get_effective("TI_WITH_AMDGPU"):
out = get_cache_home() / "llvm15-amdgpu-005"
url = "https://github.com/GaleSeLee/assets/releases/download/v0.0.5/taichi-llvm-15.0.0-linux.zip"
Expand All @@ -31,6 +31,11 @@ def setup_llvm() -> None:
out = get_cache_home() / "llvm15"
url = "https://github.com/taichi-dev/taichi_assets/releases/download/llvm15/taichi-llvm-15-linux.zip"
download_dep(url, out, strip=1)

elif (u.system, u.machine) in (("Linux", "arm64"), ("Linux", "aarch64")):
out = get_cache_home() / "llvm15-manylinux2014"
# FIXME: ARM LLVM!
pass
elif (u.system, u.machine) == ("Darwin", "arm64"):
out = get_cache_home() / "llvm15-m1-nozstd"
url = "https://github.com/taichi-dev/taichi_assets/releases/download/llvm15/taichi-llvm-15-m1-nozstd.zip"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/ti_build/ospkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"liblz4-dev",
"libpng-dev",
"libssl-dev",
"libtinfo-dev",
"libncurses-dev",
"libwayland-dev",
"libx11-xcb-dev",
"libxcb-dri3-dev",
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/scripts/ti_build/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,23 @@


# -- code --
def setup_mambaforge(prefix):
def setup_miniforge(prefix):
u = platform.uname()
if u.system == "Linux":
url = "https://github.com/conda-forge/miniforge/releases/download/23.1.0-1/Mambaforge-23.1.0-1-Linux-x86_64.sh"
if (u.system, u.machine) == ("Linux", "x86_64"):
url = "https://github.com/conda-forge/miniforge/releases/download/25.3.0-1/Miniforge3-25.3.0-1-Linux-x86_64.sh"
download_dep(url, prefix, args=["-bfp", str(prefix)])
elif (u.system, u.machine) in (("Linux", "arm64"), ("Linux", "aarch64")):
url = "https://github.com/conda-forge/miniforge/releases/download/25.3.0-1/Miniforge3-25.3.0-1-Linux-aarch64.sh"
download_dep(url, prefix, args=["-bfp", str(prefix)])
elif (u.system, u.machine) == ("Darwin", "arm64"):
url = "https://github.com/conda-forge/miniforge/releases/download/23.1.0-1/Mambaforge-23.1.0-1-MacOSX-arm64.sh"
url = "https://github.com/conda-forge/miniforge/releases/download/25.3.0-1/Miniforge3-25.3.0-1-MacOSX-arm64.sh"
download_dep(url, prefix, args=["-bfp", str(prefix)])
elif (u.system, u.machine) == ("Darwin", "x86_64"):
url = "https://github.com/conda-forge/miniforge/releases/download/23.1.0-1/Mambaforge-23.1.0-1-MacOSX-x86_64.sh"
url = "https://github.com/conda-forge/miniforge/releases/download/25.3.0-1/Miniforge3-25.3.0-1-MacOSX-x86_64.sh"
download_dep(url, prefix, args=["-bfp", str(prefix)])
elif u.system == "Windows":
url = (
"https://github.com/conda-forge/miniforge/releases/download/23.1.0-1/Mambaforge-23.1.0-1-Windows-x86_64.exe"
"https://github.com/conda-forge/miniforge/releases/download/25.3.0-1/Miniforge3-25.3.0-1-Windows-x86_64.exe"
)
download_dep(
url,
Expand Down Expand Up @@ -82,8 +85,8 @@ def setup_python(version: str) -> Tuple[Command, Command]:

windows = platform.system() == "Windows"

prefix = get_cache_home() / "mambaforge"
setup_mambaforge(prefix)
prefix = get_cache_home() / "miniforge"
setup_miniforge(prefix)

if windows:
conda_path = prefix / "Scripts" / "conda.exe"
Expand All @@ -92,9 +95,9 @@ def setup_python(version: str) -> Tuple[Command, Command]:

if not conda_path.exists():
shutil.rmtree(prefix, ignore_errors=True)
setup_mambaforge(prefix)
setup_miniforge(prefix)
if not conda_path.exists():
raise RuntimeError(f"Failed to setup mambaforge at {prefix}")
raise RuntimeError(f"Failed to setup miniforge at {prefix}")

conda = sh.bake(str(conda_path))

Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/scripts/ti_build/sccache.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,16 @@ def setup_sccache() -> Command:
raise RuntimeError(f"Unsupported platform: {u.system} {u.machine}")

if not exe.exists():
if u.system == "Linux":
url = "https://github.com/mozilla/sccache/releases/download/v0.4.1/sccache-v0.4.1-x86_64-unknown-linux-musl.tar.gz"
if (u.system, u.machine) == ("Linux", "x86_64"):
url = "https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz"
elif (u.system, u.machine) in (("Linux", "arm64"), ("Linux", "aarch64")):
url = "https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-aarch64-unknown-linux-musl.tar.gz"
elif (u.system, u.machine) == ("Darwin", "arm64"):
url = (
"https://github.com/mozilla/sccache/releases/download/v0.4.1/sccache-v0.4.1-aarch64-apple-darwin.tar.gz"
)
url = "https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-aarch64-apple-darwin.tar.gz"
elif (u.system, u.machine) == ("Darwin", "x86_64"):
url = (
"https://github.com/mozilla/sccache/releases/download/v0.4.1/sccache-v0.4.1-x86_64-apple-darwin.tar.gz"
)
url = "https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-apple-darwin.tar.gz"
elif u.system == "Windows":
url = "https://github.com/mozilla/sccache/releases/download/v0.4.1/sccache-v0.4.1-x86_64-pc-windows-msvc.tar.gz"
url = "https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-pc-windows-msvc.tar.gz"
else:
raise RuntimeError(f"Unsupported platform: {u.system} {u.machine}")

Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/scripts/ti_build/vulkan.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# -*- coding: utf-8 -*-

# -- stdlib --
Expand All @@ -12,23 +13,32 @@


# -- code --
@banner("Setup Vulkan 1.3.236.0")
@banner("Setup Vulkan 1.4.313.0")
def setup_vulkan():
u = platform.uname()
if u.system == "Linux":
url = "https://sdk.lunarg.com/sdk/download/1.3.236.0/linux/vulkansdk-linux-x86_64-1.3.236.0.tar.gz"
prefix = get_cache_home() / "vulkan-1.3.236.0"
url = "https://sdk.lunarg.com/sdk/download/1.4.313.0/linux/vulkansdk-linux-x86_64-1.4.313.0.tar.xz"
prefix = get_cache_home() / "vulkan-1.4.313.0"
download_dep(url, prefix, strip=1)
sdk = prefix / "x86_64"
os.environ["VULKAN_SDK"] = str(sdk)
path_prepend("PATH", sdk / "bin")
path_prepend("LD_LIBRARY_PATH", sdk / "lib")
os.environ["VK_LAYER_PATH"] = str(sdk / "etc" / "vulkan" / "explicit_layer.d")
elif (u.system, u.machine) in (("Linux", "arm64"), ("Linux", "aarch64")):
url = "https://github.com/johnnynunez/vulkan-sdk-arm/releases/download/1.4.313.0/vulkansdk-linux-arm64-ubuntu-24.04-arm-1.4.313.0.zip"
prefix = get_cache_home() / "vulkan-1.4.313.0"
download_dep(url, prefix, strip=1)
sdk = prefix / "arm64"
os.environ["VULKAN_SDK"] = str(sdk)
path_prepend("PATH", sdk / "bin")
path_prepend("LD_LIBRARY_PATH", sdk / "lib")
os.environ["VK_LAYER_PATH"] = str(sdk / "etc" / "vulkan" / "explicit_layer.d")
# elif (u.system, u.machine) == ("Darwin", "arm64"):
# elif (u.system, u.machine) == ("Darwin", "x86_64"):
elif (u.system, u.machine) == ("Windows", "AMD64"):
url = "https://sdk.lunarg.com/sdk/download/1.3.236.0/windows/VulkanSDK-1.3.236.0-Installer.exe"
prefix = get_cache_home() / "vulkan-1.3.236.0"
url = "https://sdk.lunarg.com/sdk/download/1.4.313.0/windows/VulkanSDK-1.4.313.0-Installer.exe"
prefix = get_cache_home() / "vulkan-1.4.313.0"
download_dep(
url,
prefix,
Expand All @@ -53,3 +63,4 @@ def setup_vulkan():
path_prepend("PATH", prefix / "Bin")
else:
return

2 changes: 1 addition & 1 deletion external/DirectX-Headers
Submodule DirectX-Headers updated 49 files
+6 −0 .github/dependabot.yml
+57 −0 .github/workflows/codeql.yml
+95 −0 .github/workflows/main.yml
+53 −0 .github/workflows/msvc.yml
+63 −0 .github/workflows/uwp.yml
+42 −0 .github/workflows/wsl.yml
+43 −17 CMakeLists.txt
+55 −18 CMakePresets.json
+10 −0 CODE_OF_CONDUCT.md
+41 −41 SECURITY.md
+10 −0 cmake/DirectX-Headers.pc.in
+23 −0 cmake/JoinPaths.cmake
+1 −0 googletest/CMakeLists.txt
+41 −0 googletest/MockDevice.hpp
+13 −0 googletest/meson.build
+2,634 −0 include/directx/D3D12TokenizedProgramFormat.hpp
+2,651 −0 include/directx/DirectML.h
+15,495 −8,837 include/directx/d3d12.h
+814 −105 include/directx/d3d12.idl
+164 −4 include/directx/d3d12compatibility.h
+9 −1 include/directx/d3d12compatibility.idl
+182 −16 include/directx/d3d12sdklayers.h
+101 −6 include/directx/d3d12sdklayers.idl
+6 −2 include/directx/d3d12shader.h
+796 −65 include/directx/d3d12video.h
+752 −66 include/directx/d3d12video.idl
+18 −1 include/directx/d3dcommon.h
+27 −0 include/directx/d3dcommon.idl
+10 −5,476 include/directx/d3dx12.h
+192 −0 include/directx/d3dx12_barriers.h
+1,138 −0 include/directx/d3dx12_check_feature_support.h
+1,537 −0 include/directx/d3dx12_core.h
+12 −0 include/directx/d3dx12_default.h
+1,497 −0 include/directx/d3dx12_pipeline_state_stream.h
+128 −0 include/directx/d3dx12_property_format_table.h
+105 −0 include/directx/d3dx12_render_pass.h
+603 −0 include/directx/d3dx12_resource_helpers.h
+1,227 −0 include/directx/d3dx12_root_signature.h
+2,210 −0 include/directx/d3dx12_state_object.h
+184 −3 include/directx/dxcore_interface.h
+1 −0 include/directx/dxgicommon.idl
+2 −0 include/directx/dxgiformat.h
+2 −0 include/directx/dxgiformat.idl
+2 −0 include/dxguids/dxguids.h
+33 −4 meson.build
+2,600 −0 src/d3dx12_property_format_table.cpp
+10 −1 test/CMakeLists.txt
+35 −33 test/feature_check_test.cpp
+11 −5 test/meson.build
2 changes: 1 addition & 1 deletion external/PicoSHA2
2 changes: 1 addition & 1 deletion external/SPIRV-Cross
Submodule SPIRV-Cross updated 1218 files
2 changes: 1 addition & 1 deletion external/SPIRV-Headers
Submodule SPIRV-Headers updated 68 files
+10 −0 .github/dependabot.yml
+97 −1 .github/workflows/presubmit.yml
+2 −0 .gitignore
+9 −1 BUILD.bazel
+2 −1 BUILD.gn
+30 −100 CMakeLists.txt
+79 −1 LICENSE
+8 −0 MODULE.bazel
+1 −1 README.md
+13 −0 SECURITY.md
+0 −4 cmake/Config.cmake.in
+1 −2 cmake/SPIRV-Headers.pc.in
+0 −4 example/CMakeLists.txt
+35 −12 include/spirv/spir-v.xml
+1 −1 include/spirv/unified1/AMD_gcn_shader.h
+1 −1 include/spirv/unified1/AMD_shader_ballot.h
+1 −1 include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h
+1 −1 include/spirv/unified1/AMD_shader_trinary_minmax.h
+1 −1 include/spirv/unified1/DebugInfo.h
+1 −1 include/spirv/unified1/GLSL.std.450.h
+16 −2 include/spirv/unified1/NonSemanticClspvReflection.h
+50 −0 include/spirv/unified1/NonSemanticDebugBreak.h
+1 −1 include/spirv/unified1/NonSemanticDebugPrintf.h
+1 −1 include/spirv/unified1/NonSemanticShaderDebugInfo100.h
+57 −0 include/spirv/unified1/NonSemanticVkspReflection.h
+1 −1 include/spirv/unified1/OpenCL.std.h
+1 −1 include/spirv/unified1/OpenCLDebugInfo100.h
+144 −144 include/spirv/unified1/extinst.debuginfo.grammar.json
+121 −121 include/spirv/unified1/extinst.glsl.std.450.grammar.json
+84 −2 include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json
+9 −0 include/spirv/unified1/extinst.nonsemantic.debugbreak.grammar.json
+1 −1 include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json
+175 −175 include/spirv/unified1/extinst.nonsemantic.shader.debuginfo.100.grammar.json
+138 −0 include/spirv/unified1/extinst.nonsemantic.vkspreflection.grammar.json
+166 −166 include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json
+277 −277 include/spirv/unified1/extinst.opencl.std.100.grammar.json
+2 −2 include/spirv/unified1/extinst.spv-amd-gcn-shader.grammar.json
+8 −8 include/spirv/unified1/extinst.spv-amd-shader-ballot.grammar.json
+2 −2 include/spirv/unified1/extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json
+27 −27 include/spirv/unified1/extinst.spv-amd-shader-trinary-minmax.grammar.json
+511 −3 include/spirv/unified1/spirv.bf
+9,842 −6,823 include/spirv/unified1/spirv.core.grammar.json
+511 −3 include/spirv/unified1/spirv.cs
+2,505 −6 include/spirv/unified1/spirv.h
+2,525 −6 include/spirv/unified1/spirv.hpp
+2,565 −46 include/spirv/unified1/spirv.hpp11
+454 −11 include/spirv/unified1/spirv.json
+490 −3 include/spirv/unified1/spirv.lua
+433 −3 include/spirv/unified1/spirv.py
+511 −3 include/spirv/unified1/spv.d
+54 −0 tests/CMakeLists.txt
+37 −0 tests/example.c
+9 −5 tests/example.cpp
+41 −0 tests/example11.cpp
+23 −0 tests/find_package/CMakeLists.txt
+23 −0 tests/pkg_config/CMakeLists.txt
+1 −1 tools/buildHeaders/CMakeLists.txt
+2 −2 tools/buildHeaders/bin/generate_language_headers.py
+2 −0 tools/buildHeaders/bin/makeExtinstHeaders.py
+2 −0 tools/buildHeaders/bin/makeHeaders
+121 −65 tools/buildHeaders/header.cpp
+1 −1 tools/buildHeaders/header.h
+331 −16 tools/buildHeaders/jsonToSpirv.cpp
+38 −16 tools/buildHeaders/jsonToSpirv.h
+7 −7 tools/buildHeaders/jsoncpp/dist/json/json-forwards.h
+9 −9 tools/buildHeaders/jsoncpp/dist/json/json.h
+8 −8 tools/buildHeaders/jsoncpp/dist/jsoncpp.cpp
+1 −1 tools/buildHeaders/main.cpp
2 changes: 1 addition & 1 deletion external/SPIRV-Reflect
2 changes: 1 addition & 1 deletion external/SPIRV-Tools
Submodule SPIRV-Tools updated 577 files
2 changes: 1 addition & 1 deletion external/backward_cpp
Submodule backward_cpp updated 1 files
+37 −3 backward.hpp
2 changes: 1 addition & 1 deletion external/eigen
Submodule eigen updated from 0fd6b4 to 5e8edd
2 changes: 1 addition & 1 deletion external/glfw
Submodule glfw updated 120 files
2 changes: 1 addition & 1 deletion external/glm
Submodule glm updated 1690 files
2 changes: 1 addition & 1 deletion external/googletest
Submodule googletest updated 251 files
2 changes: 1 addition & 1 deletion external/imgui
Submodule imgui updated 232 files
2 changes: 1 addition & 1 deletion external/spdlog
Submodule spdlog updated 64 files
+26 −18 .github/workflows/linux.yml
+38 −0 .github/workflows/macos.yml
+148 −0 .github/workflows/windows.yml
+154 −113 CMakeLists.txt
+22 −10 README.md
+1 −1 bench/async_bench.cpp
+2 −2 bench/bench.cpp
+13 −2 cmake/utils.cmake
+14 −4 example/example.cpp
+5 −7 include/spdlog/async_logger-inl.h
+2 −2 include/spdlog/cfg/env.h
+1 −6 include/spdlog/common.h
+2 −1 include/spdlog/details/file_helper-inl.h
+3 −3 include/spdlog/details/mpmc_blocking_q.h
+17 −4 include/spdlog/details/os-inl.h
+4 −0 include/spdlog/details/os.h
+3 −8 include/spdlog/details/thread_pool-inl.h
+3 −14 include/spdlog/details/thread_pool.h
+1 −1 include/spdlog/fmt/bin_to_hex.h
+74 −89 include/spdlog/fmt/bundled/args.h
+2,962 −0 include/spdlog/fmt/bundled/base.h
+664 −566 include/spdlog/fmt/bundled/chrono.h
+94 −127 include/spdlog/fmt/bundled/color.h
+96 −92 include/spdlog/fmt/bundled/compile.h
+4 −2,968 include/spdlog/fmt/bundled/core.h
+332 −61 include/spdlog/fmt/bundled/format-inl.h
+1,374 −1,665 include/spdlog/fmt/bundled/format.h
+0 −2 include/spdlog/fmt/bundled/locale.h
+122 −150 include/spdlog/fmt/bundled/os.h
+63 −142 include/spdlog/fmt/bundled/ostream.h
+185 −227 include/spdlog/fmt/bundled/printf.h
+354 −242 include/spdlog/fmt/bundled/ranges.h
+330 −141 include/spdlog/fmt/bundled/std.h
+192 −78 include/spdlog/fmt/bundled/xchar.h
+4 −0 include/spdlog/mdc.h
+20 −4 include/spdlog/pattern_formatter-inl.h
+12 −6 include/spdlog/sinks/ansicolor_sink-inl.h
+5 −4 include/spdlog/sinks/ansicolor_sink.h
+4 −4 include/spdlog/sinks/base_sink.h
+6 −0 include/spdlog/sinks/basic_file_sink-inl.h
+1 −0 include/spdlog/sinks/basic_file_sink.h
+1 −1 include/spdlog/sinks/callback_sink.h
+2 −0 include/spdlog/sinks/daily_file_sink.h
+5 −6 include/spdlog/sinks/dup_filter_sink.h
+2 −0 include/spdlog/sinks/hourly_file_sink.h
+1 −1 include/spdlog/sinks/msvc_sink.h
+1 −1 include/spdlog/sinks/null_sink.h
+7 −1 include/spdlog/sinks/rotating_file_sink-inl.h
+1 −0 include/spdlog/sinks/rotating_file_sink.h
+5 −4 include/spdlog/sinks/stdout_sinks-inl.h
+3 −2 include/spdlog/sinks/syslog_sink.h
+7 −0 include/spdlog/tweakme.h
+2 −2 include/spdlog/version.h
+16 −10 src/bundled_fmtlib_format.cpp
+6 −7 tests/CMakeLists.txt
+6 −1 tests/includes.h
+0 −44 tests/test_async.cpp
+9 −0 tests/test_cfg.cpp
+2 −1 tests/test_custom_callbacks.cpp
+3 −5 tests/test_daily_logger.cpp
+40 −0 tests/test_file_logging.cpp
+55 −2 tests/test_misc.cpp
+28 −0 tests/test_pattern_formatter.cpp
+2 −1 tests/test_sink.h
5 changes: 4 additions & 1 deletion python/taichi/_version_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ def check_version(cur_uuid):
payload = {"version": version, "platform": "", "python": ""}

system = platform.system()
if system == "Linux":
u = platform.uname()
if (u.system, u.machine) == ("Linux", "x86_64"):
payload["platform"] = "manylinux_2_27_x86_64"
elif (u.system, u.machine) in (("Linux", "arm64"), ("Linux", "aarch64")):
payload["platform"] = "manylinux_2_27_aarch64"
elif system == "Windows":
payload["platform"] = "win_amd64"
elif system == "Darwin":
Expand Down
2 changes: 1 addition & 1 deletion taichi/analysis/verify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class IRVerifier : public BasicStmtVisitor {
} else if (!stmt->has_body() && stmt->body) {
TI_ERROR("offloaded {} ({})->body is {} (should be nullptr)",
offloaded_task_type_name(stmt->task_type), stmt->name(),
fmt::ptr(stmt->body));
fmt::ptr(stmt->body.get()));
}
stmt->all_blocks_accept(this);
}
Expand Down
1 change: 1 addition & 0 deletions taichi/common/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
// before including "spdlog/fmt/fmt.h"
#include "spdlog/common.h"
#include "spdlog/fmt/fmt.h"
#include "spdlog/fmt/ranges.h"
namespace spdlog {
class logger;
}
Expand Down
13 changes: 9 additions & 4 deletions taichi/ui/ggui/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ Gui::Gui(AppContext *app_context, SwapChain *swap_chain, TaichiWindow *window) {

void Gui::init_render_resources(VkRenderPass render_pass) {
ImGui_ImplVulkan_LoadFunctions(
load_vk_function_for_gui); // this is because we're using volk.
VK_API_VERSION_1_0, // or app_context_->config.vk_api_version
load_vk_function_for_gui, // this is because we're using volk.
nullptr);

auto &device =
static_cast<taichi::lang::vulkan::VulkanDevice &>(app_context_->device());
Expand All @@ -60,7 +62,9 @@ void Gui::init_render_resources(VkRenderPass render_pass) {
init_info.Allocator = VK_NULL_HANDLE;
init_info.MinImageCount = swap_chain_->surface().get_image_count();
init_info.ImageCount = swap_chain_->surface().get_image_count();
ImGui_ImplVulkan_Init(&init_info, render_pass);
// new signature takes only the struct
init_info.RenderPass = render_pass;
ImGui_ImplVulkan_Init(&init_info);
render_pass_ = render_pass;

// Upload Fonts
Expand All @@ -73,10 +77,11 @@ void Gui::init_render_resources(VkRenderPass render_pass) {
->vk_command_buffer()
->buffer;

ImGui_ImplVulkan_CreateFontsTexture(command_buffer);
// ≥ 1.90: the helper records its own commands
ImGui_ImplVulkan_CreateFontsTexture();

stream->submit_synced(cmd_list.get());
ImGui_ImplVulkan_DestroyFontUploadObjects();
ImGui_ImplVulkan_DestroyFontsTexture();
}

prepare_for_next_frame();
Expand Down