[kdebase-workspace] Generate texture coordinates for limited NPOT support (kde#269576)
Rex Dieter
rdieter at fedoraproject.org
Mon Oct 17 18:51:05 UTC 2011
commit 7daeb17a7d09db4d9654664fb03762cde263df22
Author: Rex Dieter <rdieter at fedoraproject.org>
Date: Mon Oct 17 13:51:03 2011 -0500
Generate texture coordinates for limited NPOT support (kde#269576)
kde-workspace-4.7.2-r300_textures.patch | 45 +++++++++++++++++++++++++++++++
kdebase-workspace.spec | 8 +++++-
2 files changed, 52 insertions(+), 1 deletions(-)
---
diff --git a/kde-workspace-4.7.2-r300_textures.patch b/kde-workspace-4.7.2-r300_textures.patch
new file mode 100644
index 0000000..8739ea8
--- /dev/null
+++ b/kde-workspace-4.7.2-r300_textures.patch
@@ -0,0 +1,45 @@
+From: Martin Gräßlin <mgraesslin at kde.org>
+Date: Sat, 15 Oct 2011 12:14:44 +0000
+Subject: Generate texture coordinates for limited NPOT support
+X-Git-Url: http://quickgit.kde.org/?p=kde-workspace.git&a=commitdiff&h=230d5aee9bdc46c3a796a10b884685b4224ba732
+---
+Generate texture coordinates for limited NPOT support
+
+Fixes rendering issues with R300 and similar GPUs. If the texture
+uses GL_TEXTURE_RECTANGLE_ARB as target the tex coordinates need
+to be adjusted. This at least fixes missing text on EffectFrames
+with graphicssystem native on R300. Hopefully more issues are
+resolved by the change.
+
+BUG: 269576
+CCBUG: 282882
+FIXED-IN: 4.7.3
+---
+
+
+--- a/kwin/libkwineffects/kwingltexture.cpp
++++ b/kwin/libkwineffects/kwingltexture.cpp
+@@ -280,11 +280,18 @@ void GLTexture::render(QRegion region, c
+ r.x() + rect.width(), r.y(),
+ r.x() + rect.width(), r.y() + rect.height()
+ };
++#ifdef KWIN_HAVE_OPENGLES
++ const float texWidth = 1.0f;
++ const float texHeight = 1.0f;
++#else
++ const float texWidth = (target() == GL_TEXTURE_RECTANGLE_ARB) ? width() : 1.0f;
++ const float texHeight = (target() == GL_TEXTURE_RECTANGLE_ARB) ? height() : 1.0f;
++#endif
+ const float texcoords[ 4 * 2 ] = {
+- 0.0f, d->m_yInverted ? 0.0f : 1.0f, // y needs to be swapped (normalized coords)
+- 0.0f, d->m_yInverted ? 1.0f : 0.0f,
+- 1.0f, d->m_yInverted ? 0.0f : 1.0f,
+- 1.0f, d->m_yInverted ? 1.0f : 0.0f
++ 0.0f, d->m_yInverted ? 0.0f : texHeight, // y needs to be swapped (normalized coords)
++ 0.0f, d->m_yInverted ? texHeight : 0.0f,
++ texWidth, d->m_yInverted ? 0.0f : texHeight,
++ texWidth, d->m_yInverted ? texHeight : 0.0f
+ };
+ d->m_vbo->setData(4, 2, verts, texcoords);
+ }
+
diff --git a/kdebase-workspace.spec b/kdebase-workspace.spec
index 4b132a8..e47ce2c 100644
--- a/kdebase-workspace.spec
+++ b/kdebase-workspace.spec
@@ -9,7 +9,7 @@
Summary: KDE Workspace
Name: kdebase-workspace
Version: 4.7.2
-Release: 6%{?dist}
+Release: 7%{?dist}
License: GPLv2
Group: User Interface/Desktops
@@ -74,6 +74,8 @@ Patch50: kdebase-workspace-4.6.80-kde#171685.patch
Patch52: kdebase-workspace-4.7.0-bz#732830-login.patch
## upstream patches
+# http://quickgit.kde.org/?p=kde-workspace.git&a=commitdiff&h=230d5aee9bdc46c3a796a10b884685b4224ba732
+Patch100: kde-workspace-4.7.2-r300_textures.patch
## Fedora specific patches
## HAL-ectomy
@@ -355,6 +357,7 @@ pushd %{name}-%{version}
%patch52 -p1 -b .bz#732830-login
# upstream patches
+%patch100 -p1 -b .r300_textures
# Fedora patches
%patch200 -p0 -b .no_HAL
@@ -841,6 +844,9 @@ fi
%changelog
+* Mon Oct 17 2011 Rex Dieter <rdieter at fedoraproject.org> 4.7.2-7
+- Generate texture coordinates for limited NPOT support (kde#269576)
+
* Sat Oct 15 2011 Kevin Kofler <Kevin at tigcc.ticalc.org> 4.7.2-6
- drop displayEvents patch, moved to kde-settings (in kde-settings-4.7-12)
More information about the scm-commits
mailing list