[vivid-overlay] unity8 fails to start on the emulator
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
Critical
|
Pat McGowan | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Critical
|
Tim Peeters | ||
unity8 (Ubuntu) |
Fix Released
|
Undecided
|
Michael Terry |
Bug Description
phablet@
current build number: 140
device name: generic_x86
channel: ubuntu-
last update: 2015-05-25 12:02:10
version version: 140
version ubuntu: 20150525
version device: 20150210
version custom: 20150525
When starting unity8 (this started at image 136, probably when mir 0.13 landed):
phablet@
()
[1432595001.896139] mirplatform: Found graphics driver: dummy
[1432595001.898447] mirplatform: Found graphics driver: android
qtmir.mir: MirServer created
[1432595003.675225] Server: Starting
[1432595003.679331] Loader: Loading modules from: /usr/lib/
[1432595003.679501] Loader: Loading module: /usr/lib/
[1432595003.680673] Loader: Loading module: /usr/lib/
[1432595003.681107] <WARNING> Loader: Failed to load module: /usr/lib/
[1432595003.684868] Loader: Loading module: /usr/lib/
[1432595003.685014] mirplatform: Found graphics driver: dummy
[1432595003.685211] mirplatform: Found graphics driver: android
[1432595003.685416] Platform Loader: Selected driver: android (version 0.13.0)
qtmir.mir: PromptSessionLi
qtmir.mir: SessionListener
qtmir.mir: MirShell::MirShell
[1432595003.883766] DisplayServer: Mir version 0.13.0
QtCompositor:
qtmir.clipboard: D-Bus registration successful.
Mode argument was not provided or was set to an illegal value. Using default value of --mode= "full-greeter"
Cannot create window: no screens available
With version 135 it starts fine, but not fully functional, giving this error:
QOpenGLShader:
0:2(1): error: #extension directive is not allowed in the middle of a shader
*** Problematic Fragment shader source code ***
#extension GL_OES_
#define lowp
#define mediump
#define highp
// Copyright © 2015 Canonical Ltd.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; version 3.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://
//
// Author: Loïc Molinari <email address hidden>
// Static flow control (branching on a uniform value) is fast on most GPUs (including ultra-low
// power ones) because it allows to use the same shader execution path for an entire draw call. We
// rely on that technique here (also known as "uber-shader" solution) to avoid the complexity of
// dealing with a multiple shaders solution.
// FIXME(loicm) Validate GPU behavior with regards to static flow control.
uniform sampler2D shapeTexture;
uniform sampler2D sourceTexture;
uniform lowp vec2 dfdtFactors;
uniform lowp vec2 opacityFactors;
uniform lowp float sourceOpacity;
uniform lowp float distanceAA;
uniform bool textured;
uniform mediump int aspect;
varying mediump vec2 shapeCoord;
varying mediump vec4 sourceCoord;
varying lowp vec4 backgroundColor;
const mediump int FLAT = 0x08; // 1 << 3
const mediump int INSET = 0x10; // 1 << 4
void main(void)
{
lowp vec4 shapeData = texture2D(
lowp vec4 color = backgroundColor;
// FIXME(loicm) Would be better to use a bitfield but bitwise ops have only been integrated in
// GLSL 1.3 (OpenGL 3) and GLSL ES 3 (OpenGL ES 3).
if (textured) {
// Blend the source over the current color.
// FIXME(loicm) sign() is far from optimal. Call texture2D() at beginning of scope.
lowp vec2 axisMask = -sign((
lowp float mask = clamp(axisMask.x + axisMask.y, 0.0, 1.0);
lowp vec4 source = texture2D(
color = vec4(1.0 - source.a) * color + source;
}
// Get screen-space derivative of texture coordinate t representing the normalized distance
// between 2 pixels. dFd*() unfortunately have to be called outside of branches in order to work
// correctly with VMware's "Gallium 0.4 on SVGA3D".
lowp vec2 derivatives = vec2(dFdx(
lowp float dfdt = dfdtFactors.x != 0.0 ? derivatives.x : derivatives.y;
if (aspect == FLAT) {
// Mask the current color with an anti-aliased and resolution independent shape mask built
// from distance fields.
lowp float distanceMin = abs(dfdt) * -distanceAA + 0.5;
lowp float distanceMax = abs(dfdt) * distanceAA + 0.5;
color *= smoothstep(
} else if (aspect == INSET) {
// The vertex layout of the shape is made so that the derivative is negative from top to
// middle and positive from middle to bottom.
lowp float shapeSide = dfdt * dfdtFactors.y <= 0.0 ? 0.0 : 1.0;
// Blend the shape inner shadow over the current color. The shadow color is black, its
// translucency is stored in the texture.
lowp float shadow = shapeData[
color = vec4(1.0 - shadow) * color + vec4(0.0, 0.0, 0.0, shadow);
// Get the anti-aliased and resolution independent shape mask using distance fields.
lowp float distanceMin = abs(dfdt) * -distanceAA + 0.5;
lowp float distanceMax = abs(dfdt) * distanceAA + 0.5;
lowp vec2 mask = smoothstep(
// Get the bevel color. The bevel is made of the top mask masked with the bottom mask. A
// gradient from the bottom (1) to the middle (0) of the shape is used to factor out values
// resulting from the mask anti-aliasing. The bevel color is white with 60% opacity.
lowp float bevel = (mask.x * -mask.y) + mask.x; // -ab + a = a(1 - b)
lowp float gradient = clamp((shapeSide * -shapeCoord.t) + shapeSide, 0.0, 1.0);
bevel *= gradient * 0.6;
// Mask the current color then blend the bevel over the resulting color. We simply use
// additive blending since the bevel has already been masked.
color = (color * vec4(mask[
}
gl_FragColor = color * opacityFactors.
}
***
shader compilation failed:
""
Adb is broken because of bug 1458043, so use the following workaround to get it to work again:
$ sudo ubuntu-emulator create --channel=
$ mkdir -p /tmp/mount1 /tmp/mount2
$ sudo mount ~/.local/
$ sudo mount /tmp/mount1/
$ sudo vi /tmp/mount2/
#! /bin/sh
# Avoid changing the the property when running on the emulator
if ! grep -q "qemu=1" /proc/cmdline; then
sed -i '/^persist.
fi
$ sudo umount /tmp/mount2
$ sudo umount /tmp/mount1
Related branches
- PS Jenkins bot: Approve (continuous-integration)
- Tim Peeters: Abstain
-
Diff: 316 lines (+258/-3)6 files modifiedsrc/Ubuntu/Components/plugin/plugin.pri (+3/-1)
src/Ubuntu/Components/plugin/plugin.qrc (+2/-0)
src/Ubuntu/Components/plugin/shaders/shape_no_dfdy.frag (+112/-0)
src/Ubuntu/Components/plugin/shaders/shapeoverlay_no_dfdy.frag (+121/-0)
src/Ubuntu/Components/plugin/ucubuntushape.cpp (+10/-1)
src/Ubuntu/Components/plugin/ucubuntushapeoverlay.cpp (+10/-1)
- Albert Astals Cid (community): Approve
- PS Jenkins bot (community): Needs Fixing (continuous-integration)
-
Diff: 112 lines (+16/-29)4 files modifiedqml/Shell.qml (+7/-8)
qml/Tutorial/Tutorial.qml (+0/-7)
qml/Tutorial/TutorialContent.qml (+2/-9)
tests/qmltests/Tutorial/tst_Tutorial.qml (+7/-5)
Changed in mir (Ubuntu): | |
importance: | Undecided → Critical |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
importance: | Undecided → High |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | New → Triaged |
importance: | High → Critical |
assignee: | nobody → Loïc Molinari (loic.molinari) |
Changed in canonical-devices-system-image: | |
assignee: | nobody → Pat McGowan (pat-mcgowan) |
importance: | Undecided → Critical |
milestone: | none → ww28-2015 |
status: | New → Confirmed |
tags: | added: lt-blocker lt-category-visible |
Changed in canonical-devices-system-image: | |
milestone: | ww28-2015 → ww34-2015 |
Changed in canonical-devices-system-image: | |
status: | Confirmed → In Progress |
no longer affects: | mir |
no longer affects: | mir (Ubuntu) |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | Triaged → In Progress |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
assignee: | Loïc Molinari (loic.molinari) → Tim Peeters (tpeeters) |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in unity8 (Ubuntu): | |
status: | New → Fix Committed |
assignee: | nobody → Michael Terry (mterry) |
Changed in canonical-devices-system-image: | |
status: | In Progress → Fix Committed |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |
Changed in unity8 (Ubuntu): | |
status: | Fix Committed → Fix Released |
Status changed to 'Confirmed' because the bug affects multiple users.