Skip to content
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

[vulkan] Set kApiVersion to VK_API_VERSION_1_3 #4958

Closed
wants to merge 1 commit into from

Conversation

quadpixels
Copy link
Contributor

This change fixes issue #4900. On certain AMD GPUs (such as RX 5500), the Vullkan version needs to be 1.3 in order for Volk to correctly populate the "vkGetDeviceBufferMemoryRequirements" function pointer. If the version is 1.2, the pointer will be NULL and cause an assertion failure.

Tested by running the voxel challenge program and see the program working as expected on a Windows PC.

According to the manual page, this function appears to be from Vulkan 1.3, and as such I guess kApiVersion would need to be set to 1.3 as well. I'm not sure if this means legacy devices would be excluded?

Related issue = #4900 #4951

This change fixes issue taichi-dev#4900. On certain AMD GPUs (such as RX 5500),
the Vullkan version needs to be 1.3 in order for Volk to correctly populate
the "vkGetDeviceBufferMemoryRequirements" function pointer. If the
version is 1.2, the pointer will be NULL and cause an assertion failure.

Tested by running the voxel challenge program and see the program
working as expected on a Windows PC.
@netlify
Copy link

netlify bot commented May 11, 2022

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit a5032c0
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/627b69a54018a50009c6de7f
😎 Deploy Preview https://deploy-preview-4958--docsite-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@k-ye
Copy link
Member

k-ye commented May 11, 2022

Thanks! But what's the implication of this for Vk1.2 users? Note that the majority of our CI bots are still running 1.2. Ideally we should not hardcode this one, and configure it via env var or ti.init or something.

@quadpixels quadpixels closed this May 11, 2022
@quadpixels
Copy link
Contributor Author

Yes this is a valid concern. I guess the right fix would be in the vulkan_device.cpp plus the version flag, and I'm not very familiar with that part yet.

I think this PR has served its purpose in asking the question about the version and can be closed and be superseded by a better solution.

@quadpixels quadpixels deleted the kapiversion branch May 11, 2022 08:15
@k-ye
Copy link
Member

k-ye commented May 11, 2022

It's good to know that this simple change fixes the problem on AMD GPUs, thanks!

@turbo0628
Copy link
Member

I also encountered similar problem on 6900XT, which crashes on vmaCreateAllocator. This patch can also fix my problem. Thanks!

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.

3 participants