Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 866962 Details for
Bug 911597
gui-wm/hyprland-0.27.2 USE nvidia flag corrupt output on dGPU system
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Nvidia patch and ebuild fix
ebuild-nvidia-hyprland-0.27.2.patch (text/plain), 2.60 KB, created by
Gonçalo Negrier Duarte
on 2023-08-03 17:19:22 UTC
(
hide
)
Description:
Nvidia patch and ebuild fix
Filename:
MIME Type:
Creator:
Gonçalo Negrier Duarte
Created:
2023-08-03 17:19:22 UTC
Size:
2.60 KB
patch
obsolete
>diff --git a/gui-wm/hyprland/files/nvidia-0.27.2.patch b/gui-wm/hyprland/files/nvidia-0.27.2.patch >new file mode 100644 >index 000000000000..01bdd342e9b7 >--- /dev/null >+++ b/gui-wm/hyprland/files/nvidia-0.27.2.patch >@@ -0,0 +1,41 @@ >+diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c >+index 9fe934f7..9662d4ee 100644 >+--- a/render/gles2/renderer.c >++++ b/render/gles2/renderer.c >+@@ -176,7 +176,7 @@ static bool gles2_bind_buffer(struct wlr_renderer *wlr_renderer, >+ assert(wlr_egl_is_current(renderer->egl)); >+ >+ push_gles2_debug(renderer); >+- glFlush(); >++ glFinish(); >+ glBindFramebuffer(GL_FRAMEBUFFER, 0); >+ pop_gles2_debug(renderer); >+ >+diff --git a/types/output/render.c b/types/output/render.c >+index 2e38919a..97f78608 100644 >+--- a/types/output/render.c >++++ b/types/output/render.c >+@@ -240,22 +240,7 @@ bool output_pick_format(struct wlr_output *output, >+ } >+ >+ uint32_t wlr_output_preferred_read_format(struct wlr_output *output) { >+- struct wlr_renderer *renderer = output->renderer; >+- assert(renderer != NULL); >+- >+- if (!renderer->impl->preferred_read_format || !renderer->impl->read_pixels) { >+- return DRM_FORMAT_INVALID; >+- } >+- >+- if (!wlr_output_attach_render(output, NULL)) { >+- return false; >+- } >+- >+- uint32_t fmt = renderer->impl->preferred_read_format(renderer); >+- >+- output_clear_back_buffer(output); >+- >+- return fmt; >++ return DRM_FORMAT_XRGB8888; >+ } >+ >+ struct wlr_render_pass *wlr_output_begin_render_pass(struct wlr_output *output, >diff --git a/gui-wm/hyprland/hyprland-0.27.2-r1.ebuild b/gui-wm/hyprland/hyprland-0.27.2-r1.ebuild >index 16078510e4d7..e02405fd6845 100644 >--- a/gui-wm/hyprland/hyprland-0.27.2-r1.ebuild >+++ b/gui-wm/hyprland/hyprland-0.27.2-r1.ebuild >@@ -75,7 +75,7 @@ pkg_setup() { > src_prepare() { > if use video_cards_nvidia; then > cd "${S}/subprojects/wlroots" || die >- eapply "${S}/nix/wlroots-nvidia.patch" >+ eapply "${FILESDIR}/nvidia-0.27.2.patch" > cd "${S}" || die > fi > >diff --git a/gui-wm/hyprland/hyprland-0.27.2-r1.ebuild b/gui-wm/hyprland/hyprland-0.27.2-r1.ebuild >index 16078510e4d7..42b55e89fd25 100644 >--- a/gui-wm/hyprland/hyprland-0.27.2-r1.ebuild >+++ b/gui-wm/hyprland/hyprland-0.27.2-r1.ebuild >@@ -73,9 +73,13 @@ pkg_setup() { > } > > src_prepare() { >- if use video_cards_nvidia; then >+if use video_cards_nvidia; then > cd "${S}/subprojects/wlroots" || die > eapply "${S}/nix/wlroots-nvidia.patch" >+ # https://bugs.gentoo.org/911597 >+ # https://github.com/hyprwm/Hyprland/pull/2874 >+ # https://github.com/hyprwm/Hyprland/blob/main/nix/wlroots.nix#L54 >+ sed -i -e 's/glFlush();/glFinish();/' render/gles2/renderer.c || die > cd "${S}" || die > fi >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 911597
:
866851
|
866962
|
866963
|
866964