Title: [189331] trunk/Source/WebCore
- Revision
- 189331
- Author
- [email protected]
- Date
- 2015-09-03 19:08:24 -0700 (Thu, 03 Sep 2015)
Log Message
[Texmap] highp precision should be used conditionally for fragment shaders on OpenGL ES
https://bugs.webkit.org/show_bug.cgi?id=143993
Patch by Jinyoung Hur <[email protected]> on 2015-09-03
Reviewed by Martin Robinson.
There are some GPUs that do not support the GL_OES_fragment_precision_high extension. (e.g., Mali-T624)
Therefore, highp precision should be used in shader fragments conditionally using a proper preprocessor,
GL_FRAGMENT_PRECISION_HIGH.
Without this patch, nothing will be displayed on the screen if the running platform doesn't support the
GL_OES_fragment_precision_high extension.
No new tests, covered by existing tests.
* platform/graphics/texmap/TextureMapperShaderProgram.cpp:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (189330 => 189331)
--- trunk/Source/WebCore/ChangeLog 2015-09-04 01:39:37 UTC (rev 189330)
+++ trunk/Source/WebCore/ChangeLog 2015-09-04 02:08:24 UTC (rev 189331)
@@ -1,3 +1,20 @@
+2015-09-03 Jinyoung Hur <[email protected]>
+
+ [Texmap] highp precision should be used conditionally for fragment shaders on OpenGL ES
+ https://bugs.webkit.org/show_bug.cgi?id=143993
+
+ Reviewed by Martin Robinson.
+
+ There are some GPUs that do not support the GL_OES_fragment_precision_high extension. (e.g., Mali-T624)
+ Therefore, highp precision should be used in shader fragments conditionally using a proper preprocessor,
+ GL_FRAGMENT_PRECISION_HIGH.
+ Without this patch, nothing will be displayed on the screen if the running platform doesn't support the
+ GL_OES_fragment_precision_high extension.
+
+ No new tests, covered by existing tests.
+
+ * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
+
2015-09-03 Ryosuke Niwa <[email protected]>
Range.comparePoint shouldn't throw an exception if the range and the node are in the same detached tree
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp (189330 => 189331)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp 2015-09-04 01:39:37 UTC (rev 189330)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp 2015-09-04 02:08:24 UTC (rev 189331)
@@ -119,8 +119,18 @@
}
#define GLSL_DIRECTIVE(...) "#"#__VA_ARGS__"\n"
+
+#define TEXTURE_SPACE_MATRIX_PRECISION_DIRECTIVE \
+ GLSL_DIRECTIVE(ifdef GL_FRAGMENT_PRECISION_HIGH) \
+ GLSL_DIRECTIVE(define TextureSpaceMatrixPrecision highp) \
+ GLSL_DIRECTIVE(else) \
+ GLSL_DIRECTIVE(define TextureSpaceMatrixPrecision mediump) \
+ GLSL_DIRECTIVE(endif)
+
static const char* vertexTemplate =
+ TEXTURE_SPACE_MATRIX_PRECISION_DIRECTIVE
STRINGIFY(
+ precision TextureSpaceMatrixPrecision float;
attribute vec4 a_vertex;
uniform mat4 u_modelViewMatrix;
uniform mat4 u_projectionMatrix;
@@ -207,8 +217,9 @@
RECT_TEXTURE_DIRECTIVE
ANTIALIASING_TEX_COORD_DIRECTIVE
BLUR_CONSTANTS
+ TEXTURE_SPACE_MATRIX_PRECISION_DIRECTIVE
STRINGIFY(
- precision highp float;
+ precision TextureSpaceMatrixPrecision float;
uniform mat4 u_textureSpaceMatrix;
precision mediump float;
uniform SamplerType s_sampler;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes