Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
22 changes: 17 additions & 5 deletions .github/workflows/scripts/ti_build/vulkan.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,35 @@


# -- code --
@banner("Setup Vulkan 1.3.236.0")
@banner("Setup Vulkan 1.4.309.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.309.0/linux/vulkansdk-linux-x86_64-1.4.309.0.tar.xz"
prefix = get_cache_home() / "vulkan-1.4.309.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.309.0/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesnt exist 😛 Your release is 1.4.304.1 right? https://github.com/johnnynunez/vulkan-sdk-arm/releases

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to upload new release

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"vulkansdk-linux-arm64-ubuntu-24.04-arm-1.4.309.0.zip"
)
prefix = get_cache_home() / "vulkan-1.4.309.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.309.0/windows/VulkanSDK-1.4.309.0-Installer.exe"
prefix = get_cache_home() / "vulkan-1.4.309.0"
download_dep(
url,
prefix,
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
Loading