-
Notifications
You must be signed in to change notification settings - Fork 410
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
vkBindImageMemory validation error when exporting an Android HardwareBuffer #2004
Comments
Just confirming, what version of the Validation Layers you are using? There has been some recent fixes to AHB and want to make sure you aren't using an older version where this might have been fixed |
How to determine the version? I am using whatever NDK 21.0.6113669 includes. I don't see any version info in the logs. I believe this is what the NDK includes https://android.googlesource.com/platform/external/vulkan-validation-layers/+/691254d74159549cf5ef8d2a69bb02c062b28a0c. |
NDK 21.0.6113669 is good enough, something I could look up, but those are not as up to date (to my knowledge without looking) as https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases/tag/sdk-1.2.141.0 (or Top of tree), but idk if Also just as a sanity check, if you are trying to create an
Sorry for thinking out loud, but we don't have a Positive Test to check ... when I find time later today, I will write some AHB positive test to confirm this case as you might have found a bug with how |
I am missing the VkExternalMemoryImageCreateInfo part. Will try that and also top-of-the-tree validation layer. Thank you. |
We added the following but still the same validation error:
|
Built the validation layer off master and still getting it. |
Ok, for now, assume its a false positive from the Validation Layers, I will take on looking into this more |
So wrote two positive tests for exporting AHB, indeed hit same error with I added simple patch to fix it and will get PR soon as possible. |
Passing VkExportMemoryAllocateInfo and handleType VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID to vkAllocateMemory.
The subsequent vkBindImageMemory call produces this error:
If VkMemoryAllocateInfo.allocationSize is set to anything other than 0 the previous error goes away but then this one pops up:
The text was updated successfully, but these errors were encountered: