Bug 126832 - [WebGL] Error messages for attributes, uniforms, and varyings should use source code symbols, not internal mangled symbols
Summary: [WebGL] Error messages for attributes, uniforms, and varyings should use sour...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on: 121849 126871
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-11 19:54 PST by Brent Fulgham
Modified: 2014-01-13 10:17 PST (History)
11 users (show)

See Also:


Attachments
Patch (11.03 KB, patch)
2014-01-11 23:32 PST, Brent Fulgham
no flags Details | Formatted Diff | Diff
Revised to help EFL/GTK to build properly (11.05 KB, patch)
2014-01-11 23:51 PST, Brent Fulgham
dino: review+
eflews.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2014-01-11 19:54:02 PST
While working on another bug, I noticed that the error messages we generate for linker errors for our shaders reports the mapped symbol name (i.e., the mangled ANGLE name). We should use the actual variable name from the source file when reporting a problem to the user.

Instead of this:
[Log] *** Error linking program '[object WebGLProgram]':ERROR: Input of fragment shader 'webgl_a78e73e400000001' not written by vertex shader (glsl-conformance-test.js, line 44)

We should report:
[Log] *** Error linking program '[object WebGLProgram]':ERROR: Input of fragment shader 'v_varying' not written by vertex shader (glsl-conformance-test.js, line 44)
Comment 1 Radar WebKit Bug Importer 2014-01-11 19:54:31 PST
<rdar://problem/15800348>
Comment 2 Brent Fulgham 2014-01-11 22:11:39 PST
While working on this issue I discovered that we were not building a symbol table for varyings, and that the encoder would crash when asked to process a varying because of a missing 'break'.
Comment 3 Brent Fulgham 2014-01-11 23:32:47 PST
Created attachment 220961 [details]
Patch
Comment 4 WebKit Commit Bot 2014-01-11 23:34:16 PST
Attachment 220961 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast/canvas/webgl/glsl-conformance-expected.txt', u'LayoutTests/fast/canvas/webgl/glsl-conformance.html', u'Source/WebCore/ChangeLog', u'Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp', u'Source/WebCore/platform/graphics/GraphicsContext3D.h', u'Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp', '--commit-queue']" exit_code: 1
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:1347:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:1349:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:1347:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:1349:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
Total errors found: 4 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 EFL EWS Bot 2014-01-11 23:38:28 PST
Comment on attachment 220961 [details]
Patch

Attachment 220961 [details] did not pass efl-ews (efl):
Output: http://webkit-queues.appspot.com/results/6046675881689088
Comment 6 Brent Fulgham 2014-01-11 23:47:32 PST
This bug was introduced by http://trac.webkit.org/changeset/156352, when we turned on the ANGLE name mangling.
Comment 7 Brent Fulgham 2014-01-11 23:51:12 PST
Created attachment 220963 [details]
Revised to help EFL/GTK to build properly
Comment 8 WebKit Commit Bot 2014-01-11 23:54:22 PST
Attachment 220963 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast/canvas/webgl/glsl-conformance-expected.txt', u'LayoutTests/fast/canvas/webgl/glsl-conformance.html', u'Source/WebCore/ChangeLog', u'Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp', u'Source/WebCore/platform/graphics/GraphicsContext3D.h', u'Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp', '--commit-queue']" exit_code: 1
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:1347:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:1349:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:1347:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:1349:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
Total errors found: 4 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 EFL EWS Bot 2014-01-12 05:44:56 PST
Comment on attachment 220963 [details]
Revised to help EFL/GTK to build properly

Attachment 220963 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/6202724660019200
Comment 10 Dean Jackson 2014-01-12 13:34:12 PST
Comment on attachment 220963 [details]
Revised to help EFL/GTK to build properly

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

> Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp:63
>      case SH_VARYINGS:
>          symbolMaxNameLengthType = SH_VARYING_MAX_LENGTH;
> +        break;

Ouch! :)
Comment 11 Brent Fulgham 2014-01-12 17:19:53 PST
(In reply to comment #9)
> (From update of attachment 220963 [details])
> Attachment 220963 [details] did not pass efl-wk2-ews (efl-wk2):
> Output: http://webkit-queues.appspot.com/results/6202724660019200

The error is not related to this patch:

[ 19%] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/DerivedSources/WebCore/JSOESElementIndexUint.cpp.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
Comment 12 Brent Fulgham 2014-01-12 17:22:13 PST
Committed r161843: <http://trac.webkit.org/changeset/161843>
Comment 13 WebKit Commit Bot 2014-01-12 22:21:48 PST
Re-opened since this is blocked by bug 126871
Comment 14 Brent Fulgham 2014-01-13 10:17:51 PST
Committed r161889: <http://trac.webkit.org/changeset/161889>