Hello,
I'm currently developing an Android App that uses the Android Studio NDK's Vulkan library.
I've been trying to test my code on a Samsung SM-T510 Tablet (with an ARM Mali G71), it seems like it's having an issue with one of the Vulkan function calls.
The device has no problem calling functions for enumerating physical devices, creating an instance, devices, and buffers.
However, calling vkCreateComputePipeline is returning an error code. (VK_ERROR_INITIALIZATION_FAILED)
I have tried running with both sample and empty kernel code but the issue was still there.
Is there anything that I need to do to enable compute pipelines? Or does this device don't support compute pipelines in the first place?
If it helps, the app is currently on GitHub: the high-level functionality is here:
https://github.com/MangoShip/LitmusTestAndroid/blob/main/app/src/main/cpp/native-lib.cpp
The Vulkan calls are wrapped in "easyvk" library, and the problematic line is here:
https://github.com/MangoShip/LitmusTestAndroid/blob/6b0cb391d7ddc5b04cb2ed9df3b4ed8e7f181cd2/app/src/main/cpp/easyvk/easyvk.cpp#L346
Here is a couple of additional things that I've tried:
Notes:
Thank you!
Hi Mingun Cho,
Please fix you code, anybody can't test your application because you use local path to your spir-v shaders.
Add shaders to assets directory and use Android Asset Manager to load resources
Thank you for trying out the app!
If you check the latest commit of the Github repo, I have resolved the issue that you mentioned. When the app gets launched, all the spir-v shader files should be copied to your local device. Now, the app should be able to use those spir-v shader files to call Vulkan functions.
Please let me know if you experience any other issues.
hi Mingun Cho I can reproduce on Realme Narzo 30 5G with Android 11 and Mali G57 GPU
It is working on Motorola G9 Play with Android 11 and Adreno 610, vect_add_output.txt:
BEFORE: Storing 0 in a[0] Loading a[0]:0 Storing 1 in b[0] Loading b[0]:1 Storing 0 in c[0] Loading c[0]:0 Storing 1 in a[1] Loading a[1]:1 Storing 2 in b[1] Loading b[1]:2 Storing 0 in c[1] Loading c[1]:0 Storing 2 in a[2] Loading a[2]:2 Storing 3 in b[2] Loading b[2]:3 Storing 0 in c[2] Loading c[2]:0 Storing 3 in a[3] Loading a[3]:3 Storing 4 in b[3] Loading b[3]:4 Storing 0 in c[3] Loading c[3]:0 AFTER: a[0]:0 b[0]:1 c[0]:1 a[1]:1 b[1]:2 c[1]:3 a[2]:2 b[2]:3 c[2]:5 a[3]:3 b[3]:4 c[3]:7
It's great to hear you were able to reproduce the issue; let me know if you have any ideas on why it's not working on the ARM GPU or if you'd like me to run any more experiments on my end. Thanks again for your help.
Mingun Cho, first of all, please enable Vulkan Validation Layers usage https://github.com/MangoShip/LitmusTestAndroid/blob/76822ad422ca25db0b297a96ec740506316bf18a/app/src/main/cpp/test.cpp#L17
May be We could see some validation error messages.
I have tried running the tests with Vulkan Validation Layers enabled. However, I wasn't able to see any difference from debug output between the device that executes the code correctly (Qualcomm Adreno 610) and the device that does not. (ARM Mali G71)
I have also examined the different feature sets for both devices using AIDA64. From reading the documentation for differing features, I wasn't able to think of any features I'm using that aren't supported. I have uploaded screenshots of feature sets for both devices here.
Hi Mingun Cho, Try PowerVR GPU, Also We need to ask ARM Mali experts.