Closed Bug 1270435 Opened 8 years ago Closed 5 years ago

Check for when to expose EXT_shader_texture_lod is a bit narrow

Categories

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

defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox49 --- affected

People

(Reporter: jujjyl, Assigned: jgilbert)

Details

(Whiteboard: [gfx-noted])

In native GL side, texture fetches in fragment shaders with explicit lod level (WebGL extension EXT_shader_texture_lod) seems to be present if any of the following conditions apply:
1. Running on desktop OpenGL which has GL_ARB_shader_texture_lod extension: https://www.opengl.org/registry/specs/ARB/shader_texture_lod.txt
2. Running on desktop OpenGL version 3.0 with GLSL 1.30, or newer: https://www.opengl.org/registry/doc/GLSLangSpec.Full.1.30.10.pdf page 81
3. Running on OpenGL ES 2.0 which has GL_EXT_shader_texture_lod extension: https://www.khronos.org/registry/gles/extensions/EXT/EXT_shader_texture_lod.txt
4. Running on OpenGL ES 3.0 with GLSL ES 3.00, or newer: https://www.khronos.org/registry/gles/specs/3.0/GLSL_ES_Specification_3.00.pdf

Searching through our WebGL code, we seem to only check for the ANGLE-specific case (#3 above): http://lxr.mozilla.org/mozilla-central/source/dom/canvas/WebGLContextExtensions.cpp#167 and as a result, e.g. OS X systems don't get the WebGL extension EXT_shader_texture_lod enabled on them at all. I presume all of the four conditions above should be equivalent, though didn't to play the GL spec lawyer game to investigate in closest detail. Expanding the check to cover #2 above would enable OS X to have that extension as well.
Bug 1111689 discusses #1 above, not sure if it will cover all bases as well?
Flags: needinfo?(jgilbert)
Assignee: nobody → jgilbert
Flags: needinfo?(jgilbert)
Whiteboard: [gfx-noted]

This was fixed elsewhere.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.