Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Commit db3c95c

Browse files
[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): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent b0c7c41 commit db3c95c

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

Source/WebCore/ChangeLog

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
2020-10-26 Fujii Hironori <[email protected]>
2+
3+
[TextureMapper] min(genIType) isn't supported for GLSL ES < 3.0
4+
https://bugs.webkit.org/show_bug.cgi?id=218164
5+
6+
Reviewed by Don Olmstead.
7+
8+
Nothing is drawn in AC mode of WinCairo port since r268923.
9+
r268923 added a shader code of using min of int type which is
10+
supported since GLSL ES 3.0.
11+
12+
* platform/graphics/texmap/TextureMapperShaderProgram.cpp: Added fragmentTemplateES to define int type of min.
13+
(WebCore::TextureMapperShaderProgram::create):
14+
115
2020-10-26 Sam Weinig <[email protected]>
216

317
JSC special function forward declarations (e.g. JSC_DECLARE_HOST_FUNCTION) that are internal to a cpp file should be declared with static to avoid external linkage

Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,17 @@ static const char* fragmentTemplateGE320Vars =
225225
in vec2 v_transformedTexCoord;
226226
in vec4 v_nonProjectedPosition;
227227
);
228+
#else
229+
// min(genIType) isn't supported for GLSL ES < 3.0.
230+
static const char* fragmentTemplateES =
231+
STRINGIFY(
232+
int min(int x, int y)
233+
{
234+
if (x < y)
235+
return x;
236+
return y;
237+
}
238+
);
228239
#endif
229240

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

0 commit comments

Comments
 (0)