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

chromium-ozone-wayland: eglCreateContext: Requested version is not supported #849

Open
MastaG opened this issue Nov 18, 2024 · 10 comments
Open

Comments

@MastaG
Copy link
Contributor

MastaG commented Nov 18, 2024

When I run chromium-ozone-wayland on my armv7 board using the Panfrost mesa drivers, I always get the following error:

ERROR:gl_display.cc(497)] EGL Driver message (Error) eglCreateContext: Requested version is not supported

The browser runs fine otherwise and seems fully accelerated except for WebGL.
Is it possible I could get more verbose information regarding the above error?
My chromium flags:
--ozone-platform=wayland --enable-wayland-ime --use-gl=angle --use-angle=gles-egl --use-cmd-decoder=passthrough --ignore-gpu-blocklist --ignore-gpu-blacklist --enable-accelerated-video-decode --enable-features=VaapiVideoDecoder,VaapiVideoEncoder --gtk-version=4 --disable-gpu-memory-buffer-video-frames

By the way: --use-gl=egl doesn't seem to work anymore and needs to be replaced with: --use-gl=angle --use-angle=gles-egl or --use-gl=angle --use-angle=gl-egl

MaxIhlenfeldt added a commit to MaxIhlenfeldt/meta-browser that referenced this issue Nov 18, 2024
As mentioned in e.g. OSSystems#849, `--use-gl=egl` doesn't work any more. We can replace it with `--use-gl=angle --use-angle=gles-egl`, or just `--use-angle=gles-egl` as ANGLE is the default.
@msisov
Copy link
Collaborator

msisov commented Nov 19, 2024

It might be related to Angle. Please see https://issues.chromium.org/issues/326752458 .

I wonder what happens if you try use desktop implementation via --use-angle=gl-egl

@MastaG
Copy link
Contributor Author

MastaG commented Nov 19, 2024

With --use-angle=gl-egl I'm getting the same EGL error.
Is it possible to compile Chromium with legacy EGL support (--use-gl=egl)?
Because Angle doesn't seem to work for my platform.

@msisov
Copy link
Collaborator

msisov commented Nov 19, 2024

With --use-angle=gl-egl I'm getting the same EGL error. Is it possible to compile Chromium with legacy EGL support (--use-gl=egl)? Because Angle doesn't seem to work for my platform.

Can you try #850 ?

@MastaG
Copy link
Contributor Author

MastaG commented Nov 19, 2024

Yes I can only run with Angle now. So I only have --use-angle=gles-egl.
When I use --use-gl=egl I'm getting a message that it isn't supported any longer.

Hardware acceleration works for the most part when using Angle.
It's just that it will display the: ERROR:gl_display.cc(497)] EGL Driver message (Error) eglCreateContext: Requested version is not supported twice.
And WebGL seems to only thing that fails to work.

See the report:

about-gpu-2024-11-19T11-15-51-085Z.txt

@msisov
Copy link
Collaborator

msisov commented Nov 19, 2024

Can you try --use-angle=gl-egl ?

@MastaG
Copy link
Contributor Author

MastaG commented Nov 19, 2024

Interesting, with --use-angle=gl-egl I'm getting the same error (twice) when starting the browser:

ERROR:gl_display.cc(497)] EGL Driver message (Error) eglCreateContext: Requested version is not supported

But when I check the report:
about-gpu-2024-11-19T14-00-49-060Z.txt

I can see that Angle still decided to use the OpenGL ES Mesa driver instead of regular GL.
Everything else seems to be accelerated like before.

Now when I try to display the WebGL aquarium demo, I'll get the following error on the console:

ERROR:context_group.cc(179)] ContextResult::kFatalFailure: ES3 is blocklisted/disabled/unsupported by driver.

The webpage itself will display:

