Title: [269040] trunk/Source/WebCore
- Revision
- 269040
- Author
- [email protected]
- Date
- 2020-10-27 08:34:01 -0700 (Tue, 27 Oct 2020)
Log Message
[WPE] REGRESSION(r268992) Redefinition of min() inside TextureMapperShaderProgram for GLES > 3.0
https://bugs.webkit.org/show_bug.cgi?id=218231
Reviewed by Sergio Villar Senin.
Remove the definition of the min() function and replace its usage with an if. This works for
every GLSL version.
* platform/graphics/texmap/TextureMapperShaderProgram.cpp:
(WebCore::TextureMapperShaderProgram::create):
(WebCore::STRINGIFY): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (269039 => 269040)
--- trunk/Source/WebCore/ChangeLog 2020-10-27 15:26:01 UTC (rev 269039)
+++ trunk/Source/WebCore/ChangeLog 2020-10-27 15:34:01 UTC (rev 269040)
@@ -1,3 +1,17 @@
+2020-10-27 Miguel Gomez <[email protected]>
+
+ [WPE] REGRESSION(r268992) Redefinition of min() inside TextureMapperShaderProgram for GLES > 3.0
+ https://bugs.webkit.org/show_bug.cgi?id=218231
+
+ Reviewed by Sergio Villar Senin.
+
+ Remove the definition of the min() function and replace its usage with an if. This works for
+ every GLSL version.
+
+ * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
+ (WebCore::TextureMapperShaderProgram::create):
+ (WebCore::STRINGIFY): Deleted.
+
2020-10-27 Chris Dumez <[email protected]>
AudioContext.suspend() should not reject promise when audio session is interrupted
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp (269039 => 269040)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp 2020-10-27 15:26:01 UTC (rev 269039)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp 2020-10-27 15:34:01 UTC (rev 269040)
@@ -225,17 +225,6 @@
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 =
@@ -477,7 +466,10 @@
// We can't use gl_fragCoord for the fragment position because thats the projected point
// and the projection screws the Z component. We need the real 3D position that comes from
// the nonProjectedPosition variable.
- int nRects = min(ROUNDED_RECT_MAX_RECTS, u_roundedRectNumber);
+ int nRects = u_roundedRectNumber;
+ if (nRects > ROUNDED_RECT_MAX_RECTS)
+ nRects = ROUNDED_RECT_MAX_RECTS;
+
for (int rectIndex = 0; rectIndex < nRects; rectIndex++) {
vec4 fragCoord = u_roundedRectInverseTransformMatrix[rectIndex] * v_nonProjectedPosition;
color *= roundedRectCoverage(fragCoord.xy, rectIndex * 3);
@@ -587,7 +579,6 @@
// Append the appropriate input/output variable definitions.
#if USE(OPENGL_ES)
fragmentShaderBuilder.append(fragmentTemplateLT320Vars);
- fragmentShaderBuilder.append(fragmentTemplateES);
#else
if (glVersion >= 320)
fragmentShaderBuilder.append(fragmentTemplateGE320Vars);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes