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

Crash when using portability validation layer #334

Open
tuket opened this issue Apr 28, 2023 · 2 comments
Open

Crash when using portability validation layer #334

tuket opened this issue Apr 28, 2023 · 2 comments

Comments

@tuket
Copy link

tuket commented Apr 28, 2023

I have a simple vulkan app that uses VMA, and runs fine as I run it normally on my PC.
However, I wanted to validate if it would work in Android devices.

For that, I'm using the Portability layer along with the "VP_Android_baseline_2021.json" configuration.
image

When using that layer, the application crashes inside VMA when calling vkGetBufferMemoryRequirements2KHR.
The function pointer itself is not null, but it ends up calling a null pointer internally.

image

My code is available in this repo.

@adam-sawicki-a
Copy link
Contributor

Please experiment with various methods of importing Vulkan functions as described here:
https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/quick_start.html#quick_start_initialization
To make sure pointers to Vulkan functions are imported correctly.

Please also make sure VMA_ASSERT macro is not empty, so that problems are reported correctly.

@tuket
Copy link
Author

tuket commented Apr 28, 2023

Hello!

Please also make sure VMA_ASSERT macro is not empty, so that problems are reported correctly

Not empty.

Please experiment with various methods of importing Vulkan functions as described here:
https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/quick_start.html#quick_start_initialization
To make sure pointers to Vulkan functions are imported correctly.

I was using Vulkan 1.1, if I use Vulkan 1.0 the crash doesn't happen anymore.
This is because the "VP_Android_baseline_2021.json" configuration supports 1.0 only. I have tried to use vkEnumerateInstanceVersion to find out the max supported version and create the instance considering that. However, that doesn't work because the "instance" layer is not active before creating the instance. Not sure what to do about this.

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

No branches or pull requests

2 participants