glxtest should try choosing both single and double buffered visuals
Categories
(Core :: Graphics, defect)
Tracking
()
People
(Reporter: simo.melenius+firefox, Assigned: rmader)
Details
Attachments
(1 file)
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0
Steps to reproduce:
Running Firefox under PRIME render offload on a system with no EGL available/configured might fail the GL detection in toolkit/xre/glxtest.cpp and leave WebGL unavailable for the end-user.
Actual results:
When running Firefox as a render offload client the glxtest.cpp can fail to detect GL properly because single-buffered visuals might not be available (render offload visuals can differ from the larger set of visuals of the primary desktop). The attributes passed in for glXChooseVisual() in get_glx_status() will only match single-buffered visuals.
Expected results:
At the glxtest stage it shouldn't matter which buffering the visual comes with as its purpose is to find a valid GL implementation for WebGL. If it also checked ChooseVisual() with GLX_DOUBLEBUFFER it would find a GLX implementation behind render offload, too. The actual WebGL initialization works correctly regardless of the pre-test in glxtest.cpp.
Reporter | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
I'm confused - according to the docs (1) the default value for GLX_DOUBLEBUFFER
is GLX_DONT_CARE
- and we don't specify GLX_DOUBLEBUFFER:false
anywhere. Do I miss something? Is this simply a driver bug maybe?
1: https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glXChooseFBConfig.xml
Reporter | ||
Comment 2•3 years ago
|
||
(In reply to Robert Mader [:rmader] from comment #1)
I'm confused - according to the docs (1) the default value for
GLX_DOUBLEBUFFER
isGLX_DONT_CARE
- and we don't specifyGLX_DOUBLEBUFFER:false
anywhere. Do I miss something? Is this simply a driver bug maybe?1: https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glXChooseFBConfig.xml
It's the glXChooseVisual() that fails on https://searchfox.org/mozilla-central/source/toolkit/xre/glxtest.cpp#718. From https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glXChooseVisual.xml:
GLX_DOUBLEBUFFER
If present, only double-buffered visuals are considered. Otherwise, only single-buffered visuals are considered.
Assignee | ||
Comment 3•3 years ago
|
||
glXChooseVisual
requires us to choose whether we want single or
double buffered visuals. We don't care here, so check for both
cases.
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
•
|
||
Simo: the patch above should fix the issue - can you try the following build once it's ready?
https://treeherder.mozilla.org/jobs?repo=try&revision=b016371b31ae0cc659dda45b22e66d9fc81d1e9c
If you don't know how to run download it, I can post a direct link once its build.
Reporter | ||
Comment 5•3 years ago
|
||
Thanks for the direct download link. I set up PRIME render offload and tested that a vanilla version of Firefox fails to enable webgl. Then I tested your build and it does correctly identify my NVIDIA GL that I've configured to be the render offload source. Both browsers correctly enable webgl with MESA drivers when I run them without PRIME render offload. So, this fixes it. Thanks!
The patch looks good, too.
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/c1b8b60b2e52 Also check for double buffered visual in glxtest, r=aosmond
Comment 7•3 years ago
|
||
bugherder |
Assignee | ||
Comment 8•3 years ago
|
||
Comment on attachment 9213076 [details]
Bug 1702463 - Also check for double buffered visual in glxtest, r=aosmond
Beta/Release Uplift Approval Request
- User impact if declined: A small set of dri prime nvidia users won't have WebGL support. They don't get WR, so normal browsing is not affected.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This patch introduces a fallback path. All users who currently have working WebGL/WR do not hit it, so only quite broken setups are affected.
- String changes made/needed:
Comment 9•3 years ago
|
||
Comment on attachment 9213076 [details]
Bug 1702463 - Also check for double buffered visual in glxtest, r=aosmond
Approved for 88.0b7.
Comment 10•3 years ago
|
||
bugherder uplift |
Description
•