pull in candidate upstream nvidia/optima fix (kde#406180)
This commit is contained in:
parent
9fe549303e
commit
7000161d93
53
fbf3488.diff
Normal file
53
fbf3488.diff
Normal file
@ -0,0 +1,53 @@
|
||||
From fbf34883dfc23c109aa03d0df04a07bfd3be59e6 Mon Sep 17 00:00:00 2001
|
||||
From: Erik Kurzinger <ekurzinger@nvidia.com>
|
||||
Date: Mon, 10 Jun 2019 14:50:40 -0700
|
||||
Subject: [PATCH] Remove m_swapInterval from QGLXContext
|
||||
|
||||
As per GLX_EXT_swap_control, the GLX swap interval is specified on a
|
||||
per-drawable basis. However, QGLXContext only tracks it per-context
|
||||
using the m_swapInterval member. If a new drawable is made current to a
|
||||
context, it is still necessary to call glXSwapIntervalEXT to change the
|
||||
swap interval, even if it has been previously called for the same
|
||||
context with a different drawable. However, currently,
|
||||
QGLXContext::makeCurrent doesn't do this if m_swapInterval matches the
|
||||
new swap interval. This change removes m_swapInterval, forcing the swap
|
||||
interval to be set every time and relying on the OpenGL implementation
|
||||
to optimize away unnecessary calls.
|
||||
|
||||
Change-Id: Idc34101476c6af618059f6f3d8925dee743994a3
|
||||
---
|
||||
|
||||
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
|
||||
index 4adf662..01517eb 100644
|
||||
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
|
||||
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
|
||||
@@ -204,7 +204,6 @@
|
||||
, m_shareContext(0)
|
||||
, m_format(format)
|
||||
, m_isPBufferCurrent(false)
|
||||
- , m_swapInterval(-1)
|
||||
, m_ownsContext(nativeHandle.isNull())
|
||||
, m_getGraphicsResetStatus(0)
|
||||
, m_lost(false)
|
||||
@@ -568,8 +567,7 @@
|
||||
if (success && surfaceClass == QSurface::Window) {
|
||||
int interval = surface->format().swapInterval();
|
||||
QXcbScreen *screen = screenForPlatformSurface(surface);
|
||||
- if (interval >= 0 && m_swapInterval != interval && screen) {
|
||||
- m_swapInterval = interval;
|
||||
+ if (interval >= 0 && screen) {
|
||||
typedef void (*qt_glXSwapIntervalEXT)(Display *, GLXDrawable, int);
|
||||
typedef void (*qt_glXSwapIntervalMESA)(unsigned int);
|
||||
static qt_glXSwapIntervalEXT glXSwapIntervalEXT = 0;
|
||||
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h
|
||||
index be9d3f5..2a88fd6 100644
|
||||
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h
|
||||
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h
|
||||
@@ -87,7 +87,6 @@
|
||||
GLXContext m_shareContext;
|
||||
QSurfaceFormat m_format;
|
||||
bool m_isPBufferCurrent;
|
||||
- int m_swapInterval;
|
||||
bool m_ownsContext;
|
||||
GLenum (APIENTRY * m_getGraphicsResetStatus)();
|
||||
bool m_lost;
|
@ -53,7 +53,7 @@ BuildRequires: pkgconfig(libsystemd)
|
||||
Name: qt5-qtbase
|
||||
Summary: Qt5 - QtBase components
|
||||
Version: 5.12.3
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
|
||||
# See LGPL_EXCEPTIONS.txt, for exception details
|
||||
License: LGPLv2 with exceptions or GPLv3 with exceptions
|
||||
@ -129,6 +129,9 @@ Patch68: qtbase-everywhere-src-5.11.1-python3.patch
|
||||
# glibc stat
|
||||
|
||||
## upstream patches
|
||||
# https://bugs.kde.org/show_bug.cgi?id=406180
|
||||
# https://codereview.qt-project.org/c/qt/qtbase/+/264563
|
||||
Patch100: fbf3488.diff
|
||||
|
||||
# Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires.
|
||||
# Those themes are there for platform integration. If the required libraries are
|
||||
@ -397,6 +400,7 @@ Qt5 libraries used for drawing widgets and OpenGL items.
|
||||
%patch68 -p1
|
||||
|
||||
## upstream patches
|
||||
%patch100 -p1
|
||||
|
||||
# move some bundled libs to ensure they're not accidentally used
|
||||
pushd src/3rdparty
|
||||
@ -1016,6 +1020,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jun 12 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.3-2
|
||||
- pull in candidate upstream nvidia/optima fix (kde#406180)
|
||||
|
||||
* Tue Jun 04 2019 Jan Grulich <jgrulich@redhat.com> - 5.12.3-1
|
||||
- 5.12.3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user