diff options
author | Julien Roy <julien@jroy.ca> | 2023-05-07 14:14:54 -0400 |
---|---|---|
committer | Julien Roy <julien@jroy.ca> | 2023-05-07 14:15:09 -0400 |
commit | 0067859eefa40b1f2b58faaa2a053df48787e7ef (patch) | |
tree | 615d7917decd4ed65f5f1b5f64409bce09421ff3 /gui-wm | |
parent | gui-apps/hyprland-plugins: update HOMEPAGE (diff) | |
download | guru-0067859eefa40b1f2b58faaa2a053df48787e7ef.tar.gz guru-0067859eefa40b1f2b58faaa2a053df48787e7ef.tar.bz2 guru-0067859eefa40b1f2b58faaa2a053df48787e7ef.zip |
gui-wm/hyprland: add nvidia patch
Signed-off-by: Julien Roy <julien@jroy.ca>
Diffstat (limited to 'gui-wm')
-rw-r--r-- | gui-wm/hyprland/files/0.21.0-meson.patch | 13 | ||||
-rw-r--r-- | gui-wm/hyprland/files/nvidia-0.25.0.patch | 41 | ||||
-rw-r--r-- | gui-wm/hyprland/hyprland-0.25.0.ebuild | 10 |
3 files changed, 49 insertions, 15 deletions
diff --git a/gui-wm/hyprland/files/0.21.0-meson.patch b/gui-wm/hyprland/files/0.21.0-meson.patch deleted file mode 100644 index 30664610e..000000000 --- a/gui-wm/hyprland/files/0.21.0-meson.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/protocols/meson.build b/protocols/meson.build -index 9d47e0a..c082845 100644 ---- a/protocols/meson.build -+++ b/protocols/meson.build -@@ -29,7 +29,7 @@ protocols = [ - ['pointer-constraints-unstable-v1.xml'], - ['tablet-unstable-v2.xml'], - ['idle.xml'], -- [hl_protocol_dir, 'protocols/hyprland-toplevel-export-v1.xml'] -+ ['hyprland-toplevel-export-v1.xml'] - ] - wl_protos_src = [] - wl_protos_headers = [] diff --git a/gui-wm/hyprland/files/nvidia-0.25.0.patch b/gui-wm/hyprland/files/nvidia-0.25.0.patch new file mode 100644 index 000000000..f83258b3c --- /dev/null +++ b/gui-wm/hyprland/files/nvidia-0.25.0.patch @@ -0,0 +1,41 @@ +diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c +index 6a86b183..823fc318 100644 +--- a/render/gles2/renderer.c ++++ b/render/gles2/renderer.c +@@ -165,7 +165,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 ed1afa4a..ddc730c7 100644 +--- a/types/output/render.c ++++ b/types/output/render.c +@@ -225,22 +225,7 @@ struct wlr_drm_format *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 (!output_attach_back_buffer(output, &output->pending, NULL)) { +- return false; +- } +- +- uint32_t fmt = renderer->impl->preferred_read_format(renderer); +- +- output_clear_back_buffer(output); +- +- return fmt; ++ return DRM_FORMAT_XRGB8888; + } + + bool output_is_direct_scanout(struct wlr_output *output, diff --git a/gui-wm/hyprland/hyprland-0.25.0.ebuild b/gui-wm/hyprland/hyprland-0.25.0.ebuild index 07e6cfa72..cc7d5b63d 100644 --- a/gui-wm/hyprland/hyprland-0.25.0.ebuild +++ b/gui-wm/hyprland/hyprland-0.25.0.ebuild @@ -18,7 +18,7 @@ S="${WORKDIR}/${PN}-source" KEYWORDS="~amd64" LICENSE="BSD" SLOT="0" -IUSE="X grimblast hyprprop legacy-renderer scratchpad shellevents systemd" +IUSE="X grimblast hyprprop legacy-renderer scratchpad shellevents systemd video_cards_nvidia" RDEPEND=" app-misc/jq @@ -75,7 +75,13 @@ src_prepare() { die "Hyprland requires >=sys-devel/gcc-12.1.0 to build" fi - default + if use video_cards_nvidia; then + cd "${S}/subprojects/wlroots" || die + eapply "${FILESDIR}/nvidia-0.25.0.patch" + cd "${S}" || die + fi + + eapply_user } src_configure() { |