WebKit Bugzilla
Attachment 371993 Details for
Bug 198811
: [WebGL] ANGLE Extension directive location incorrectly enforced for webgl 1.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198811-20190612153542.patch (text/plain), 6.78 KB, created by
Justin Fan
on 2019-06-12 15:35:43 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Justin Fan
Created:
2019-06-12 15:35:43 PDT
Size:
6.78 KB
patch
obsolete
>Subversion Revision: 246269 >diff --git a/Source/ThirdParty/ANGLE/ChangeLog b/Source/ThirdParty/ANGLE/ChangeLog >index dd1e479641d2d23f15382ed5431cb132254d7ffc..b5a3c1e62a530e11ef5fd82a476250d7c9cbe41b 100644 >--- a/Source/ThirdParty/ANGLE/ChangeLog >+++ b/Source/ThirdParty/ANGLE/ChangeLog >@@ -1,3 +1,19 @@ >+2019-06-12 Justin Fan <justin_fan@apple.com> >+ >+ [WebGL] ANGLE Extension directive location incorrectly enforced for webgl 1.0 >+ https://bugs.webkit.org/show_bug.cgi?id=198811 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Apply ANGLE change from https://chromium-review.googlesource.com/c/angle/angle/+/1648661 to >+ prevent enforcing ESSL late extension rule on WebGL 1.0 shaders. >+ >+ * src/compiler/preprocessor/DiagnosticsBase.cpp: >+ (angle::pp::Diagnostics::message): >+ * src/compiler/preprocessor/DiagnosticsBase.h: >+ * src/compiler/preprocessor/DirectiveParser.cpp: >+ (angle::pp::DirectiveParser::parseExtension): >+ > 2019-05-23 Don Olmstead <don.olmstead@sony.com> > > [CMake] Use target oriented design for bmalloc >diff --git a/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DiagnosticsBase.cpp b/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DiagnosticsBase.cpp >index 575b151432d6686b0510b387e5d4bb6f85686c93..c4832c66d3add378c3cfc4201a0dc6caf9836e92 100644 >--- a/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DiagnosticsBase.cpp >+++ b/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DiagnosticsBase.cpp >@@ -115,6 +115,8 @@ const char *Diagnostics::message(ID id) > return "invalid file number"; > case PP_INVALID_LINE_DIRECTIVE: > return "invalid line directive"; >+ case PP_NON_PP_TOKEN_BEFORE_EXTENSION_ESSL1: >+ return "extension directive must occur before any non-preprocessor tokens in ESSL1"; > case PP_NON_PP_TOKEN_BEFORE_EXTENSION_ESSL3: > return "extension directive must occur before any non-preprocessor tokens in ESSL3"; > case PP_UNDEFINED_SHIFT: >@@ -129,7 +131,7 @@ const char *Diagnostics::message(ID id) > return "unexpected token after conditional expression"; > case PP_UNRECOGNIZED_PRAGMA: > return "unrecognized pragma"; >- case PP_NON_PP_TOKEN_BEFORE_EXTENSION_ESSL1: >+ case PP_NON_PP_TOKEN_BEFORE_EXTENSION_WEBGL: > return "extension directive should occur before any non-preprocessor tokens"; > case PP_WARNING_MACRO_NAME_RESERVED: > return "macro name with a double underscore is reserved - unintented behavior is " >diff --git a/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DiagnosticsBase.h b/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DiagnosticsBase.h >index bb90bf08292fecccfe9abae75b23300a7af62c9d..6be5c72ddec773597e451fbcb9e17d4e1e898be8 100644 >--- a/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DiagnosticsBase.h >+++ b/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DiagnosticsBase.h >@@ -73,6 +73,7 @@ class Diagnostics > PP_WARNING_BEGIN, > PP_EOF_IN_DIRECTIVE, > PP_UNRECOGNIZED_PRAGMA, >+ PP_NON_PP_TOKEN_BEFORE_EXTENSION_WEBGL, > PP_WARNING_MACRO_NAME_RESERVED, > PP_WARNING_END > }; >diff --git a/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DirectiveParser.cpp b/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DirectiveParser.cpp >index e99d843b2d312096f9a0b83db5a46ae25edd8d60..b7f8d91ecf5fda30c90329a72da16d57dd079a68 100644 >--- a/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DirectiveParser.cpp >+++ b/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DirectiveParser.cpp >@@ -676,8 +676,16 @@ void DirectiveParser::parseExtension(Token *token) > } > else > { >- mDiagnostics->report(Diagnostics::PP_NON_PP_TOKEN_BEFORE_EXTENSION_ESSL1, >- token->location, token->text); >+ if (mSettings.shaderSpec == SH_WEBGL_SPEC) >+ { >+ mDiagnostics->report(Diagnostics::PP_NON_PP_TOKEN_BEFORE_EXTENSION_WEBGL, >+ token->location, token->text); >+ } >+ else >+ { >+ mDiagnostics->report(Diagnostics::PP_NON_PP_TOKEN_BEFORE_EXTENSION_ESSL1, >+ token->location, token->text); >+ } > } > } > if (valid) >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 238810e789086dbd7e7626a025f58dc44f3f031d..9cfe74c75b3cec91c01aab2744dbbc648c2fd309 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,15 @@ >+2019-06-12 Justin Fan <justin_fan@apple.com> >+ >+ [WebGL] ANGLE Extension directive location incorrectly enforced for webgl 1.0 >+ https://bugs.webkit.org/show_bug.cgi?id=198811 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ ANGLE was updated so that this case should not be an error. >+ >+ * webgl/webgl-extension-directive-location-no-error-expected.txt: Added. >+ * webgl/webgl-extension-directive-location-no-error.html: Added. >+ > 2019-06-10 Youenn Fablet <youenn@apple.com> > > Call was negotiated with H264 Base Profile 42e01f but encoded in High Profile >diff --git a/LayoutTests/webgl/webgl-extension-directive-location-no-error-expected.txt b/LayoutTests/webgl/webgl-extension-directive-location-no-error-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..755c5417e9901ab1297f34c97b4008c3fe2a685f >--- /dev/null >+++ b/LayoutTests/webgl/webgl-extension-directive-location-no-error-expected.txt >@@ -0,0 +1,3 @@ >+Ensure that if a shader extension directive is specified after non-preprocessor symbols, compilation succeeds. >+ >+ >diff --git a/LayoutTests/webgl/webgl-extension-directive-location-no-error.html b/LayoutTests/webgl/webgl-extension-directive-location-no-error.html >new file mode 100644 >index 0000000000000000000000000000000000000000..bc46d8d44286a4f5bbd2ad4856c037715bb71c95 >--- /dev/null >+++ b/LayoutTests/webgl/webgl-extension-directive-location-no-error.html >@@ -0,0 +1,29 @@ >+<body> >+<p>Ensure that if a shader extension directive is specified after non-preprocessor symbols, compilation succeeds.</p> >+<canvas width="100" height="100"></canvas> >+<script> >+if (window.testRunner) >+ testRunner.dumpAsText(); >+ >+const vertexShaderCode = ` >+ precision highp float; >+ #extension GL_OES_standard_derivatives : enable >+ >+ void main() { >+ gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); >+ } >+ `; >+ >+const canvas = document.querySelector('canvas'); >+const gl = canvas.getContext("webgl"); >+ >+gl.getExtension('OES_standard_derivatives'); >+ >+const shader = gl.createShader(gl.FRAGMENT_SHADER); >+gl.shaderSource(shader, vertexShaderCode); >+gl.compileShader(shader); >+const success = gl.getShaderParameter(shader, gl.COMPILE_STATUS); >+if (!success) >+ console.log(gl.getShaderInfoLog(shader)); >+</script> >+</body> >\ No newline at end of file
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198811
:
371993
|
371995
|
372000
|
372001
|
372005
|
372008
|
372012
|
372018