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

Android/Quest suboptimal swapchain error #74963

Closed
BastiaanOlij opened this issue Mar 15, 2023 · 5 comments · Fixed by #84244
Closed

Android/Quest suboptimal swapchain error #74963

BastiaanOlij opened this issue Mar 15, 2023 · 5 comments · Fixed by #84244
Milestone

Comments

@BastiaanOlij
Copy link
Contributor

Godot version

4.0.stabl

System information

Android - Meta Quest 2

Issue description

When running a project on a Quest 2 using the Vulkan renderer (I believe there is no difference between mobile and clustered Vulkan renderer) the log gets filled with these repeated errors:

Vulkan: Early out of date swapchain, recreating.
Vulkan queue submit: Swapchain is suboptimal.
Vulkan: Early out of date swapchain, recreating.
Vulkan queue submit: Swapchain is suboptimal.

While discovered on the Quest this issue may not be limited to this device.

Need to investigate the origin of these errors. My current theory is that this may be the swap chain the renderer creates by default for outputting to screen. This swap chain is unused (as when using XR the XR Runtime is responsible for output to the device) but still maintained.

Steps to reproduce

Run a project on a Meta Quest (2)

Minimal reproduction project

The demo in XR tools can be used for this: https://github.com/GodotVR/godot-xr-tools

@BastiaanOlij BastiaanOlij added this to the 4.1 milestone Mar 15, 2023
@BastiaanOlij
Copy link
Contributor Author

@szymonm-google , Fredia asked me to tag you in this, possibly something the Android team could shine a spotlight on?

@rbessems , is this familiar to your team? At face value this may be caused by the default swapchain we're creating as part of the display server, for which we're working on #74754. I haven't had time to continue on that as I'm focused on GDC atm.

@szymonm-google
Copy link
Contributor

szymonm-google commented Mar 15, 2023 via email

@zhangyiwei
Copy link

This would help: https://android-developers.googleblog.com/2020/02/handling-device-orientation-efficiently.html

Vulkan game engine on Android mobile platform needs to handle device pre-rotation explicitly for the optimal and stable performance.

@BastiaanOlij
Copy link
Contributor Author

This would help: https://android-developers.googleblog.com/2020/02/handling-device-orientation-efficiently.html

Vulkan game engine on Android mobile platform needs to handle device pre-rotation explicitly for the optimal and stable performance.

That would underline my theory that this is due to the default swap chain we're creating and that really shouldn't be used anymore in an XR environment. The device rotation is no longer a factor when we're dealing with a Quest or other XR device.

@BastiaanOlij
Copy link
Contributor Author

Just copying in a reaction from @clayjohn on the Contributors chat

I've already made a PR to fix that godot#72859 Applications are allowed to continue to operate with suboptimal swapchains, but there can be performance implications, so it's best to just recreate in such cases

#72859

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants