Bug 1906155 - Add pref webgl.1.request_es2:true. r=gfx-reviewers,lsalzman

Differential Revision: https://phabricator.services.mozilla.com/D215665
This commit is contained in:
Kelsey Gilbert 2024-07-03 18:55:33 +00:00
parent df4d12772d
commit 1d1e39564d
2 changed files with 9 additions and 2 deletions

View File

@ -315,8 +315,10 @@ bool WebGLContext::CreateAndInitGL(
if (IsWebGL2()) {
flags |= gl::CreateContextFlags::PREFER_ES3;
} else {
// Request and prefer ES2 context for WebGL1.
flags |= gl::CreateContextFlags::PREFER_EXACT_VERSION;
if (StaticPrefs::webgl_1_request_es2()) {
// Request and prefer ES2 context for WebGL1.
flags |= gl::CreateContextFlags::PREFER_EXACT_VERSION;
}
if (!StaticPrefs::webgl_1_allow_core_profiles()) {
flags |= gl::CreateContextFlags::REQUIRE_COMPAT_PROFILE;

View File

@ -16143,6 +16143,11 @@
#endif
mirror: always
- name: webgl.1.request_es2
type: RelaxedAtomicBool
value: true
mirror: always
- name: webgl.angle.force-d3d11
type: RelaxedAtomicBool
value: false