Status: Could not create a WebGL context, VENDOR = 0xffff, DEVICE = 0xffff, GL_VENDOR = Google Inc. (Mesa), GL_RENDERER = ANGLE (Mesa, Mali-T620 (Panfrost), OpenGL ES 2.0 Mesa 24.2.3-1ubuntu1), GL_VERSION = 24.2.3, Sandboxed = no, Optimus = no, AMD switchable = no, Reset notification strategy = 0x0000, ErrorMessage = BindToCurrentSequence failed: .

So if I understand it correctly, it seems that Angle decided to use the Mesa OpenGLES driver instead of the regular GL driver.
And OpenGLES is "blocklisted/disabled/unsupported" for use with Angle for WebGL?

The question I have it, why didn't it select the regular GL driver instead:

OpenGL vendor string: Mesa
OpenGL renderer string: Mali-T620 (Panfrost)
OpenGL version string: 2.1 Mesa 24.2.3-1ubuntu1
OpenGL shading language version string: 1.20 

Perhaps the supported version GL version 2.1 is not sufficient for Angle/WebGL ?

@MastaG
Copy link
Contributor Author

MastaG commented Nov 19, 2024

Yeah that's probably it.
I now reckon that the Mesa Panfrost driver for me Mali GPU, only supports OpenGLES 2.0 and OpenGL 2.1.

I've switched to the proprietary binary driver from ARM which unfortunately only supports OpenGLES 3.1 on X11 and WebGL is working just fine when running on the Ozone X11 platform.

So the reason for the ERROR:gl_display.cc(497)] EGL Driver message (Error) eglCreateContext: Requested version is not supported is probably OpenGL/ES 3.x or higher missing from the Mesa driver.

So I can confirm that the change in PR #850 works across both X11 and Wayland.
It's just that my platform is missing OpenGL/ES 3.x on Wayland being a requirement for WebGL.

MaxIhlenfeldt added a commit that referenced this issue Nov 20, 2024
As mentioned in e.g. #849, `--use-gl=egl` doesn't work any more. We can replace it with `--use-gl=angle --use-angle=gles-egl`, or just `--use-angle=gles-egl` as ANGLE is the default.
@MaxIhlenfeldt
Copy link
Collaborator

Does https://webglsamples.org/aquarium/aquarium.html work for you? afaict that's using WebGL 1, and that should only require OpenGL ES 2.0 according to MDN.

@MastaG
Copy link
Contributor Author

MastaG commented Nov 21, 2024

Does https://webglsamples.org/aquarium/aquarium.html work for you? afaict that's using WebGL 1, and that should only require OpenGL ES 2.0 according to MDN.

That was the exactly the demo I was trying.
However when I run chromium using the Mesa Panfrost driver (GL2.1 ES2.0), the "ERROR:gl_display.cc(497)] EGL Driver message (Error) eglCreateContext: Requested version is not supported" will print immediately on the terminal when starting the browser.
I've tried both --use-angle=gles-egl and --use-angle=gl-egl.
This probably means that Angle isn't happy about it.

Then when I open the aquarium demo, the webpage will display:
Status: Could not create a WebGL context, VENDOR = 0xffff, DEVICE = 0xffff, GL_VENDOR = Google Inc. (Mesa), GL_RENDERER = ANGLE (Mesa, Mali-T620 (Panfrost), OpenGL ES 2.0 Mesa 24.2.3-1ubuntu1), GL_VERSION = 24.2.3, Sandboxed = no, Optimus = no, AMD switchable = no, Reset notification strategy = 0x0000, ErrorMessage = BindToCurrentSequence failed: .
While the terminal will say:
ERROR:context_group.cc(179)] ContextResult::kFatalFailure: ES3 is blocklisted/disabled/unsupported by driver.

That's why I think Angle will fail to initialize the WebGL backend, because I don't have OpenGL(ES) 3.x or higher.

@WujianSun
Copy link

WujianSun commented Dec 6, 2024

Hi @msisov ,
Do you know any differences bewteen --use-angle=gles-egl and --use-angle=gles?

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

No branches or pull requests

4 participants