-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 on Android: the frame isn't updating (ONLY THE FIRST FRAME IS RENDERED) #3242
Comments
I'm not going to investigate other repos. Repro has to be inside bgfx repo. |
Sorry but I really don't understand how to do that, bgfx repo don't have java files for Android, so I can't made something based 100% on bgfx repo, but you don't need to change the native cpp code, |
@MohammedKHC I'll take a look on my android device. I am curious myself about the platform support. Is there any newer version of this kind of project? It's unfortunate but this particular repo is 8 years old and only a single pull request to fix support for arm64. Since then Android has moved on. I checked the forks and nothing else. I found this: https://github.com/LightSun/bgfx-android about four years old. Will update. Noting to debug, it's worth putting some logs from your application that reflect the state of the bgfx layer or checkpoints in your own render loop. I agree, one would expect spinning cubes to spin. Also, you are saying GLES works fine on Android? |
Hi @truedat101, First sorry for the late response. I wasn't aware of the message.. |
Checking in on this, seems like there is an issue with Vulkan specifically not rendering properly. Using OpenGL ES on Android everything works fine, but the moment that I switch to Vulkan is just stops rendering after the first frame. @truedat101 have you had time to look into this? You should be able to just load up the examples provided and see it pretty quickly. |
I lost track of this thread. Let me see, I have a decent device to test test with. WIll kick the tires on this. |
Is there some different semi-modern supported repository for Android/BGFX activity/example applications? In the repo for bgfx we only have the library builds, but the notion of running the executable doesn't make sense unless this has been converted into a native activity somehow. I tried the other repo I referenced is ancient by 4 years, and doesn't build (not a bgfx issue, purely the always moving target of android/gradle). I'm willing to dig into this further but I'd like to start from a solid reference point. I did my build of the android versions of the bgfx library. |
I've been working on my own private repo for this on a VR game engine on Quest I'm building, but let me get a public repo sample you can use for this to make things easier. |
@GEMISIS what VK driver version is available in your target environment on Quest? |
There's an api call you can make to get at the details of the VK driver version. Let me figure out how I would do that on android/quest |
The answer isn't obvious. I looked through the MetaSDK stuff for OpenXR (I assume you are using that?) but I only see a reference to khronos/GL. However, we can assume it's possible to get at the regular android APIs and pull this information: https://developer.android.com/ndk/guides/graphics/getting-started (a bunch of points there if you scroll down to the vulkan api things). I assume one can get the api version, and then dig into whether there are issues in terms of bugs filed in the driver version. I don't know how Quest is handling it's API updates since this is a driver thing in the OS. |
I'll get my rig up to date and try to build against the quest xr samples to see if I can figure out the vulkan integration available. But in the meantime @GEMISIS if you have a good bgfx wrapper project you can share for Android, I'd like to start with that and test on some different devices. |
@GEMISIS it looks like from your screenshot it's VK driver 1.128.8775 (it's a bit blurry, it actually doesn't make sense ... so I am not sure if that's really the vulkan driver or not). If you can publish some source for your sample I can try it on my Quest and figure out the details and get it to dump some different information). |
I think that's the version of BGFX that was built actually, as I noticed that was there in both the OpenGL ES and Vulkan versions. Working on the Android version, but did not have as much time this past weekend as I thought I would. :/ |
That's bgfx version... Driver version is in log... |
I also have this issue, please let me know if I can help! In my case it seems to happen only on landscape, on portrait it renders properly. As soon as I rotate to landscape, it breaks again! |
This is most likely related to swapchain invalidation and not having a new one being created. It's a statebug in bgfx. Aurelius reported something similar on Discord. We have @GhoulDaggers saying this on Discord:
Unfortunately, having Discord next to Github causes some important information to be hidden behind an inconvenient Discord search and a login screen. I'm now reliably experiencing having only the first frame being rendered on Vulkan, until I resize the window, and I'll probably tackle this issue this week. The issue has reached high-priority on my todo list. |
Describe the bug
It seems like that only the first frame is rendered, but the game loop don't stop, please note that when using Opengl es every thing is working fine.
Please note that vulkan on Linux works fine the problem is on Android
To Reproduce
using https://github.com/Nodrev/bgfx-android-activity for android running
modify samples to use Vulkan backend;
choose the cube sample
you should notice that the cubes doesn't move
Expected behavior
Just work like opengl es.
MORE Context*
My device uses adreno and snap dragon and it's arm64
and i think maybe it has something with #2975
The text was updated successfully, but these errors were encountered: