From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [PATCH][meta-qt5 2/2] qtwayland: fix qml-compositor shader
Date: Sat, 8 Feb 2014 19:46:29 +0100 [thread overview]
Message-ID: <20140208184629.GP3698@jama> (raw)
In-Reply-To: <1391628912-17880-2-git-send-email-schnitzeltony@googlemail.com>
[-- Attachment #1: Type: text/plain, Size: 4954 bytes --]
On Wed, Feb 05, 2014 at 08:35:12PM +0100, Andreas Müller wrote:
> running
>
> | qmlcompositor -platform eglfs
> | qmlscene -platform wayland foo.qml
>
> causes
>
> QOpenGLShader::compile(Fragment): Compile failed.
> ERROR: 0:6: 'float' : No precision defined for this type
> ERROR: 0:7: 'vec4' : No precision defined for this type
> ERROR: 0:8: 'float' : No precision defined for this type
> ERROR: 0:11: 'vec4' : No precision defined for this type
> ERROR: 0:12: 'vec3' : No precision defined for this type
> ERROR: 0:13: 'vec3' : No precision defined for this type
> ERROR: 6 compilation errors. No code generated.
>
> *** Problematic Fragment shader source code ***
>
> uniform sampler2D source;
> uniform float qt_Opacity;
> uniform vec4 color;
> uniform float blend;
> varying highp vec2 qt_TexCoord0;
> void main() {
> vec4 sourceColor = texture2D(source, qt_TexCoord0);
> vec3 delta = sourceColor.rgb - vec3(0.5);
> vec3 lowerContrast = vec3(0.5) + 0.4 * delta;
> gl_FragColor = qt_Opacity * mix(sourceColor, color * sourceColor.a * dot(lowerContrast, vec3(11, 16, 5) * (1. / 32.)), blend);
> }
>
> ***
>
> Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
> ---
> ...002-Fix-ConstrastEffect-in-qml-compositor.patch | 48 ++++++++++++++++++++++
> recipes-qt/qt5/qtwayland_git.bb | 4 ++
> 2 files changed, 52 insertions(+)
> create mode 100644 recipes-qt/qt5/qtwayland/0002-Fix-ConstrastEffect-in-qml-compositor.patch
>
> diff --git a/recipes-qt/qt5/qtwayland/0002-Fix-ConstrastEffect-in-qml-compositor.patch b/recipes-qt/qt5/qtwayland/0002-Fix-ConstrastEffect-in-qml-compositor.patch
> new file mode 100644
> index 0000000..1b40be6
> --- /dev/null
> +++ b/recipes-qt/qt5/qtwayland/0002-Fix-ConstrastEffect-in-qml-compositor.patch
> @@ -0,0 +1,48 @@
> +From 309e9b03d24eb6b0b8fff04d883329c2f93a6a1c Mon Sep 17 00:00:00 2001
> +From: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
> +Date: Sun, 29 Dec 2013 14:15:41 +0100
> +Subject: [PATCH] Fix ConstrastEffect in qml-compositor
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +Specify precision to make the shader working.
> +
> +Change-Id: I055fe47e1073403dc981274236fa82e091e0eca4
> +Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
> +Reviewed-by: Andy Nichols <andy.nichols@digia.com>
> +Upstream-status: applied
This one should be Backport, but please check jansa/qt5-5.2.1 branch,
I've updated all recipes for 5.2.1 release and newer qtwayland revision
used there includes this patch already.
Your qtbase patch still does apply, I'll add that to branch now.
> +---
> + examples/qml-compositor/ContrastEffect.qml | 14 +++++++-------
> + 1 file changed, 7 insertions(+), 7 deletions(-)
> +
> +diff --git a/examples/qml-compositor/ContrastEffect.qml b/examples/qml-compositor/ContrastEffect.qml
> +index 5159950..c284b29 100644
> +--- a/examples/qml-compositor/ContrastEffect.qml
> ++++ b/examples/qml-compositor/ContrastEffect.qml
> +@@ -75,15 +75,15 @@ ShaderEffect {
> + vertexShader: source && source.isYInverted ? vShaderInvertedY : vShader
> +
> + fragmentShader: "
> +- uniform sampler2D source;
> +- uniform float qt_Opacity;
> +- uniform vec4 color;
> +- uniform float blend;
> ++ uniform lowp sampler2D source;
> ++ uniform highp float qt_Opacity;
> ++ uniform highp vec4 color;
> ++ uniform highp float blend;
> + varying highp vec2 qt_TexCoord0;
> + void main() {
> +- vec4 sourceColor = texture2D(source, qt_TexCoord0);
> +- vec3 delta = sourceColor.rgb - vec3(0.5);
> +- vec3 lowerContrast = vec3(0.5) + 0.4 * delta;
> ++ highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
> ++ highp vec3 delta = sourceColor.rgb - vec3(0.5);
> ++ highp vec3 lowerContrast = vec3(0.5) + 0.4 * delta;
> + gl_FragColor = qt_Opacity * mix(sourceColor, color * sourceColor.a * dot(lowerContrast, vec3(11, 16, 5) * (1. / 32.)), blend);
> + }
> + "
> +--
> +1.8.3.1
> +
> diff --git a/recipes-qt/qt5/qtwayland_git.bb b/recipes-qt/qt5/qtwayland_git.bb
> index 640373e..cf91908 100644
> --- a/recipes-qt/qt5/qtwayland_git.bb
> +++ b/recipes-qt/qt5/qtwayland_git.bb
> @@ -5,3 +5,7 @@ require ${PN}.inc
> # qt5-git PV is only to indicate that this recipe is compatible with qt5 5.2.0
>
> SRCREV = "3e9412e2fd91e64a565ed8ddbef76f57ca9413d5"
> +
> +SRC_URI += " \
> + file://0002-Fix-ConstrastEffect-in-qml-compositor.patch \
> +"
> --
> 1.8.3.1
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
next prev parent reply other threads:[~2014-02-08 18:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-05 19:35 [PATCH][meta-qt5 1/2] qtbase: eglfs: fix egl error for platforms only supporting one window/surface Andreas Müller
2014-02-05 19:35 ` [PATCH][meta-qt5 2/2] qtwayland: fix qml-compositor shader Andreas Müller
2014-02-08 18:46 ` Martin Jansa [this message]
2014-02-10 8:36 ` Andreas Müller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140208184629.GP3698@jama \
--to=martin.jansa@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.