Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 911597 | Differences between
and this patch

Collapse All | Expand All

(-)a/gui-wm/hyprland/files/nvidia-0.27.2.patch (+41 lines)
Line 0 Link Here
1
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c
2
index 9fe934f7..9662d4ee 100644
3
--- a/render/gles2/renderer.c
4
+++ b/render/gles2/renderer.c
5
@@ -176,7 +176,7 @@ static bool gles2_bind_buffer(struct wlr_renderer *wlr_renderer,
6
 		assert(wlr_egl_is_current(renderer->egl));
7
 
8
 		push_gles2_debug(renderer);
9
-		glFlush();
10
+		glFinish();
11
 		glBindFramebuffer(GL_FRAMEBUFFER, 0);
12
 		pop_gles2_debug(renderer);
13
 
14
diff --git a/types/output/render.c b/types/output/render.c
15
index 2e38919a..97f78608 100644
16
--- a/types/output/render.c
17
+++ b/types/output/render.c
18
@@ -240,22 +240,7 @@ bool output_pick_format(struct wlr_output *output,
19
 }
20
 
21
 uint32_t wlr_output_preferred_read_format(struct wlr_output *output) {
22
-	struct wlr_renderer *renderer = output->renderer;
23
-	assert(renderer != NULL);
24
-
25
-	if (!renderer->impl->preferred_read_format || !renderer->impl->read_pixels) {
26
-		return DRM_FORMAT_INVALID;
27
-	}
28
-
29
-	if (!wlr_output_attach_render(output, NULL)) {
30
-		return false;
31
-	}
32
-
33
-	uint32_t fmt = renderer->impl->preferred_read_format(renderer);
34
-
35
-	output_clear_back_buffer(output);
36
-
37
-	return fmt;
38
+	return DRM_FORMAT_XRGB8888;
39
 }
40
 
41
 struct wlr_render_pass *wlr_output_begin_render_pass(struct wlr_output *output,
(-)a/gui-wm/hyprland/hyprland-0.27.2-r1.ebuild (-1 / +1 lines)
Lines 75-81 pkg_setup() { Link Here
75
src_prepare() {
75
src_prepare() {
76
	if use video_cards_nvidia; then
76
	if use video_cards_nvidia; then
77
		cd "${S}/subprojects/wlroots" || die
77
		cd "${S}/subprojects/wlroots" || die
78
		eapply "${S}/nix/wlroots-nvidia.patch"
78
		eapply "${FILESDIR}/nvidia-0.27.2.patch"
79
		cd "${S}" || die
79
		cd "${S}" || die
80
	fi
80
	fi
81
81
(-)a/gui-wm/hyprland/hyprland-0.27.2-r1.ebuild (-1 / +5 lines)
Lines 73-81 pkg_setup() { Link Here
73
}
73
}
74
74
75
src_prepare() {
75
src_prepare() {
76
	if use video_cards_nvidia; then
76
if use video_cards_nvidia; then
77
		cd "${S}/subprojects/wlroots" || die
77
		cd "${S}/subprojects/wlroots" || die
78
		eapply "${S}/nix/wlroots-nvidia.patch"
78
		eapply "${S}/nix/wlroots-nvidia.patch"
79
		# https://bugs.gentoo.org/911597
80
		# https://github.com/hyprwm/Hyprland/pull/2874
81
		# https://github.com/hyprwm/Hyprland/blob/main/nix/wlroots.nix#L54
82
		sed -i -e 's/glFlush();/glFinish();/' render/gles2/renderer.c || die
79
		cd "${S}" || die
83
		cd "${S}" || die
80
	fi
84
	fi
81
85

Return to bug 911597