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 export uses Vulkan even when gl_compatibility selected #68048

Closed
jamaggs opened this issue Oct 30, 2022 · 5 comments
Closed

Android export uses Vulkan even when gl_compatibility selected #68048

jamaggs opened this issue Oct 30, 2022 · 5 comments

Comments

@jamaggs
Copy link

jamaggs commented Oct 30, 2022

Godot version

4.0 beta 3

System information

Xubuntu 22.04 for editing, LineageOS 14.1 for testing

Issue description

Hello

When exporting to Android using Godot 4.0 beta 3 official build, I have selected Rendering Method.mobile to be gl_compatibility but after installing on a phone that doesn't support Vulcan, an error message comes up when I run on the phone saying "Unable to initialize Video driver. Your video card driver does not support any of the supported Vulcan versions.".

By contrast, when exporting for Linux if gl_compatibility is selected it does seem to run on opengl rather than Vulcan.

Many thanks for your help

Steps to reproduce

With any project, choose gl_compatibility as renderer in project options under mobile then export for Android.

Minimal reproduction project

No response

@Calinou Calinou changed the title Android export uses Vulcan even when gl_compatibility selected Android export uses Vulkan even when gl_compatibility selected Oct 31, 2022
@Chaosus Chaosus added this to the 4.0 milestone Oct 31, 2022
@autofool
Copy link

autofool commented Nov 8, 2022

I can confirm this issue on beta4 with same error. Project actually works with Vulkan driver in my device. Even if Godot is trying to run with Vulkan instead of OpenGL, it should not throw that error but then again, maybe project is modified for OpenGL but expecting Vulkan driver?

@destiny-game-studios
Copy link

After beta5 came out, i checked and can confirm that this issue still persists.

@akien-mga
Copy link
Member

I can confirm the issue, tested with a build from the current master branch (0b27173).

Given the bug in #67034 I checked if the other usage of getGlobal might also be wrong here, but it seems fine, including handling the .mobile or .android overrides:

final String renderer = GodotLib.getGlobal("rendering/renderer/rendering_method");
if (renderer.equals("gl_compatibility")) {
mRenderView = new GodotGLRenderView(activity, this, xrMode, use_debug_opengl);
} else {
mRenderView = new GodotVulkanRenderView(activity, this);
}

So the problem must be with the init in GodotGLRenderView, even though it misleadingly reports that the device "doesn't support any of the supported Vulkan versions".

@clayjohn
Copy link
Member

The problem is in display_server_android. When the display server is created it forces the rendering driver to "vulkan" regardless of what was selected. This is in place because OpenGL initialization hasn't been implemented for Android yet.

@m4gr3d
Copy link
Contributor

m4gr3d commented Nov 30, 2022

Should be fixed by #69355

@m4gr3d m4gr3d closed this as completed Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

7 participants