Open Bug 1348952 Opened 7 years ago Updated 2 years ago

Allow WebGL 2 support even if native GL extension GL_EXT_transform_feedback2 is not available?

Categories

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

x86_64
macOS
enhancement

Tracking

()

People

(Reporter: jujjyl, Unassigned)

Details

(Whiteboard: gfx-noted)

Running http://mzl.la/webassemblydemo on test laptop MACBOOK_AIR_OSX, with

MacBook Air (13-inch, Mid 2011)
macOS Sierra 10.12.3
1,7 GHz Intel Core i5
4 GB 1333 MHz DDR3
Intel HD Graphics 3000 384 MB

it lacks WebGL 2 support due to an error

Your GPU does not support WebGL 2. This affects graphics performance and quality. Please try updating your graphics driver and/or browser to latest version.
Error reason: WebGL creation failed: * WebGL 2 requires support for the following features: transform_feedback2 * Exhausted GL driver options.
Current renderer: Intel Inc. Intel HD Graphics 3000 OpenGL Engine/Mozilla Mozilla WebGL 1.0, WebGL GLSL ES 1.0

That is, Intel HD 3000 is missing this extension: http://developer.download.nvidia.com/opengl/specs/GL_EXT_transform_feedback2.txt

although it does support this extension:
https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_transform_feedback.txt

1. Does WebGL 2 transform feedback support require GL_EXT_transform_feedback2 or could that be supported only via GL_EXT_transform_feedback?

2. Curiously, booting the same laptop to Windows 7 Home in bootcamp, Windows 7 is able to get WebGL 2 support in FF Nightly, with decent performance (though did not test any pages that would actually use transform feedback)

3. Given that transform feedback is an extremely rarely used feature (like 99% of WebGL 2 sites will not use it), and detecting when it is used is clear cut (explicit API entry points), there would be an opportunity to expand support for "real world" WebGL 2 to cover Intel HD 3000 GPUs on OS X as well by allowing them to create a WebGL 2 context, and just generate a GL error if one attempts to call any of the GL transform feedback functions.

The motivation here is that just by running on a WebGL 2 context with the new entry points, but otherwise identical WebGL 1 features, performance is around +7.5% faster (measured on UE4 Zen Garden), and a good deal of other WebGL 2 features would help these systems as well. Perhaps we could allow creating the context, but print a warning to console log message at context creation and/or in GL_VERSION string? (IE11 and Edge do this type of behavior as well, saying they have a WebGL 0.99 support or similar)

4. Does anyone have a OS X laptop with newer Intel GPUs? Intel HD 4000 anyone? What is the oldest Intel GPU which has GL_EXT_transform_feedback2 support on OS X? Does our Firefox hardware metric give us numbers that if we did allow "WebGL2 - transform_feedback", how many % of more devices could we bring over to get WebGL 2 support? This could help motivate whether this is worth it.
https://developer.apple.com/opengl/capabilities/ suggests that the following Mac GPUs have ARB_transform_feedback2:
 - Intel HD 4000,5000,Iris
 - GeForce 640/650/660/675/680/750/755/775/780
 - Radeon HD 5870/6490/5670/5750/5770/6630/6750/6770/6970

These correspond to GPUs that have OpenGL 4.1 support.

The following GPUs only get OpenGL 3.3 and do not have ARB_transform_feedback2:
 - Radeon HD 2400/2600/4670/4850/4870
 - GeForce 8600/8800/9600/120/130/Quadro FX 5600	
 - GeForce 9400/285/Quadro FX 4800
 - GeForce 320/330

Cross-referencing this against
 - https://en.wikipedia.org/wiki/MacBook_Air
 - https://en.wikipedia.org/wiki/MacBook_Pro
 - https://en.wikipedia.org/wiki/MacBook_(Retina)

suggests that all released MacBook Pro laptops should have ARB_transform_feedback2, (Mid 2012 was the first one), and on MacBook Airs, only Airs until Mid 2011 (July) and older (Early 2008 was the first released model) will not have ARB_transform_feedback2.

Jeff, is WebGL 2 guaranteed to be available if core OpenGL version 4.1 is available on OS X?
Flags: needinfo?(jgilbert)
That's correct. If about:support shows 4.1, but we don't offer WebGL 2, that's a bug.

I have some ideas about how to emulate transform_feedback2 on transform_feedback, but it's harder than the VAO emulation we do.
Flags: needinfo?(jgilbert)
Priority: -- → P3
Whiteboard: gfx-noted
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.