Title: [220983] trunk
- Revision
- 220983
- Author
- d...@apple.com
- Date
- 2017-08-21 14:51:49 -0700 (Mon, 21 Aug 2017)
Log Message
Persistent WebGL Warning "vertex WARNING: 0:1: extension 'GL_ARB_gpu_shader5' is not supported" in Safari 10.1.2
https://bugs.webkit.org/show_bug.cgi?id=175783
<rdar://problem/33623867>
Reviewed by Alex Christensen.
Source/WebCore:
The version of ANGLE we use inserts this line into each shader:
It causes our lower-level GLSL compiler to give a warning, which is
confusing to developers because they didn't write this code.
Until we upgrade our OpenGL support to version 4.1, we should remove
this error message from the log returned to the developer.
See https://bugs.webkit.org/show_bug.cgi?id=175785
Test: fast/canvas/webgl/no-info-log-for-simple-shaders.html
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::getUnmangledInfoLog): Search for and remove
this warning.
LayoutTests:
* fast/canvas/webgl/no-info-log-for-simple-shaders-expected.txt: Added.
* fast/canvas/webgl/no-info-log-for-simple-shaders.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (220982 => 220983)
--- trunk/LayoutTests/ChangeLog 2017-08-21 21:10:24 UTC (rev 220982)
+++ trunk/LayoutTests/ChangeLog 2017-08-21 21:51:49 UTC (rev 220983)
@@ -1,3 +1,14 @@
+2017-08-21 Dean Jackson <d...@apple.com>
+
+ Persistent WebGL Warning "vertex WARNING: 0:1: extension 'GL_ARB_gpu_shader5' is not supported" in Safari 10.1.2
+ https://bugs.webkit.org/show_bug.cgi?id=175783
+ <rdar://problem/33623867>
+
+ Reviewed by Alex Christensen.
+
+ * fast/canvas/webgl/no-info-log-for-simple-shaders-expected.txt: Added.
+ * fast/canvas/webgl/no-info-log-for-simple-shaders.html: Added.
+
2017-08-21 Matt Lewis <jlew...@apple.com>
Marked svg/animations/smil-leak-list-property-instances.svg as flaky on macOS WK1.
Added: trunk/LayoutTests/fast/canvas/webgl/no-info-log-for-simple-shaders-expected.txt (0 => 220983)
--- trunk/LayoutTests/fast/canvas/webgl/no-info-log-for-simple-shaders-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/canvas/webgl/no-info-log-for-simple-shaders-expected.txt 2017-08-21 21:51:49 UTC (rev 220983)
@@ -0,0 +1 @@
+
Property changes on: trunk/LayoutTests/fast/canvas/webgl/no-info-log-for-simple-shaders-expected.txt
___________________________________________________________________
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:keywords
+Date Revision
\ No newline at end of property
Added: svn:mime-type
+text/plain
\ No newline at end of property
Added: trunk/LayoutTests/fast/canvas/webgl/no-info-log-for-simple-shaders.html (0 => 220983)
--- trunk/LayoutTests/fast/canvas/webgl/no-info-log-for-simple-shaders.html (rev 0)
+++ trunk/LayoutTests/fast/canvas/webgl/no-info-log-for-simple-shaders.html 2017-08-21 21:51:49 UTC (rev 220983)
@@ -0,0 +1,36 @@
+<script id="vertexShaderSource" type="text/glsl">
+attribute vec2 position;
+
+void main() {
+ gl_Position = vec4(position.x, position.y, 1.0, 1.0);
+}
+</script>
+<script id="fragmentShaderSource" type="text/glsl">
+void main() {
+ gl_FragColor = vec4(0.0, 0.7, 0.0, 1.0);
+}
+</script>
+
+<canvas width="200" height="200"></canvas>
+
+<div id="output"></div>
+
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ window.addEventListener("load", _ => {
+ var canvas = document.querySelector("canvas")
+ var gl = canvas.getContext("webgl");
+
+ var vertexShader = gl.createShader(gl.VERTEX_SHADER);
+ gl.shaderSource(vertexShader, document.getElementById("vertexShaderSource").textContent);
+ gl.compileShader(vertexShader);
+ document.getElementById("output").textContent += gl.getShaderInfoLog(vertexShader);
+
+ var fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);
+ gl.shaderSource(fragmentShader, document.getElementById("fragmentShaderSource").textContent);
+ gl.compileShader(fragmentShader);
+ document.getElementById("output").textContent += gl.getShaderInfoLog(fragmentShader);
+ }, false);
+</script>
Property changes on: trunk/LayoutTests/fast/canvas/webgl/no-info-log-for-simple-shaders.html
___________________________________________________________________
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:keywords
+Date Revision
\ No newline at end of property
Added: svn:mime-type
+text/html
\ No newline at end of property
Modified: trunk/Source/WebCore/ChangeLog (220982 => 220983)
--- trunk/Source/WebCore/ChangeLog 2017-08-21 21:10:24 UTC (rev 220982)
+++ trunk/Source/WebCore/ChangeLog 2017-08-21 21:51:49 UTC (rev 220983)
@@ -1,3 +1,26 @@
+2017-08-21 Dean Jackson <d...@apple.com>
+
+ Persistent WebGL Warning "vertex WARNING: 0:1: extension 'GL_ARB_gpu_shader5' is not supported" in Safari 10.1.2
+ https://bugs.webkit.org/show_bug.cgi?id=175783
+ <rdar://problem/33623867>
+
+ Reviewed by Alex Christensen.
+
+ The version of ANGLE we use inserts this line into each shader:
+ #extension GL_ARB_gpu_shader5 : enable
+ It causes our lower-level GLSL compiler to give a warning, which is
+ confusing to developers because they didn't write this code.
+
+ Until we upgrade our OpenGL support to version 4.1, we should remove
+ this error message from the log returned to the developer.
+ See https://bugs.webkit.org/show_bug.cgi?id=175785
+
+ Test: fast/canvas/webgl/no-info-log-for-simple-shaders.html
+
+ * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
+ (WebCore::GraphicsContext3D::getUnmangledInfoLog): Search for and remove
+ this warning.
+
2017-08-21 Andy Estes <aes...@apple.com>
[Payment Request] Use ExistingExceptionError to propagate JS exceptions thrown during JSON stringification
Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp (220982 => 220983)
--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp 2017-08-21 21:10:24 UTC (rev 220982)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp 2017-08-21 21:51:49 UTC (rev 220983)
@@ -1563,14 +1563,20 @@
String GraphicsContext3D::getUnmangledInfoLog(Platform3DObject shaders[2], GC3Dsizei count, const String& log)
{
- LOG(WebGL, "Was: %s", log.utf8().data());
+ LOG(WebGL, "Original ShaderInfoLog:\n%s", log.utf8().data());
JSC::Yarr::RegularExpression regExp("webgl_[0123456789abcdefABCDEF]+", TextCaseSensitive);
StringBuilder processedLog;
- int startFrom = 0;
+ // ANGLE inserts a "#extension" line into the shader source that
+ // causes a warning in some compilers. There is no point showing
+ // this warning to the user since they didn't write the code that
+ // is causing it.
+ static const NeverDestroyed<String> angleWarning = ASCIILiteral { "WARNING: 0:1: extension 'GL_ARB_gpu_shader5' is not supported\n" };
+ int startFrom = log.startsWith(angleWarning) ? angleWarning.get().length() : 0;
int matchedLength = 0;
+
do {
int start = regExp.match(log, startFrom, &matchedLength);
if (start == -1)
@@ -1587,7 +1593,7 @@
processedLog.append(log.substring(startFrom, log.length() - startFrom));
- LOG(WebGL, "-->: %s", processedLog.toString().utf8().data());
+ LOG(WebGL, "Unmangled ShaderInfoLog:\n%s", processedLog.toString().utf8().data());
return processedLog.toString();
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes