summaryrefslogtreecommitdiff
path: root/gui-wm
diff options
context:
space:
mode:
authorJulien Roy <julien@jroy.ca>2024-03-02 15:16:10 -0500
committerYixun Lan <dlan@gentoo.org>2024-03-03 00:54:46 +0000
commit1fef823107b59e072d6d6f03b8ff261bc7830aff (patch)
tree37967604f54e6aa6e0dd7ca3976422b8609d5138 /gui-wm
parentdev-libs/libparserutils: Stabilize 0.2.5 ppc, #926022 (diff)
downloadgentoo-1fef823107b59e072d6d6f03b8ff261bc7830aff.tar.gz
gentoo-1fef823107b59e072d6d6f03b8ff261bc7830aff.tar.bz2
gentoo-1fef823107b59e072d6d6f03b8ff261bc7830aff.zip
gui-wm/hyprland: Add patch to fix compilation using gui-wm/hyprland[legacy-renderer]
Closes: https://bugs.gentoo.org/925912 Closes: https://github.com/gentoo/gentoo/pull/35604 Signed-off-by: Julien Roy <julien@jroy.ca> Signed-off-by: Yixun Lan <dlan@gentoo.org>
Diffstat (limited to 'gui-wm')
-rw-r--r--gui-wm/hyprland/files/legacy-renderer-fix.patch33
-rw-r--r--gui-wm/hyprland/hyprland-0.35.0-r2.ebuild (renamed from gui-wm/hyprland/hyprland-0.35.0-r1.ebuild)4
-rw-r--r--gui-wm/hyprland/hyprland-0.36.0-r1.ebuild (renamed from gui-wm/hyprland/hyprland-0.36.0.ebuild)4
3 files changed, 41 insertions, 0 deletions
diff --git a/gui-wm/hyprland/files/legacy-renderer-fix.patch b/gui-wm/hyprland/files/legacy-renderer-fix.patch
new file mode 100644
index 000000000000..a1ecbbd7ec5a
--- /dev/null
+++ b/gui-wm/hyprland/files/legacy-renderer-fix.patch
@@ -0,0 +1,33 @@
+# https://github.com/hyprwm/Hyprland/pull/4928
+# https://bugs.gentoo.org/925912
+diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
+index 64f582f2..a6f2dc03 100644
+--- a/src/render/OpenGL.cpp
++++ b/src/render/OpenGL.cpp
+@@ -353,7 +353,11 @@ void CHyprOpenGLImpl::end() {
+ // check for gl errors
+ const GLenum ERR = glGetError();
+
++#ifdef GLES2
++ if (ERR == GL_CONTEXT_LOST_KHR) /* We don't have infra to recover from this */
++#else
+ if (ERR == GL_CONTEXT_LOST) /* We don't have infra to recover from this */
++#endif
+ RASSERT(false, "glGetError at Opengl::end() returned GL_CONTEXT_LOST. Cannot continue until proper GPU reset handling is implemented.");
+ }
+
+@@ -2057,7 +2061,13 @@ void CHyprOpenGLImpl::createBGTextureForMonitor(CMonitor* pMonitor) {
+ tex.m_vSize = IMAGESIZE * scale;
+
+ // copy the data to an OpenGL texture we have
+- const GLint glIFormat = CAIROFORMAT == CAIRO_FORMAT_RGB96F ? GL_RGB32F : GL_RGBA;
++ const GLint glIFormat = CAIROFORMAT == CAIRO_FORMAT_RGB96F ?
++#ifdef GLES2
++ GL_RGB32F_EXT :
++#else
++ GL_RGB32F :
++#endif
++ GL_RGBA;
+ const GLint glFormat = CAIROFORMAT == CAIRO_FORMAT_RGB96F ? GL_RGB : GL_RGBA;
+ const GLint glType = CAIROFORMAT == CAIRO_FORMAT_RGB96F ? GL_FLOAT : GL_UNSIGNED_BYTE;
+
diff --git a/gui-wm/hyprland/hyprland-0.35.0-r1.ebuild b/gui-wm/hyprland/hyprland-0.35.0-r2.ebuild
index bd70e22a7247..81c8b1bbcb99 100644
--- a/gui-wm/hyprland/hyprland-0.35.0-r1.ebuild
+++ b/gui-wm/hyprland/hyprland-0.35.0-r2.ebuild
@@ -93,6 +93,10 @@ BDEPEND="
virtual/pkgconfig
"
+PATCHES=(
+ "${FILESDIR}/legacy-renderer-fix.patch"
+)
+
pkg_setup() {
[[ ${MERGE_TYPE} == binary ]] && return
diff --git a/gui-wm/hyprland/hyprland-0.36.0.ebuild b/gui-wm/hyprland/hyprland-0.36.0-r1.ebuild
index cecf622b3be8..972fe7b33988 100644
--- a/gui-wm/hyprland/hyprland-0.36.0.ebuild
+++ b/gui-wm/hyprland/hyprland-0.36.0-r1.ebuild
@@ -94,6 +94,10 @@ BDEPEND="
virtual/pkgconfig
"
+PATCHES=(
+ "${FILESDIR}/legacy-renderer-fix.patch"
+)
+
pkg_setup() {
[[ ${MERGE_TYPE} == binary ]] && return