Bug 187982 - [WebGL2] Support compilation of GLSL ES version 300 shaders
Summary: [WebGL2] Support compilation of GLSL ES version 300 shaders
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Justin Fan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-07-24 17:48 PDT by Justin Fan
Modified: 2018-07-30 13:01 PDT (History)
13 users (show)

See Also:


Attachments
patch (18.86 KB, patch)
2018-07-24 17:59 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-sierra (2.71 MB, application/zip)
2018-07-24 19:02 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews105 for mac-sierra-wk2 (3.15 MB, application/zip)
2018-07-24 19:10 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews113 for mac-sierra (3.27 MB, application/zip)
2018-07-24 19:38 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews121 for ios-simulator-wk2 (2.38 MB, application/zip)
2018-07-24 19:50 PDT, EWS Watchlist
no flags Details
Patch (22.19 KB, patch)
2018-07-25 17:34 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews125 for ios-simulator-wk2 (2.64 MB, application/zip)
2018-07-25 19:12 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews200 for win-future (13.01 MB, application/zip)
2018-07-27 00:41 PDT, EWS Watchlist
no flags Details
Patch (22.94 KB, patch)
2018-07-27 13:01 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews200 for win-future (13.08 MB, application/zip)
2018-07-27 16:54 PDT, EWS Watchlist
no flags Details
Patch (22.94 KB, patch)
2018-07-27 20:59 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews200 for win-future (13.13 MB, application/zip)
2018-07-28 18:05 PDT, EWS Watchlist
no flags Details
Patch (22.93 KB, patch)
2018-07-30 12:22 PDT, Justin Fan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Fan 2018-07-24 17:48:25 PDT
[WebGL2] Support compilation of GLSL ES version 300 shaders
Comment 1 Radar WebKit Bug Importer 2018-07-24 17:48:54 PDT
<rdar://problem/42564229>
Comment 2 Justin Fan 2018-07-24 17:59:03 PDT
Created attachment 345732 [details]
patch

Preliminary patch to see if this breaks anything
Comment 3 EWS Watchlist 2018-07-24 19:02:03 PDT
Comment on attachment 345732 [details]
patch

Attachment 345732 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/8644919

Number of test failures exceeded the failure limit.
Comment 4 EWS Watchlist 2018-07-24 19:02:05 PDT
Created attachment 345736 [details]
Archive of layout-test-results from ews103 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 5 EWS Watchlist 2018-07-24 19:10:50 PDT
Comment on attachment 345732 [details]
patch

Attachment 345732 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/8644939

Number of test failures exceeded the failure limit.
Comment 6 EWS Watchlist 2018-07-24 19:10:51 PDT
Created attachment 345738 [details]
Archive of layout-test-results from ews105 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 7 EWS Watchlist 2018-07-24 19:38:39 PDT
Comment on attachment 345732 [details]
patch

Attachment 345732 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/8645024

Number of test failures exceeded the failure limit.
Comment 8 EWS Watchlist 2018-07-24 19:38:40 PDT
Created attachment 345740 [details]
Archive of layout-test-results from ews113 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews113  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 9 EWS Watchlist 2018-07-24 19:50:38 PDT
Comment on attachment 345732 [details]
patch

Attachment 345732 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/8645046

New failing tests:
webgl/2.0.0/conformance2/glsl3/array-as-return-value.html
webgl/2.0.0/conformance2/glsl3/array-assign.html
webgl/2.0.0/conformance2/glsl3/valid-invariant.html
webgl/2.0.0/conformance2/glsl3/no-attribute-vertex-shader.html
webgl/2.0.0/conformance2/glsl3/array-equality.html
webgl/2.0.0/conformance2/glsl3/tricky-loop-conditions.html
webgl/2.0.0/conformance2/glsl3/vector-dynamic-indexing.html
webgl/2.0.0/conformance2/glsl3/loops-with-side-effects.html
webgl/2.0.0/conformance2/glsl3/shader-linking.html
webgl/2.0.0/conformance2/glsl3/compare-structs-containing-arrays.html
webgl/2.0.0/conformance2/glsl3/shader-with-mis-matching-uniform-block.html
webgl/2.0.0/conformance2/glsl3/array-in-complex-expression.html
webgl/2.0.0/conformance2/glsl3/bool-type-cast-bug-uint-ivec-uvec.html
webgl/2.0.0/conformance2/glsl3/array-assign-constructor.html
webgl/2.0.0/conformance2/glsl3/array-element-increment.html
webgl/2.0.0/conformance2/glsl3/frag-depth.html
webgl/2.0.0/conformance2/glsl3/short-circuiting-in-loop-condition.html
webgl/2.0.0/conformance2/glsl3/vector-dynamic-indexing-nv-driver-bug.html
webgl/2.0.0/conformance2/glsl3/const-array-init.html
webgl/2.0.0/conformance2/glsl3/array-complex-indexing.html
Comment 10 EWS Watchlist 2018-07-24 19:50:40 PDT
Created attachment 345741 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.4
Comment 11 Dean Jackson 2018-07-25 10:56:44 PDT
The iOS tests are failing because we're only accepting GLSL3 for macOS. We either need to fix this for iOS, or check in different expected results in the platform/ios directory.
Comment 12 Dean Jackson 2018-07-25 11:01:19 PDT
Comment on attachment 345732 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=345732&action=review

> Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h:51
> -    bool useGLES3 { false };
> +    bool isWebGL2 { false };

