Rebase to a later snapshot, drop 5.2 ABI patch

- Enable nogl backend
This commit is contained in:
Lubomir Rintel 2013-11-22 15:05:52 +01:00
parent 74bacfad8c
commit e1fc568f62
5 changed files with 190 additions and 159 deletions

View File

@ -0,0 +1,39 @@
From 79cc0a42d0af9f75a75565d18bad2c945981c274 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Fri, 22 Nov 2013 14:39:33 +0100
Subject: [PATCH] Need egl for egl
---
config.tests/egl/egl.pro | 3 ++-
config.tests/wayland_egl/wayland_egl.pro | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/config.tests/egl/egl.pro b/config.tests/egl/egl.pro
index 9886579..402477d 100644
--- a/config.tests/egl/egl.pro
+++ b/config.tests/egl/egl.pro
@@ -1,7 +1,8 @@
TARGET = egl
QT = core
-!contains(QT_CONFIG, opengl): error("wayland_egl support requires Qt configured with OpenGL")
+!contains(QT_CONFIG, opengl): error("egl support requires Qt configured with OpenGL")
+!contains(QT_CONFIG, egl): error("egl support requires Qt configured with EGL")
!contains(QT_CONFIG, no-pkg-config) {
CONFIG += link_pkgconfig
diff --git a/config.tests/wayland_egl/wayland_egl.pro b/config.tests/wayland_egl/wayland_egl.pro
index 3b7fdfe..42d6b13 100644
--- a/config.tests/wayland_egl/wayland_egl.pro
+++ b/config.tests/wayland_egl/wayland_egl.pro
@@ -2,6 +2,7 @@ TARGET = wayland_egl
QT = core
!contains(QT_CONFIG, opengl): error("wayland_egl support requires Qt configured with OpenGL")
+!contains(QT_CONFIG, egl): error("wayland_egl support requires Qt configured with EGL")
!contains(QT_CONFIG, no-pkg-config) {
CONFIG += link_pkgconfig
--
1.8.4.2

View File

@ -1,151 +0,0 @@
From 7b641c3f05c5b7cebbe5d9fbe90023dcf6eb9394 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Sun, 6 Oct 2013 13:12:36 +0200
Subject: [PATCH] Plugin API version 5.2
---
.../hardware_integration/qwaylandgraphicshardwareintegrationplugin.h | 2 +-
src/plugins/platforms/qwayland-brcm-egl/main.cpp | 2 +-
src/plugins/platforms/qwayland-egl/main.cpp | 2 +-
src/plugins/platforms/qwayland-nogl/main.cpp | 2 +-
src/plugins/platforms/qwayland-xcomposite-egl/main.cpp | 2 +-
src/plugins/platforms/qwayland-xcomposite-glx/main.cpp | 2 +-
src/plugins/waylandcompositors/brcm-egl/main.cpp | 2 +-
src/plugins/waylandcompositors/wayland-egl/main.cpp | 2 +-
src/plugins/waylandcompositors/xcomposite-egl/main.cpp | 2 +-
src/plugins/waylandcompositors/xcomposite-glx/main.cpp | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/compositor/hardware_integration/qwaylandgraphicshardwareintegrationplugin.h b/src/compositor/hardware_integration/qwaylandgraphicshardwareintegrationplugin.h
index 6d68a0c..62ed1a2 100644
--- a/src/compositor/hardware_integration/qwaylandgraphicshardwareintegrationplugin.h
+++ b/src/compositor/hardware_integration/qwaylandgraphicshardwareintegrationplugin.h
@@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE
class QWaylandGraphicsHardwareIntegration;
-#define QWaylandGraphicsHardwareIntegrationFactoryInterface_iid "org.qt-project.Qt.Compositor.QWaylandGraphicsHardwareIntegrationFactoryInterface.5.1"
+#define QWaylandGraphicsHardwareIntegrationFactoryInterface_iid "org.qt-project.Qt.Compositor.QWaylandGraphicsHardwareIntegrationFactoryInterface.5.2"
class Q_COMPOSITOR_EXPORT QWaylandGraphicsHardwareIntegrationPlugin : public QObject
{
diff --git a/src/plugins/platforms/qwayland-brcm-egl/main.cpp b/src/plugins/platforms/qwayland-brcm-egl/main.cpp
index 9862223..663d18b 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/main.cpp
+++ b/src/plugins/platforms/qwayland-brcm-egl/main.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.1" FILE "qwayland-brcm-egl.json")
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2" FILE "qwayland-brcm-egl.json")
public:
QStringList keys() const;
QPlatformIntegration *create(const QString&, const QStringList&);
diff --git a/src/plugins/platforms/qwayland-egl/main.cpp b/src/plugins/platforms/qwayland-egl/main.cpp
index 222cc1e..e5a0a2c 100644
--- a/src/plugins/platforms/qwayland-egl/main.cpp
+++ b/src/plugins/platforms/qwayland-egl/main.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.1" FILE "qwayland-egl.json")
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2" FILE "qwayland-egl.json")
public:
QStringList keys() const;
QPlatformIntegration *create(const QString&, const QStringList&);
diff --git a/src/plugins/platforms/qwayland-nogl/main.cpp b/src/plugins/platforms/qwayland-nogl/main.cpp
index 6069390..d0bdf7f 100644
--- a/src/plugins/platforms/qwayland-nogl/main.cpp
+++ b/src/plugins/platforms/qwayland-nogl/main.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.1" FILE "qwayland-nogl.json")
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2" FILE "qwayland-nogl.json")
public:
QStringList keys() const;
QPlatformIntegration *create(const QString&, const QStringList&);
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp b/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp
index 414830f..0d6bcff 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.1" FILE "qwayland-xcomposite-egl.json")
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2" FILE "qwayland-xcomposite-egl.json")
public:
QStringList keys() const;
QPlatformIntegration *create(const QString&, const QStringList&);
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp b/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp
index d442c81..98ca138 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp
+++ b/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.1" FILE "qwayland-xcomposite-glx.json")
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2" FILE "qwayland-xcomposite-glx.json")
public:
QStringList keys() const;
QPlatformIntegration *create(const QString&, const QStringList&);
diff --git a/src/plugins/waylandcompositors/brcm-egl/main.cpp b/src/plugins/waylandcompositors/brcm-egl/main.cpp
index 0fecd2e..8815fbb 100644
--- a/src/plugins/waylandcompositors/brcm-egl/main.cpp
+++ b/src/plugins/waylandcompositors/brcm-egl/main.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class QWaylandIntegrationPlugin : public QWaylandGraphicsHardwareIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Compositor.QWaylandGraphicsHardwareIntegrationFactoryInterface.5.1" FILE "brcm-egl.json")
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Compositor.QWaylandGraphicsHardwareIntegrationFactoryInterface.5.2" FILE "brcm-egl.json")
public:
QStringList keys() const;
QWaylandGraphicsHardwareIntegration *create(const QString&, const QStringList&);
diff --git a/src/plugins/waylandcompositors/wayland-egl/main.cpp b/src/plugins/waylandcompositors/wayland-egl/main.cpp
index 75a9fba..6bb1c7b 100644
--- a/src/plugins/waylandcompositors/wayland-egl/main.cpp
+++ b/src/plugins/waylandcompositors/wayland-egl/main.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class QWaylandIntegrationPlugin : public QWaylandGraphicsHardwareIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Compositor.QWaylandGraphicsHardwareIntegrationFactoryInterface.5.1" FILE "wayland-egl.json")
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Compositor.QWaylandGraphicsHardwareIntegrationFactoryInterface.5.2" FILE "wayland-egl.json")
public:
QStringList keys() const;
QWaylandGraphicsHardwareIntegration *create(const QString&, const QStringList&);
diff --git a/src/plugins/waylandcompositors/xcomposite-egl/main.cpp b/src/plugins/waylandcompositors/xcomposite-egl/main.cpp
index 3540d35..7dacb50 100644
--- a/src/plugins/waylandcompositors/xcomposite-egl/main.cpp
+++ b/src/plugins/waylandcompositors/xcomposite-egl/main.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class QWaylandIntegrationPlugin : public QWaylandGraphicsHardwareIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Compositor.QWaylandGraphicsHardwareIntegrationFactoryInterface.5.1" FILE "xcomposite-egl.json")
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Compositor.QWaylandGraphicsHardwareIntegrationFactoryInterface.5.2" FILE "xcomposite-egl.json")
public:
QStringList keys() const;
QWaylandGraphicsHardwareIntegration *create(const QString&, const QStringList&);
diff --git a/src/plugins/waylandcompositors/xcomposite-glx/main.cpp b/src/plugins/waylandcompositors/xcomposite-glx/main.cpp
index fdc7037..42d676b 100644
--- a/src/plugins/waylandcompositors/xcomposite-glx/main.cpp
+++ b/src/plugins/waylandcompositors/xcomposite-glx/main.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class QWaylandIntegrationPlugin : public QWaylandGraphicsHardwareIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Compositor.QWaylandGraphicsHardwareIntegrationFactoryInterface.5.1" FILE "xcomposite-glx.json")
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Compositor.QWaylandGraphicsHardwareIntegrationFactoryInterface.5.2" FILE "xcomposite-glx.json")
public:
QStringList keys() const;
QWaylandGraphicsHardwareIntegration *create(const QString&, const QStringList&);
--
1.8.3.1

View File

@ -0,0 +1,137 @@
From 84e3ffc449f67ed1aa3df66d6fca1c26e49125aa Mon Sep 17 00:00:00 2001
From: Andrew Knight <andrew.knight@digia.com>
Date: Fri, 22 Nov 2013 09:18:59 +0200
Subject: [PATCH] Wayland-EGL QPA: Support desktop OpenGL as well
There is no hard requirement on OpenGL ES 2 in this plugin, so allow
Desktop OpenGL as well.
Change-Id: I5b58f21c3640a4403dc6aa710838d4904d85f482
---
config.tests/egl/egl.pro | 2 +-
config.tests/wayland_egl/wayland_egl.pro | 2 +-
.../platforms/qwayland-egl/qwaylandeglinclude.h | 4 ----
.../platforms/qwayland-egl/qwaylandglcontext.cpp | 21 ++++++++++++++++++++-
.../platforms/qwayland-egl/qwaylandglcontext.h | 4 +++-
.../wayland-egl/waylandeglintegration.cpp | 3 ---
6 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/config.tests/egl/egl.pro b/config.tests/egl/egl.pro
index e96672e..9886579 100644
--- a/config.tests/egl/egl.pro
+++ b/config.tests/egl/egl.pro
@@ -1,7 +1,7 @@
TARGET = egl
QT = core
-!contains(QT_CONFIG, opengles2):error("wayland_egl support currently requires Qt configured with OpenGL ES2")
+!contains(QT_CONFIG, opengl): error("wayland_egl support requires Qt configured with OpenGL")
!contains(QT_CONFIG, no-pkg-config) {
CONFIG += link_pkgconfig
diff --git a/config.tests/wayland_egl/wayland_egl.pro b/config.tests/wayland_egl/wayland_egl.pro
index 0db9b04..3b7fdfe 100644
--- a/config.tests/wayland_egl/wayland_egl.pro
+++ b/config.tests/wayland_egl/wayland_egl.pro
@@ -1,7 +1,7 @@
TARGET = wayland_egl
QT = core
-!contains(QT_CONFIG, opengles2):error("wayland_egl support currently requires Qt configured with OpenGL ES2")
+!contains(QT_CONFIG, opengl): error("wayland_egl support requires Qt configured with OpenGL")
!contains(QT_CONFIG, no-pkg-config) {
CONFIG += link_pkgconfig
diff --git a/src/plugins/platforms/qwayland-egl/qwaylandeglinclude.h b/src/plugins/platforms/qwayland-egl/qwaylandeglinclude.h
index fb42d43..9b151a5 100644
--- a/src/plugins/platforms/qwayland-egl/qwaylandeglinclude.h
+++ b/src/plugins/platforms/qwayland-egl/qwaylandeglinclude.h
@@ -47,10 +47,6 @@
#include <wayland-egl.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
#define EGL_EGLEXT_PROTOTYPES
#include <EGL/egl.h>
#include <EGL/eglext.h>
diff --git a/src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp b/src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp
index 303e59f..278359b 100644
--- a/src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp
+++ b/src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp
@@ -67,7 +67,23 @@ QWaylandGLContext::QWaylandGLContext(EGLDisplay eglDisplay, const QSurfaceFormat
{
m_shareEGLContext = share ? static_cast<QWaylandGLContext *>(share)->eglContext() : EGL_NO_CONTEXT;
- eglBindAPI(EGL_OPENGL_ES_API);
+ switch (m_format.renderableType()) {
+ case QSurfaceFormat::OpenVG:
+ eglBindAPI(EGL_OPENVG_API);
+ break;
+#ifdef EGL_VERSION_1_4
+# if !defined(QT_OPENGL_ES_2)
+ case QSurfaceFormat::DefaultRenderableType:
+# endif
+ case QSurfaceFormat::OpenGL:
+ eglBindAPI(EGL_OPENGL_API);
+ break;
+#endif
+ case QSurfaceFormat::OpenGLES:
+ default:
+ eglBindAPI(EGL_OPENGL_ES_API);
+ break;
+ }
QVector<EGLint> eglContextAttrs;
eglContextAttrs.append(EGL_CONTEXT_CLIENT_VERSION);
@@ -91,6 +107,9 @@ QWaylandGLContext::~QWaylandGLContext()
bool QWaylandGLContext::makeCurrent(QPlatformSurface *surface)
{
+ if (!isInitialized(QOpenGLFunctions::d_ptr))
+ initializeOpenGLFunctions();
+
QWaylandEglWindow *window = static_cast<QWaylandEglWindow *>(surface);
window->setCanResize(false);
diff --git a/src/plugins/platforms/qwayland-egl/qwaylandglcontext.h b/src/plugins/platforms/qwayland-egl/qwaylandglcontext.h
index bc231e8..3e1eb3e 100644
--- a/src/plugins/platforms/qwayland-egl/qwaylandglcontext.h
+++ b/src/plugins/platforms/qwayland-egl/qwaylandglcontext.h
@@ -45,6 +45,7 @@
#include "qwaylanddisplay.h"
#include <qpa/qplatformopenglcontext.h>
+#include <QtGui/QOpenGLFunctions>
#include "qwaylandeglinclude.h"
@@ -55,7 +56,8 @@ class QWaylandGLWindowSurface;
class QOpenGLShaderProgram;
class QOpenGLTextureCache;
-class QWaylandGLContext : public QPlatformOpenGLContext {
+class QWaylandGLContext : public QPlatformOpenGLContext, protected QOpenGLFunctions
+{
public:
QWaylandGLContext(EGLDisplay eglDisplay, const QSurfaceFormat &format, QPlatformOpenGLContext *share);
~QWaylandGLContext();
diff --git a/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp b/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp
index ae0bebf..994e059 100644
--- a/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp
+++ b/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp
@@ -54,9 +54,6 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
#ifndef EGL_WL_bind_wayland_display
typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
--
1.8.4.2

View File

@ -4,16 +4,17 @@
Summary: Qt5 - Wayland platform support and QtCompositor module
Name: qt5-%{qt_module}
Version: 5.1.0
Release: 0.4.20130826git3b0b90b%{?dist}
Release: 0.4.20131120git8cd1a77%{?dist}
# Full license texts are yet to be included upstream:
# https://codereview.qt-project.org/65586
License: LGPLv2 with exceptions or GPLv3 with exceptions
Url: http://qt-project.org/wiki/QtWayland
# git clone --no-checkout git://gitorious.org/qt/qtwayland.git
# cd qtwayland/
# git archive 3b0b90b --prefix=qtwayland/ |gzip >qtwayland.tar.gz
# git archive 8cd1a77 --prefix=qtwayland/ |gzip >qtwayland.tar.gz
Source0: qtwayland.tar.gz
Patch0: 0001-Plugin-API-version-5.2.patch
Patch0: 0001-Wayland-EGL-QPA-Support-desktop-OpenGL-as-well.patch
Patch1: 0001-Need-egl-for-egl.patch
BuildRequires: qt5-qtbase-devel >= 5.2
BuildRequires: qt5-qtbase-static >= 5.2
@ -48,17 +49,22 @@ Requires: qt5-qtbase-devel%{?_isa}
%prep
%setup -q -n %{qt_module}
%patch0 -p1
%patch1 -p1
%build
%{_qt5_qmake} CONFIG+=wayland-compositor
(cd src/compositor; syncqt.pl -check-includes -module QtCompositor -version %{version} -outdir %{_builddir}/%{?buildsubdir})
make %{?_smp_mflags}
%{_qt5_qmake} -o gl/Makefile CONFIG+=wayland-compositor
%{_qt5_qmake} -o nogl/Makefile QT_WAYLAND_GL_CONFIG=nogl
make -C nogl %{?_smp_mflags}
make -C gl %{?_smp_mflags}
%install
make install INSTALL_ROOT=%{buildroot}
install -pm644 src/compositor/{wayland-wayland-server-protocol.h,qwayland-server-wayland.h} \
make -C nogl install INSTALL_ROOT=%{buildroot}
make -C gl install INSTALL_ROOT=%{buildroot}
install -pm644 gl/src/compositor/{wayland-wayland-server-protocol.h,qwayland-server-wayland.h} \
%{buildroot}%{_qt5_headerdir}/QtCompositor/%{version}/QtCompositor/private

View File

@ -1 +1 @@
13a91128f357617007f4eaa967426368 qtwayland.tar.gz
2512eb74ba71d901ebd069130064e070 qtwayland.tar.gz