From fd565ec6073c7e09cd76f23817ed940b73ef240f Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 31 Mar 2015 13:50:31 +0200 Subject: Android: Work around bug on Samsung Galaxy Tab 3 10.1 After installing the Android 4.4.2 upgrade on Samsung Galaxy Tab 3 10.1, one of the vertex shaders in Qt Quick stopped compiling. The issue seems to be that this particular shader triggers a bug in the driver, and a simple work-around is to replace the ternary conditional operator with a simple if-statement. [ChangeLog][Android] Fixed a vertex shader compilation issue on certain OpenGL drivers. Change-Id: I2f878215a753a7e222c46c0f85a84b0bc81d523a Task-number: QTBUG-43515 Reviewed-by: Andy Nichols --- src/quick/scenegraph/shaders/smoothtexture.vert | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/quick') diff --git a/src/quick/scenegraph/shaders/smoothtexture.vert b/src/quick/scenegraph/shaders/smoothtexture.vert index 1ce824a68f..900fbc6a72 100644 --- a/src/quick/scenegraph/shaders/smoothtexture.vert +++ b/src/quick/scenegraph/shaders/smoothtexture.vert @@ -48,5 +48,8 @@ void main() bool onEdge = any(notEqual(vertexOffset, vec2(0.))); bool outerEdge = all(equal(texCoordOffset, vec2(0.))); - vertexOpacity = onEdge && outerEdge ? 0. : opacity; + if (onEdge && outerEdge) + vertexOpacity = 0.; + else + vertexOpacity = opacity; } \ No newline at end of file -- cgit v1.2.3