This change is missing from the ChangeLog. You should explain it there. e.g. "We were using 'useGLES3' to mean WebGL2. Rename it to make more sense'

> Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm:200
> +        m_compiler = ANGLEWebKitBridge(SH_ESSL_OUTPUT, SH_WEBGL2_SPEC);

Interesting. I thought the iOS results were failing because this was missing, but it's here. We'll have to either skip for now (and open a followup bug) or work out what's wrong with iOS.

> Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:403
> +    ::glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryingVectors);

I'm happy to see that this isn't causing any other failures. I wonder why we implemented this way.
Comment 13 Justin Fan 2018-07-25 17:34:04 PDT
Created attachment 345805 [details]
Patch
Comment 14 Justin Fan 2018-07-25 17:37:36 PDT
Fixes should fix mac and wpe, but iOS is probably still expecting GLSL 3 tests to pass for the expected results that were updated.
Comment 15 EWS Watchlist 2018-07-25 19:12:29 PDT
Comment on attachment 345805 [details]
Patch

Attachment 345805 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/8656391

New failing tests:
webgl/2.0.0/conformance2/glsl3/array-as-return-value.html
webgl/2.0.0/conformance2/glsl3/array-assign.html
webgl/2.0.0/conformance2/glsl3/valid-invariant.html
webgl/2.0.0/conformance2/glsl3/no-attribute-vertex-shader.html
webgl/2.0.0/conformance2/glsl3/array-equality.html
webgl/2.0.0/conformance2/glsl3/tricky-loop-conditions.html
webgl/2.0.0/conformance2/glsl3/vector-dynamic-indexing.html
webgl/2.0.0/conformance2/glsl3/loops-with-side-effects.html
webgl/2.0.0/conformance2/glsl3/shader-linking.html
webgl/2.0.0/conformance2/glsl3/compare-structs-containing-arrays.html
webgl/2.0.0/conformance2/glsl3/shader-with-mis-matching-uniform-block.html
webgl/2.0.0/conformance2/glsl3/array-in-complex-expression.html
webgl/2.0.0/conformance2/glsl3/bool-type-cast-bug-uint-ivec-uvec.html
webgl/2.0.0/conformance2/glsl3/array-assign-constructor.html
webgl/2.0.0/conformance2/glsl3/array-element-increment.html
webgl/2.0.0/conformance2/glsl3/frag-depth.html
webgl/2.0.0/conformance2/glsl3/short-circuiting-in-loop-condition.html
webgl/2.0.0/conformance2/glsl3/vector-dynamic-indexing-nv-driver-bug.html
webgl/2.0.0/conformance2/glsl3/const-array-init.html
webgl/2.0.0/conformance2/glsl3/array-complex-indexing.html
Comment 16 EWS Watchlist 2018-07-25 19:12:41 PDT
Created attachment 345811 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.4
Comment 17 Justin Fan 2018-07-26 18:26:54 PDT
For the iOS tests that are failing, the expected.txt files expect a FAIL so they might actually be passing (or some other output). The glsl3 tests that are not on that list of failures for the iOS bot were changed to expect a PASS in this patch.
Comment 18 EWS Watchlist 2018-07-27 00:41:39 PDT
Comment on attachment 345805 [details]
Patch

Attachment 345805 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/8670500

New failing tests:
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-video.html
Comment 19 EWS Watchlist 2018-07-27 00:41:51 PDT
Created attachment 345907 [details]
Archive of layout-test-results from ews200 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews200  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 20 Justin Fan 2018-07-27 13:01:59 PDT
Created attachment 345942 [details]
Patch
Comment 21 EWS Watchlist 2018-07-27 16:54:38 PDT
Comment on attachment 345942 [details]
Patch

Attachment 345942 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/8677754

New failing tests:
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-video.html
Comment 22 EWS Watchlist 2018-07-27 16:54:50 PDT
Created attachment 345973 [details]
Archive of layout-test-results from ews200 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews200  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 23 Justin Fan 2018-07-27 20:59:53 PDT
Created attachment 345987 [details]
Patch
Comment 24 EWS Watchlist 2018-07-28 18:04:55 PDT
Comment on attachment 345987 [details]
Patch

Attachment 345987 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/8686441

New failing tests:
http/tests/security/canvas-remote-read-remote-video-hls.html
Comment 25 EWS Watchlist 2018-07-28 18:05:08 PDT
Created attachment 346005 [details]
Archive of layout-test-results from ews200 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews200  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 26 Dean Jackson 2018-07-30 11:52:18 PDT
Comment on attachment 345987 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=345987&action=review

> LayoutTests/platform/ios-simulator-wk2/TestExpectations:49
> +# We are only accepting GLSL3 for macOS. 
> +webkit.org/b/187982 webgl/2.0.0/conformance2/glsl3 [ Skip ]

This should be in platform/ios/TestExpectations not just ios-simulator-wk2
Comment 27 Justin Fan 2018-07-30 12:22:08 PDT
Created attachment 346084 [details]
Patch
Comment 28 WebKit Commit Bot 2018-07-30 13:01:01 PDT
Comment on attachment 346084 [details]
Patch

Clearing flags on attachment: 346084

Committed r234380: <https://trac.webkit.org/changeset/234380>
Comment 29 WebKit Commit Bot 2018-07-30 13:01:04 PDT
All reviewed patches have been landed.  Closing bug.