Bug 180709 - WebGL TextureMapperShaderProgram shaders don't compile in MSVC
Summary: WebGL TextureMapperShaderProgram shaders don't compile in MSVC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-12-12 11:24 PST by Christopher Reid
Modified: 2017-12-12 13:12 PST (History)
16 users (show)

See Also:


Attachments
patch (2.31 KB, patch)
2017-12-12 12:22 PST, Christopher Reid
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Reid 2017-12-12 11:24:11 PST
MSVC likes to expand __VA_ARGS__ differently than clang and gcc which is causing shader programs to not compile in TextureMapperShaderProgram.cpp due to "#if USE(OPENGL_ES_2)" being added to the shader programs.
Comment 1 Christopher Reid 2017-12-12 11:29:05 PST
Here's a simple program compiled in MSVC to show what is happening and the difference in expansion:
MSVC: http://rextester.com/PXT40494
CLANG: http://rextester.com/SZXMYM65465 (GCC acts the same as CLANG)
Comment 2 Christopher Reid 2017-12-12 12:22:56 PST
Created attachment 329138 [details]
patch
Comment 3 Build Bot 2017-12-12 12:25:59 PST
Attachment 329138 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp:66:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp:187:  Line contains only semicolon. If this should be an empty statement, use { } instead.  [whitespace/semicolon] [5]
Total errors found: 2 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 WebKit Commit Bot 2017-12-12 13:11:15 PST
Comment on attachment 329138 [details]
patch

Clearing flags on attachment: 329138

Committed r225800: <https://trac.webkit.org/changeset/225800>
Comment 5 WebKit Commit Bot 2017-12-12 13:11:16 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2017-12-12 13:12:28 PST
<rdar://problem/36002359>