Merge lp:~loic.molinari/ubuntu-ui-toolkit/ubuntu-ui-toolkit-adreno-320-shader-compiler-workaround into lp:ubuntu-ui-toolkit/staging

Proposed by Loïc Molinari on 2015-10-02
Status: Merged
Merge reported by: Tim Peeters
Merged at revision: not available
Proposed branch: lp:~loic.molinari/ubuntu-ui-toolkit/ubuntu-ui-toolkit-adreno-320-shader-compiler-workaround
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 55 lines (+8/-4)
4 files modified
src/Ubuntu/Components/plugin/shaders/shape.frag (+2/-1)
src/Ubuntu/Components/plugin/shaders/shape_mipmap.frag (+2/-1)
src/Ubuntu/Components/plugin/shaders/shapeoverlay.frag (+2/-1)
src/Ubuntu/Components/plugin/shaders/shapeoverlay_mipmap.frag (+2/-1)
To merge this branch: bzr merge lp:~loic.molinari/ubuntu-ui-toolkit/ubuntu-ui-toolkit-adreno-320-shader-compiler-workaround
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve on 2015-10-07
Tim Peeters 2015-10-02 Approve on 2015-10-02
Gerry Boland 2015-10-02 Approve on 2015-10-02
Review via email: mp+273262@code.launchpad.net

Commit Message

[UbuntuShape] Workaround Adreno 320's shader compiler bug.

Description of the Change

[UbuntuShape] Workaround Adreno 320's shader compiler bug.

To post a comment you must log in.
Gerry Boland (gerboland) wrote :

Confirmed fixes crash on Flo & Mako.

review: Approve
Tim Peeters (tpeeters) wrote :

Thanks Loic & Gerry.

Code looks good, happroving.

review: Approve
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Ubuntu/Components/plugin/shaders/shape.frag'
2--- src/Ubuntu/Components/plugin/shaders/shape.frag 2015-09-10 11:04:16 +0000
3+++ src/Ubuntu/Components/plugin/shaders/shape.frag 2015-10-02 16:23:55 +0000
4@@ -91,7 +91,8 @@
5 // Get the anti-aliased and resolution independent shape mask using distance fields.
6 lowp float distanceMin = abs(dist) * -distanceAA + 0.5;
7 lowp float distanceMax = abs(dist) * distanceAA + 0.5;
8- lowp float mask = smoothstep(distanceMin, distanceMax, shapeData[yCoord <= 0.0 ? 0 : 1]);
9+ lowp int shapeSide = yCoord <= 0.0 ? 0 : 1;
10+ lowp float mask = smoothstep(distanceMin, distanceMax, shapeData[shapeSide]);
11 // Get the shadow color outside of the shape mask.
12 lowp float shadow = (shapeData.b * -mask) + shapeData.b; // -ab + a = a(1 - b)
13 // Mask the current color then blend the shadow over the resulting color. We simply use
14
15=== modified file 'src/Ubuntu/Components/plugin/shaders/shape_mipmap.frag'
16--- src/Ubuntu/Components/plugin/shaders/shape_mipmap.frag 2015-09-10 11:04:16 +0000
17+++ src/Ubuntu/Components/plugin/shaders/shape_mipmap.frag 2015-10-02 16:23:55 +0000
18@@ -76,7 +76,8 @@
19
20 } else if (aspect == DROP_SHADOW) {
21 // Get the shape mask.
22- lowp float mask = shapeData[yCoord <= 0.0 ? 0 : 1];
23+ lowp int shapeSide = yCoord <= 0.0 ? 0 : 1;
24+ lowp float mask = shapeData[shapeSide];
25 // Get the shadow color outside of the shape mask.
26 lowp float shadow = (shapeData.b * -mask) + shapeData.b; // -ab + a = a(1 - b)
27 // Mask the current color then blend the shadow over the resulting color. We simply use
28
29=== modified file 'src/Ubuntu/Components/plugin/shaders/shapeoverlay.frag'
30--- src/Ubuntu/Components/plugin/shaders/shapeoverlay.frag 2015-09-10 11:04:16 +0000
31+++ src/Ubuntu/Components/plugin/shaders/shapeoverlay.frag 2015-10-02 16:23:55 +0000
32@@ -100,7 +100,8 @@
33 // Get the anti-aliased and resolution independent shape mask using distance fields.
34 lowp float distanceMin = abs(dist) * -distanceAA + 0.5;
35 lowp float distanceMax = abs(dist) * distanceAA + 0.5;
36- lowp float mask = smoothstep(distanceMin, distanceMax, shapeData[yCoord <= 0.0 ? 0 : 1]);
37+ lowp int shapeSide = yCoord <= 0.0 ? 0 : 1;
38+ lowp float mask = smoothstep(distanceMin, distanceMax, shapeData[shapeSide]);
39 // Get the shadow color outside of the shape mask.
40 lowp float shadow = (shapeData.b * -mask) + shapeData.b; // -ab + a = a(1 - b)
41 // Mask the current color then blend the shadow over the resulting color. We simply use
42
43=== modified file 'src/Ubuntu/Components/plugin/shaders/shapeoverlay_mipmap.frag'
44--- src/Ubuntu/Components/plugin/shaders/shapeoverlay_mipmap.frag 2015-09-10 11:04:16 +0000
45+++ src/Ubuntu/Components/plugin/shaders/shapeoverlay_mipmap.frag 2015-10-02 16:23:55 +0000
46@@ -87,7 +87,8 @@
47
48 } else if (aspect == DROP_SHADOW) {
49 // Get the shape mask.
50- lowp float mask = shapeData[yCoord <= 0.0 ? 0 : 1];
51+ lowp int shapeSide = yCoord <= 0.0 ? 0 : 1;
52+ lowp float mask = shapeData[shapeSide];
53 // Get the shadow color outside of the shape mask.
54 lowp float shadow = (shapeData.b * -mask) + shapeData.b; // -ab + a = a(1 - b)
55 // Mask the current color then blend the shadow over the resulting color. We simply use

Subscribers

People subscribed via source and target branches