Bug 180709

Summary: WebGL TextureMapperShaderProgram shaders don't compile in MSVC
Product: WebKit Reporter: Christopher Reid <chris.reid>
Component: WebGLAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: achristensen, cmarcelo, commit-queue, darin, dino, don.olmstead, ews, kondapallykalyan, luiz, magomez, mcatanzaro, mmaxfield, noam, pvollan, webkit-bug-importer, zan
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
patch none

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]
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]

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