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

Cannot create GL ES 3.x adapter when GL < 3.3 exists #5989

Closed
Rapdorian opened this issue Jul 19, 2024 · 2 comments
Closed

Cannot create GL ES 3.x adapter when GL < 3.3 exists #5989

Rapdorian opened this issue Jul 19, 2024 · 2 comments

Comments

@Rapdorian
Copy link
Contributor

Description
I have a machine that supports GL 3.1 and GL ES 3.1
When looking for adapters WGPU prefers using a GL adapter over a GL ES adapter, regardless of GL version. see #5481
However in my case this causes an issue because my GL version is unsupported but I could use a GL ES adapter, which isn't found.

Repro steps

  • On machine with GL <3.3 and GL ES 3.1+
  • Create a GL adapter

Expected vs observed behavior
Observered: WGPU fails to create an adapter since it only supports GL 3.3+
Expected: WGPU should create a GL ES 3.1 adapter.

Extra materials

$ glxinfo
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Mesa (0xffffffff)
    Device: Mali-G52 r1 (Panfrost) (0xffffffff)
    Version: 24.1.3
    Accelerated: yes
    Video memory: 7687MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 3.1
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: Mesa
OpenGL renderer string: Mali-G52 r1 (Panfrost)
OpenGL core profile version string: 3.1 Mesa 24.1.3-arch1.1
OpenGL core profile shading language version string: 1.40
OpenGL core profile context flags: (none)

OpenGL version string: 3.1 Mesa 24.1.3-arch1.1
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 24.1.3-arch1.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
$ cargo run --bin wgpu-info
[2024-07-19T04:32:09Z ERROR wgpu_hal::vulkan::instance] GENERAL [Loader Message (0x0)]
    	vkCreateInstance: Found no drivers!
[2024-07-19T04:32:09Z ERROR wgpu_hal::vulkan::instance] 	objects: (type: INSTANCE, hndl: 0xaaaafa787530, name: ?)
[2024-07-19T04:32:10Z ERROR wgpu_hal::gles::egl] EGL 'eglCreateContext' code 0x3009: dri2_create_context

Platform
This is on a Linux ARM tablet.

@Rapdorian
Copy link
Contributor Author

I've written a quick patch to confirm the issue here: Rapdorian@810128b

@cwfitzgerald
Copy link
Member

Ah nice, a fallback pattern is definitely wanted! Would it be possible to put together a PR which implements this? I don't know EGL well, but it would let it be evaluated by those who do.

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

No branches or pull requests

3 participants