Diff
Modified: trunk/LayoutTests/ChangeLog (246392 => 246393)
--- trunk/LayoutTests/ChangeLog 2019-06-13 05:06:09 UTC (rev 246392)
+++ trunk/LayoutTests/ChangeLog 2019-06-13 05:10:11 UTC (rev 246393)
@@ -1,3 +1,15 @@
+2019-06-12 Justin Fan <justin_...@apple.com>
+
+ [WebGL] ANGLE Extension directive location incorrectly enforced for webgl 1.0
+ https://bugs.webkit.org/show_bug.cgi?id=198811
+
+ Reviewed by Dean Jackson.
+
+ 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-12 Carlos Garcia Campos <cgar...@igalia.com>
[cairo][SVG] If clipPath has multiple elements, clip-path doesn't work with transform
Added: trunk/LayoutTests/webgl/webgl-extension-directive-location-no-error-expected.txt (0 => 246393)
--- trunk/LayoutTests/webgl/webgl-extension-directive-location-no-error-expected.txt (rev 0)
+++ trunk/LayoutTests/webgl/webgl-extension-directive-location-no-error-expected.txt 2019-06-13 05:10:11 UTC (rev 246393)
@@ -0,0 +1,3 @@
+Ensure that if a shader extension directive is specified after non-preprocessor symbols, no errors are logged.
+
+
Added: trunk/LayoutTests/webgl/webgl-extension-directive-location-no-error.html (0 => 246393)
--- trunk/LayoutTests/webgl/webgl-extension-directive-location-no-error.html (rev 0)
+++ trunk/LayoutTests/webgl/webgl-extension-directive-location-no-error.html 2019-06-13 05:10:11 UTC (rev 246393)
@@ -0,0 +1,29 @@
+<body>
+<p>Ensure that if a shader extension directive is specified after non-preprocessor symbols, no errors are logged.</p>
+<canvas></canvas>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+const fragmentShaderSource = `
+ 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, fragmentShaderSource);
+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
Modified: trunk/Source/ThirdParty/ANGLE/ChangeLog (246392 => 246393)
--- trunk/Source/ThirdParty/ANGLE/ChangeLog 2019-06-13 05:06:09 UTC (rev 246392)
+++ trunk/Source/ThirdParty/ANGLE/ChangeLog 2019-06-13 05:10:11 UTC (rev 246393)
@@ -1,3 +1,19 @@
+2019-06-12 Justin Fan <justin_...@apple.com>
+
+ [WebGL] ANGLE Extension directive location incorrectly enforced for webgl 1.0
+ https://bugs.webkit.org/show_bug.cgi?id=198811
+
+ Reviewed by Dean Jackson.
+
+ 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.olmst...@sony.com>
[CMake] Use target oriented design for bmalloc
Modified: trunk/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DiagnosticsBase.cpp (246392 => 246393)
--- trunk/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DiagnosticsBase.cpp 2019-06-13 05:06:09 UTC (rev 246392)
+++ trunk/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DiagnosticsBase.cpp 2019-06-13 05:10:11 UTC (rev 246393)
@@ -115,6 +115,8 @@
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 @@
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 "
Modified: trunk/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DiagnosticsBase.h (246392 => 246393)
--- trunk/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DiagnosticsBase.h 2019-06-13 05:06:09 UTC (rev 246392)
+++ trunk/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DiagnosticsBase.h 2019-06-13 05:10:11 UTC (rev 246393)
@@ -73,6 +73,7 @@
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
};
Modified: trunk/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DirectiveParser.cpp (246392 => 246393)
--- trunk/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DirectiveParser.cpp 2019-06-13 05:06:09 UTC (rev 246392)
+++ trunk/Source/ThirdParty/ANGLE/src/compiler/preprocessor/DirectiveParser.cpp 2019-06-13 05:10:11 UTC (rev 246393)
@@ -676,8 +676,16 @@
}
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)