* [PATCH][meta-qt5 1/2] qtbase: eglfs: fix egl error for platforms only supporting one window/surface @ 2014-02-05 19:35 Andreas Müller 2014-02-05 19:35 ` [PATCH][meta-qt5 2/2] qtwayland: fix qml-compositor shader Andreas Müller 0 siblings, 1 reply; 4+ messages in thread From: Andreas Müller @ 2014-02-05 19:35 UTC (permalink / raw) To: openembedded-devel Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> --- recipes-qt/qt5/qtbase.inc | 1 + ...gl-error-for-platforms-only-supporting-on.patch | 63 ++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 recipes-qt/qt5/qtbase/0015-eglfs-fix-egl-error-for-platforms-only-supporting-on.patch diff --git a/recipes-qt/qt5/qtbase.inc b/recipes-qt/qt5/qtbase.inc index 83ce25b..1fbe765 100644 --- a/recipes-qt/qt5/qtbase.inc +++ b/recipes-qt/qt5/qtbase.inc @@ -19,6 +19,7 @@ SRC_URI += "\ file://0012-qtbase-allow-build-of-examples.patch \ file://0013-QOpenGLPaintDevice-sub-area-support.patch \ file://0014-enables-tslib-device-to-be-read-from-env-variable.patch \ + file://0015-eglfs-fix-egl-error-for-platforms-only-supporting-on.patch \ " DEPENDS += "qtbase-native" diff --git a/recipes-qt/qt5/qtbase/0015-eglfs-fix-egl-error-for-platforms-only-supporting-on.patch b/recipes-qt/qt5/qtbase/0015-eglfs-fix-egl-error-for-platforms-only-supporting-on.patch new file mode 100644 index 0000000..96d8281 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0015-eglfs-fix-egl-error-for-platforms-only-supporting-on.patch @@ -0,0 +1,63 @@ +From 093ae963179c237afae7844f67d226bc2f1f5a40 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> +Date: Wed, 5 Feb 2014 18:35:08 +0100 +Subject: [PATCH] eglfs: fix egl error for platforms only supporting one + window/surface +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +running qmlscene -platform eglfs <filename>.qml + +caused + +EGL Error : Could not create the egl surface: error = 0x3003 + +Rebased version of [1-2] + +Upstream-Status: unknown + +[1] http://repository.timesys.com/buildsources/q/qt-everywhere-opensource/qt-everywhere-opensource-5.1.1/qt-everywhere-opensource-5.1.1-qeglfswindow.cpp.patch +[2] https://github.com/prabindh/qt-configs/blob/master/qt5_1.0_Feb13/qeglfswindow.cpp.patch + +Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> +--- + src/plugins/platforms/eglfs/qeglfswindow.cpp | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/src/plugins/platforms/eglfs/qeglfswindow.cpp b/src/plugins/platforms/eglfs/qeglfswindow.cpp +index bba00da..567820c 100644 +--- a/src/plugins/platforms/eglfs/qeglfswindow.cpp ++++ b/src/plugins/platforms/eglfs/qeglfswindow.cpp +@@ -87,6 +87,16 @@ void QEglFSWindow::create() + if (m_flags.testFlag(Created)) + return; + ++ static EGLSurface __singleWindowSurface; ++ if(QEglFSHooks::hooks() && !QEglFSHooks::hooks()->hasCapability(QPlatformIntegration::MultipleWindows) && (__singleWindowSurface)) ++ { ++ m_surface = __singleWindowSurface; ++#ifdef QEGL_EXTRA_DEBUG ++ qWarning("Surface recreate request, re-using %x\n", m_surface); ++#endif ++ return; ++ } ++ + m_flags = Created; + m_wid = newWId(); + +@@ -130,6 +140,11 @@ void QEglFSWindow::create() + + resetSurface(); + ++ if(QEglFSHooks::hooks() && !QEglFSHooks::hooks()->hasCapability(QPlatformIntegration::MultipleWindows)) ++ { ++ __singleWindowSurface = m_surface; ++ } ++ + screen->setPrimarySurface(m_surface); + + if (m_flags.testFlag(IsRaster)) { +-- +1.8.3.1 + -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH][meta-qt5 2/2] qtwayland: fix qml-compositor shader 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 ` Andreas Müller 2014-02-08 18:46 ` Martin Jansa 0 siblings, 1 reply; 4+ messages in thread From: Andreas Müller @ 2014-02-05 19:35 UTC (permalink / raw) To: openembedded-devel 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 +--- + 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH][meta-qt5 2/2] qtwayland: fix qml-compositor shader 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 2014-02-10 8:36 ` Andreas Müller 0 siblings, 1 reply; 4+ messages in thread From: Martin Jansa @ 2014-02-08 18:46 UTC (permalink / raw) To: openembedded-devel [-- 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 --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][meta-qt5 2/2] qtwayland: fix qml-compositor shader 2014-02-08 18:46 ` Martin Jansa @ 2014-02-10 8:36 ` Andreas Müller 0 siblings, 0 replies; 4+ messages in thread From: Andreas Müller @ 2014-02-10 8:36 UTC (permalink / raw) To: openembedded-devel@lists.openembedded.org On Sat, Feb 8, 2014 at 7:46 PM, Martin Jansa <martin.jansa@gmail.com> wrote: >> +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. > Will give 5.2.1 a test this week Andreas ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-10 8:36 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2014-02-10 8:36 ` Andreas Müller
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.