Closed Bug 1491221 Opened 7 years ago Closed 7 years ago

Oculus Go has no `EXT_shader_texture_lod` , but getExtension( 'EXT_shader_texture_lod' ) returns true.

Categories

(Core :: Graphics: CanvasWebGL, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: daoshengmu, Assigned: daoshengmu)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(2 files, 2 obsolete files)

We notice three.js `EXT_shader_texture_lod` examples are not run properly [1]. After printing the GL extensions from Oculus Go [2] and find there is no `EXT_shader_texture_lod`. We should give a workaround for gl->vendor() is Qualcomm and gl-render() is AdrenoTM530. [1] https://github.com/MozillaReality/FirefoxReality/issues/461 [2] https://github.com/MozillaReality/FirefoxReality/issues/461#issuecomment-419785619
Priority: -- → P3
Whiteboard: [gfx-noted]
MozReview-Commit-ID: DRbbukaUwKl
Assignee: nobody → dmu
Attachment #9010466 - Attachment is obsolete: true
Attachment #9010466 - Attachment is obsolete: false
Attachment #9010466 - Attachment is obsolete: true
MozReview-Commit-ID: 4i6rbRV7ZX5
(In reply to Daosheng Mu[:daoshengmu] from comment #0) > We notice three.js `EXT_shader_texture_lod` examples are not run properly > [1]. After printing the GL extensions from Oculus Go [2] and find there is > no `EXT_shader_texture_lod`. We should give a workaround for gl->vendor() is > Qualcomm and gl-render() is AdrenoTM530. > > [1] https://github.com/MozillaReality/FirefoxReality/issues/461 > [2] > https://github.com/MozillaReality/FirefoxReality/issues/461#issuecomment- > 419785619 We only enable it if GL3 || ES3 || ARB_shader_texture_lod || EXT_shader_texture_lod, so if the driver doesn't expose it, we shouldn't be enabling it. Can you post the about:support graphics section from the affected device?
Flags: needinfo?(dmu)
Please take a look at the attachment. It looks like no ARB_shader_texture_lod || EXT_shader_texture_lod, but it is indeed OpenGL ES 3.2.
Flags: needinfo?(dmu)
So ES3+ definitely has textureLod(), but ANGLE's translator might be messing up here, since there's no indication to it that we're targetting ES3 and not ES2. I'm trying to figure out what their approach is, but I'm betting they implicitly only use ES3 if we're targetting WebGL2, which is wrong. If that's the case, the fix here is to request an ES2 context for WebGL1.
It looks like this device has asked OpenGL ES2 for WebGL 1. The call stack is as below: https://searchfox.org/mozilla-central/rev/881a3c5664ede5e08ee986d76433bc5c4b5680e6/gfx/gl/GLContextProviderEGL.cpp#972 out->AppendElement(LOCAL_EGL_OPENGL_ES2_BIT); mozilla::gl::FillContextAttribs(bool, bool, bool, bool, bool, nsTArray<int>*) GLContextProviderEGL.cpp:955 mozilla::gl::ChooseConfig(mozilla::gl::GLLibraryEGL*, mozilla::gl::CreateContextFlags, ...) GLContextProviderEGL.cpp:1032 mozilla::gl::GLContextEGL::CreateEGLPBufferOffscreenContext(mozilla::gl::CreateContextFlags, ...) GLContextProviderEGL.cpp:1074 mozilla::gl::GLContextProviderEGL::CreateOffscreen(...) GLContextProviderEGL.cpp:1170 mozilla::WebGLContext::CreateAndInitGL()
Attachment #9010554 - Attachment is obsolete: true
Comment on attachment 9011990 [details] Bug 1491221 - Mark EXT_shader_texture_lod feature unsupported for OpenGL ES3 and above. Jeff Gilbert [:jgilbert] has approved the revision.
Attachment #9011990 - Flags: review+
Pushed by dmu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cfe90e5953d9 Mark EXT_shader_texture_lod feature unsupported for OpenGL ES3 and above. r=jgilbert
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
See Also: → webgl1-es2
See Also: → webgl1-es3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: