Changeset 269040 in webkit
- Timestamp:
- Oct 27, 2020 8:34:01 AM (3 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r269039 r269040 1 2020-10-27 Miguel Gomez <magomez@igalia.com> 2 3 [WPE] REGRESSION(r268992) Redefinition of min() inside TextureMapperShaderProgram for GLES > 3.0 4 https://bugs.webkit.org/show_bug.cgi?id=218231 5 6 Reviewed by Sergio Villar Senin. 7 8 Remove the definition of the min() function and replace its usage with an if. This works for 9 every GLSL version. 10 11 * platform/graphics/texmap/TextureMapperShaderProgram.cpp: 12 (WebCore::TextureMapperShaderProgram::create): 13 (WebCore::STRINGIFY): Deleted. 14 1 15 2020-10-27 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp
r268992 r269040 225 225 in vec2 v_transformedTexCoord; 226 226 in vec4 v_nonProjectedPosition; 227 );228 #else229 // 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 227 ); 239 228 #endif … … 478 467 // and the projection screws the Z component. We need the real 3D position that comes from 479 468 // the nonProjectedPosition variable. 480 int nRects = min(ROUNDED_RECT_MAX_RECTS, u_roundedRectNumber); 469 int nRects = u_roundedRectNumber; 470 if (nRects > ROUNDED_RECT_MAX_RECTS) 471 nRects = ROUNDED_RECT_MAX_RECTS; 472 481 473 for (int rectIndex = 0; rectIndex < nRects; rectIndex++) { 482 474 vec4 fragCoord = u_roundedRectInverseTransformMatrix[rectIndex] * v_nonProjectedPosition; … … 588 580 #if USE(OPENGL_ES) 589 581 fragmentShaderBuilder.append(fragmentTemplateLT320Vars); 590 fragmentShaderBuilder.append(fragmentTemplateES);591 582 #else 592 583 if (glVersion >= 320)
Note: See TracChangeset
for help on using the changeset viewer.