Changeset 225800 in webkit


Ignore:
Timestamp:
Dec 12, 2017 1:11:11 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

WebGL TextureMapperShaderProgram shaders don't compile in MSVC
https://bugs.webkit.org/show_bug.cgi?id=180709

Patch by Christopher Reid <chris.reid@sony.com> on 2017-12-12
Reviewed by Myles C. Maxfield.

No new tests, no change in behavior.

Vertex and Fragment shaders were not compiling because TextureMapperShaderProgram.cpp was
stringifying "#if USE(OPENGL_ES_2) ... #endif" into the shaders rather than evaluating these
preprocessor directives before the STRINGIFY expansion.

Moved these #if conditions outside of STRINGIFY to remove compiler ambiguity.

  • platform/graphics/texmap/TextureMapperShaderProgram.cpp:
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r225798 r225800  
     12017-12-12  Christopher Reid  <chris.reid@sony.com>
     2
     3        WebGL TextureMapperShaderProgram shaders don't compile in MSVC
     4        https://bugs.webkit.org/show_bug.cgi?id=180709
     5
     6        Reviewed by Myles C. Maxfield.
     7
     8        No new tests, no change in behavior.
     9
     10        Vertex and Fragment shaders were not compiling because TextureMapperShaderProgram.cpp was
     11        stringifying "#if USE(OPENGL_ES_2) ... #endif" into the shaders rather than evaluating these
     12        preprocessor directives before the STRINGIFY expansion.
     13
     14        Moved these #if conditions outside of STRINGIFY to remove compiler ambiguity.
     15
     16        * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
     17
    1182017-12-12  Zach Li  <zachli@apple.com>
    219        [WK2] Expose image via WKBundleHitTestResult API.
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp

    r224192 r225800  
    5959    TEXTURE_SPACE_MATRIX_PRECISION_DIRECTIVE
    6060#endif
    61     STRINGIFY(
    62 #if USE(OPENGL_ES_2)
     61#if USE(OPENGL_ES_2)
     62    STRINGIFY(
    6363        precision TextureSpaceMatrixPrecision float;
    64 #endif
     64    )
     65#endif
     66    STRINGIFY(
    6567        attribute vec4 a_vertex;
    6668        varying vec2 v_texCoord;
     
    169171    TEXTURE_SPACE_MATRIX_PRECISION_DIRECTIVE
    170172#endif
    171     STRINGIFY(
    172 #if USE(OPENGL_ES_2)
     173#if USE(OPENGL_ES_2)
     174    STRINGIFY(
    173175        precision TextureSpaceMatrixPrecision float;
    174 #endif
     176    )
     177#endif
     178    STRINGIFY(
    175179        uniform mat4 u_textureSpaceMatrix;
    176180        uniform mat4 u_textureColorSpaceMatrix;
    177 #if USE(OPENGL_ES_2)
     181    )
     182#if USE(OPENGL_ES_2)
     183    STRINGIFY(
    178184        precision mediump float;
    179 #endif
    180     );
     185    )
     186#endif
     187    ;
    181188
    182189// Input/output variables definition for both GLES and OpenGL < 3.2.
Note: See TracChangeset for help on using the changeset viewer.