Skip to content

Update vulkan-memory-allocator-hpp to v3.3.0#9062

Open
Stehsaer wants to merge 2 commits intoxmake-io:devfrom
Stehsaer:update-vma-hpp
Open

Update vulkan-memory-allocator-hpp to v3.3.0#9062
Stehsaer wants to merge 2 commits intoxmake-io:devfrom
Stehsaer:update-vma-hpp

Conversation

@Stehsaer
Copy link
Copy Markdown
Contributor

Update vulkan-memory-allocator-hpp to v3.3.0. See https://github.com/YaaZ/VulkanMemoryAllocator-Hpp/releases/tag/v3.3.0%2B2

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @Stehsaer, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the vulkan-memory-allocator-hpp dependency to its latest version, 3.3.0. This ensures that projects utilizing this package benefit from the most recent features, performance improvements, and bug fixes provided by the upstream library, maintaining compatibility and leveraging the latest advancements in Vulkan memory management.

Highlights

  • Dependency Update: The vulkan-memory-allocator-hpp package has been updated to version 3.3.0.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the vulkan-memory-allocator-hpp package to a new version. However, the specified version v3.3.0 is incorrect as the corresponding tag does not exist in the upstream repository. The correct version tag is v3.3.0+2. I have provided a review comment with a code suggestion to correct both the version string and its corresponding SHA256 hash. This is a critical fix to prevent build failures.

@luadebug
Copy link
Copy Markdown
Member

Well should be fine as it seems not affected by rule -- when adding a new sdk version, please ensure vulkan-headers, vulkan-hpp, vulkan-loader, vulkan-tools, vulkan-validationlayers, vulkan-utility-libraries, spirv-headers, spirv-reflect, spirv-tools, glslang and volk packages are updated simultaneously.

@SirLynix
Copy link
Copy Markdown
Member

yes it's fine as it's not tied to a specific Vulkan SDK version

@Stehsaer
Copy link
Copy Markdown
Contributor Author

Stehsaer commented Jan 11, 2026

We need to update all Vulkan-SDK related libraries to >=1.4.337 due to requirements specified here. Not sure about how to do that -- Shall we open a new PR for that?

@SirLynix
Copy link
Copy Markdown
Member

Looks like it, I can do it but I don't have the time to do it now

@luadebug
Copy link
Copy Markdown
Member

Well, too bad we do not have some scripts/update-vulkan.lua :D

@SirLynix
Copy link
Copy Markdown
Member

#9134

@SirLynix SirLynix closed this Jan 21, 2026
@SirLynix SirLynix reopened this Jan 21, 2026
@SirLynix
Copy link
Copy Markdown
Member

It looks like 32bits platforms are not supported

@Stehsaer
Copy link
Copy Markdown
Contributor Author

Stehsaer commented Feb 17, 2026

The error is caused by disabled VULKAN_HPP_TYPESAFE_CONVERSION macro defined by vulkan-hpp on 32-bit platforms.

Chain of cause

32-bit vulkan is not typesafe for non-dispatchable handles, so we don't allow copy constructors on this platform by default. To enable this feature on 32-bit platforms, #define VULKAN_HPP_TYPESAFE_CONVERSION 1. To disable this feature on 64-bit platforms, #define VULKAN_HPP_TYPESAFE_CONVERSION 0

-- https://github.com/KhronosGroup/Vulkan-Hpp/blob/main/README.md#vulkan_hpp_typesafe_conversion-

On 32-bit platforms, vulkan-hpp intentionally set VULKAN_HPP_TYPESAFE_CONVERSION to 0, which caused VULKAN_HPP_TYPESAFE_EXPLICIT to be set to explicit.

(https://github.com/KhronosGroup/Vulkan-Hpp/blob/6c620f38ddc954f25b8bb326e484fdbb70471f21/vulkan/vulkan_hpp_macros.hpp#L193)

#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
#  define VULKAN_HPP_TYPESAFE_EXPLICIT
#else
#  define VULKAN_HPP_TYPESAFE_EXPLICIT explicit
#endif

Looking at the conversion function at https://github.com/YaaZ/VulkanMemoryAllocator-Hpp/blob/d959558c033d7f5f3f5fb193df1693090c39f7ec/include/vk_mem_alloc_handles.hpp#L81:

VULKAN_HPP_TYPESAFE_EXPLICIT operator VmaAllocator() const VULKAN_HPP_NOEXCEPT {
  return m_allocator;
}

It's clear that VULKAN_HPP_TYPESAFE_EXPLICIT being explicit prohibits implicit conversion from vma::Allocator to VmaAllocator, explaining the error that vma::Allocator cannot be converted into VmaAllocator:

include\vk_mem_alloc_handles.hpp(1303): error C2664: 'void vmaDestroyImage(VmaAllocator,VkImage,VmaAllocation)': cannot convert argument 1 from 'OwnerType' to 'VmaAllocator'
        with
        [
            OwnerType=vma::Allocator
        ]

I think this is likely a bug of vulkan-memory-allocator-hpp, that it shouldn't rely on implicit conversion in its internal logic, where on 32-bit platform we dont have such implicit conversion function available. What do you think? Should we report this as an issue to vulkan-memory-allocator-hpp?

@SirLynix

@SirLynix
Copy link
Copy Markdown
Member

What do you think? Should we report this as an issue to vulkan-memory-allocator-hpp?

Yes indeed.

@Stehsaer
Copy link
Copy Markdown
Contributor Author

Stehsaer commented Mar 5, 2026

Status update:

The author of vulkan-memory-allocator-hpp has identified related bugs in vulkan-hpp and waiting for the changes to be synced to vulkan-headers. This suggests that the bugfix will only be available in the newer vulkan-sdk version, and we need to update vulkan-sdk again to support bug-fixed version of vulkan-memory-allocator-hpp.

See: YaaZ/VulkanMemoryAllocator-Hpp#82 (comment)

@YaaZ
Copy link
Copy Markdown

YaaZ commented Mar 6, 2026

Right, -DVULKAN_HPP_TYPESAFE_EXPLICIT=0/32-bit builds would only work since Vulkan headers v1.4.345 (released yesterday), so you probably need to update those too. VMA-Hpp have this fixed in v3.3.0+3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants