Bug 48282 - WebGraphicsContext3DDefaultImpl does not run on top of OpenGL ES 2.0 implementations
Summary: WebGraphicsContext3DDefaultImpl does not run on top of OpenGL ES 2.0 implemen...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Normal
Assignee: Kenneth Russell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-25 17:39 PDT by Kenneth Russell
Modified: 2010-11-12 13:35 PST (History)
6 users (show)

See Also:


Attachments
Patch (10.03 KB, patch)
2010-11-09 17:40 PST, Kenneth Russell
jamesr: review+
kbr: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Russell 2010-10-25 17:39:47 PDT
When --in-process-webgl is used in Chromium in conjunction with ANGLE, an assertion failure is triggered because GL_DEPTH_COMPONENT is an invalid enum to pass to glRenderbufferStorage. We need to pass GL_DEPTH_COMPONENT16 when running on top of an OpenGL ES 2.0 implementation. We need to check the GL implementation in use (app/gfx/gl_implementation.h, GetGLImplementation() and determine which enum to send down based on whether EGLGLES2 is in use.
Comment 1 Kenneth Russell 2010-10-25 17:51:31 PDT
There are additional problems when running on top of ANGLE (or any non-desktop GL implementation). The shader validator needs to be changed to generate GLSL ES rather than GLSL. There may be additional problems. Changing the synopsis.
Comment 2 Zhenyao Mo 2010-10-27 10:21:49 PDT
In the initialization, code like

    glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
    glEnable(GL_POINT_SPRITE);

should only be executed if the backend is desktop GL.
Comment 3 Kenneth Russell 2010-11-09 17:40:46 PST
Created attachment 73446 [details]
Patch
Comment 4 James Robinson 2010-11-09 17:47:49 PST
Comment on attachment 73446 [details]
Patch

R=me

one suggestion: consider making the isGLES2 flag a member and check that instead of having checks for gfx::GetGLImplementation() everywhere.
Comment 5 Kenneth Russell 2010-11-09 18:02:59 PST
(In reply to comment #4)
> one suggestion: consider making the isGLES2 flag a member and check that instead of having checks for gfx::GetGLImplementation() everywhere.

Thanks, that's a good suggestion. I'll do that in the landed patch.
Comment 6 Kenneth Russell 2010-11-09 18:26:37 PST
Committed r71705: <http://trac.webkit.org/changeset/71705>
Comment 7 WebKit Review Bot 2010-11-09 19:09:58 PST
http://trac.webkit.org/changeset/71705 might have broken GTK Linux 64-bit Debug
Comment 8 Zhenyao Mo 2010-11-12 13:35:23 PST
Committed r71942: <http://trac.webkit.org/changeset/71942>