Skip to content

GPU generates black image on Adreno 618/660 (Android/Termux) #41

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

Open
knyipab opened this issue Mar 13, 2022 · 1 comment
Open

GPU generates black image on Adreno 618/660 (Android/Termux) #41

knyipab opened this issue Mar 13, 2022 · 1 comment

Comments

@knyipab
Copy link

knyipab commented Mar 13, 2022

Thanks a lot for porting this RIFE to ncnn! I recently tried to use this project on Termux/Android.

rife-ncnn-vulkan generates black image using GPU while perfect running CPU (rife-ncnn-vulkan -g -1). Tested on Adreno 505, 618 and 660 Android (Termux) against your images/ files (and other jpg). Nothing insightful from its terminal output (even with -v).

CPU (-g -1) GPU
Adreno 550 successful, correct output image failed with vkCreateComputePiplines failed 5
Adreno 618 successful, correct output image black image
Adreno 660 successful, correct output image black image

Adreno 550 seems to have buggy driver. The others' GPU seems to do its work, as they freeze the screen somehow.

FYI, here's how I setup wtih Termux,

  1. unzip ncnn-20220216-android-vulkan-shared.zip and install the lib/cmake/include with ln -s
  2. unzip ncnn-20220216-android-vulkan.zip (to prepare glslang objects)
  3. pkg install libwebp vulkan-header vulkan-loader-android
  4. cmake ../src -DUSE_SYSTEM_NCNN=ON -DUSE_SYSTEM_WEBP=ON -DVulkan_LIBRARY="/system/lib64/libvulkan.so" -DGLSLANG_TARGET_DIR="<path-to-glslang-directory>"

I also tested my setup against waifu2x-ncnn-vulkan (GPU, 2x) which works fine on Adreno 618 and 660. Any clues on what's wrong in rife-ncnn-vulkan?

感谢大神!!

@910514
Copy link

910514 commented Jan 23, 2024

Hi, I discovered that compiling together with the "mini Vulkan SDK" composed of glslc and glslangValidator may resolve the black screen issue.However, I found that enabling -x in rife-ncnn-vulkan is a way to avoid the black screen.
Below are reference urls and compiled file.
rife-ncnn-vulkan.zip
tanyiok1234/waifu2x_srmd-ncnn-vulkan-termux-binary#3
https://xyx.moe/010-Build-waifu2x-ncnn-vulkan-in-termux.html
glslc binary file from
https://github.com/lzhiyong/termux-ndk/tree/android-ndk
This line suggests to me that the Vulkan SDK may not be complete
-- Found Vulkan: /system/lib64/libvulkan.so (found version "1.3.275") missing components: glslc glslangValidator
when build with "mini Vulkan SDK"
-- Found Vulkan: /system/lib64/libvulkan.so (found version "1.3.275") found components: glslc glslangValidator

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