Skip to content

Commit

Permalink
Merge r268992 - [TextureMapper] min(genIType) isn't supported for GLS…
Browse files Browse the repository at this point in the history
…L ES < 3.0

https://bugs.webkit.org/show_bug.cgi?id=218164

Reviewed by Don Olmstead.

Nothing is drawn in AC mode of WinCairo port since r268923.
r268923 added a shader code of using min of int type which is
supported since GLSL ES 3.0.

* platform/graphics/texmap/TextureMapperShaderProgram.cpp: Added fragmentTemplateES to define int type of min.
(WebCore::TextureMapperShaderProgram::create):
  • Loading branch information
fujii authored and carlosgcampos committed Nov 20, 2020
1 parent 050c758 commit 942bff4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,17 @@
2020-10-26 Fujii Hironori <Hironori.Fujii@sony.com>

[TextureMapper] min(genIType) isn't supported for GLSL ES < 3.0
https://bugs.webkit.org/show_bug.cgi?id=218164

Reviewed by Don Olmstead.

Nothing is drawn in AC mode of WinCairo port since r268923.
r268923 added a shader code of using min of int type which is
supported since GLSL ES 3.0.

* platform/graphics/texmap/TextureMapperShaderProgram.cpp: Added fragmentTemplateES to define int type of min.
(WebCore::TextureMapperShaderProgram::create):

2020-11-13 Miguel Gomez <magomez@igalia.com>

[GTK][WPE] FilterInfo must cleared when reusing BitmapTextureGL
Expand Down
Expand Up @@ -225,6 +225,17 @@ static const char* fragmentTemplateGE320Vars =
in vec2 v_transformedTexCoord;
in vec4 v_nonProjectedPosition;
);
#else
// min(genIType) isn't supported for GLSL ES < 3.0.
static const char* fragmentTemplateES =
STRINGIFY(
int min(int x, int y)
{
if (x < y)
return x;
return y;
}
);
#endif

static const char* fragmentTemplateCommon =
Expand Down Expand Up @@ -576,6 +587,7 @@ Ref<TextureMapperShaderProgram> TextureMapperShaderProgram::create(TextureMapper
// Append the appropriate input/output variable definitions.
#if USE(OPENGL_ES)
fragmentShaderBuilder.append(fragmentTemplateLT320Vars);
fragmentShaderBuilder.append(fragmentTemplateES);
#else
if (glVersion >= 320)
fragmentShaderBuilder.append(fragmentTemplateGE320Vars);
Expand Down

0 comments on commit 942bff4

Please sign in to comment.