Bug 57261 - [Qt] Migrate to GraphicsContext3DOpenGL.cpp
Summary: [Qt] Migrate to GraphicsContext3DOpenGL.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on: 57154 60617 64877 64878 64879 87718
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-28 12:46 PDT by Jarkko Sakkinen
Modified: 2012-10-24 06:32 PDT (History)
4 users (show)

See Also:


Attachments
Compilation of ANGLE shader compiler. (5.87 KB, patch)
2011-03-28 22:27 PDT, Jarkko Sakkinen
no flags Details | Formatted Diff | Diff
GraphicsContext3DOpenGL.cpp experimental patch (85.21 KB, patch)
2011-03-29 07:03 PDT, Jarkko Sakkinen
no flags Details | Formatted Diff | Diff
clean up and compilation fix (72.97 KB, patch)
2011-03-29 10:47 PDT, Jarkko Sakkinen
no flags Details | Formatted Diff | Diff
clean up (55.63 KB, patch)
2011-03-30 02:09 PDT, Jarkko Sakkinen
no flags Details | Formatted Diff | Diff
Adapted to symbol resolver changes. (55.64 KB, patch)
2011-03-30 04:21 PDT, Jarkko Sakkinen
no flags Details | Formatted Diff | Diff
compilation fix (55.93 KB, patch)
2011-03-30 05:14 PDT, Jarkko Sakkinen
no flags Details | Formatted Diff | Diff
fix ANGLE initialization (59.95 KB, patch)
2011-07-07 15:34 PDT, Andrew Wason
no flags Details | Formatted Diff | Diff
implement antialiasing (23.97 KB, patch)
2011-07-15 09:50 PDT, Andrew Wason
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jarkko Sakkinen 2011-03-28 12:46:14 PDT
Adapt to GraphicsContext3DOpenGL.cpp for handling GraphicsContext3D calls. GraphicsContext3DQt.cpp should be limited symbol resolving and context handling.
Comment 1 Jarkko Sakkinen 2011-03-28 22:27:30 PDT
Created attachment 87259 [details]
Compilation of ANGLE shader compiler.

This is what it takes to get ANGLE shader compiler to compile. I guess there should be a separate .pro file for ANGLE?
Comment 2 Jarkko Sakkinen 2011-03-29 07:03:59 PDT
Created attachment 87309 [details]
GraphicsContext3DOpenGL.cpp experimental patch
Comment 3 Jarkko Sakkinen 2011-03-29 07:04:51 PDT
Note with experimental patch some of the layout tests start to fail. This is because those layout tests are invalid since their shaders do not apply to WebGL 1.0 standard.
Comment 4 Jarkko Sakkinen 2011-03-29 10:47:12 PDT
Created attachment 87364 [details]
clean up and compilation fix
Comment 5 Jarkko Sakkinen 2011-03-30 02:09:37 PDT
Created attachment 87483 [details]
clean up
Comment 6 Jarkko Sakkinen 2011-03-30 04:21:01 PDT
Created attachment 87500 [details]
Adapted to symbol resolver changes.
Comment 7 Jarkko Sakkinen 2011-03-30 05:14:52 PDT
Created attachment 87507 [details]
compilation fix
Comment 8 Jarkko Sakkinen 2011-03-30 05:34:02 PDT
There are two questions to be answered before this patch can be finalized:

Problem 1.

GraphicsContext3DOpenGL.cpp excepts strict ES 2.0 shaders that always must have precisions defined. This also what the WebGL 1.0 standard states. This, however, cause most currently available WebGL pages to fail misserably because GC3DOGL validates pages with ANGLE. Most of the browsers support also these pages that do not apply to the standard. It is easy also to make our code to support that by appending default precisions to the shader code. Do we want to do this?


Problem 2.

See ANGLE import in WebCore.pro. I had to adjust compiler settings in order to get generated code to compile. Should this be in a separate binary blob with own pro file?
Comment 9 Jarkko Sakkinen 2011-03-30 13:58:13 PDT
Shaders might have another issue that causes failure and this has to be fixed before making any conclusions on problem 1 and see how well SH_WEBGL (shader compiler mode in ANGLE, other is SH_ES2) GC3DOGL handles layout tests after that.

The problem is that with some pages ShConstructCompiler() called by ANGLEWebKitBridge::validateShaderSource() returns NULL. This is the reason that seems to cause part of layout tests fail.
Comment 10 Andrew Wason 2011-07-07 11:27:44 PDT
(In reply to comment #9)
> The problem is that with some pages ShConstructCompiler() called by 
> ANGLEWebKitBridge::validateShaderSource() returns NULL.
> This is the reason that seems to cause part of layout tests fail.

This is because the builtin ANGLE resources are not being initialized on the ANGLEWebKitBridge - so they contain garbage which occasionally makes the builtin resources fail to parse. I'm working on updating the patch to fix that.
Comment 11 Andrew Wason 2011-07-07 15:34:47 PDT
Created attachment 100040 [details]
fix ANGLE initialization

Fix ANGLE resource initialization so ShConstructCompiler() doesn't fail.
Adapt to TextureMapper changes. Adapt to ANGLE changes.
This patch should be applied on top of the patch from attachment 98541 [details] to bug 57154

Also, I think we should use Extensions3DOpenGL instead of Extensions3DQt, because Extensions3DQt is mostly stubs. I'll see if I can add that to this patch.
Comment 12 Andrew Wason 2011-07-15 09:50:12 PDT
Created attachment 100997 [details]
implement antialiasing

Update for latest resolver patch on bug 57154.
Use Extensions3DOpenGL for desktop instead of Extensions3DQt.
Implement support for WebGL antialiasing.
Comment 13 Andrew Wason 2011-07-20 10:17:27 PDT
I'm splitting this migration into 3 dependent parts.

Part 1, bug 64877, will move GraphicsContext3DInternal members into GraphicsContext3D where they will be needed when we adopt GraphicsContext3DOpenGL.cpp

Part 2, bug 64878, will adopt GraphicsContext3DOpenGL.cpp and ANGLE shader compiler.

Part 3, bug 64879, will implement WebGL antialiasing using GraphicsContext3DOpenGL.cpp and Extensions3DOpenGL.cpp
Comment 14 Noam Rosenthal 2012-10-24 06:32:20 PDT
This was fixed in a series of other bugs.