Skip to content

Commit

Permalink
mesa: upstream patch for gxl
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Dec 16, 2024
1 parent 33242b4 commit 41c96fd
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x11/mesa/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ patchfiles patch-meson-spec-python.diff \
patch-fix-32-bit.diff \
patch-meson.build.diff

# Upstream patch: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12317
patchfiles-append patch-glx.diff

# MP ticket 66269
# the sizes of int and GLint are different on 10.4 PPC, at least
# not sure how many systems this might affect, but all systems on buildbot were OK
Expand Down
34 changes: 34 additions & 0 deletions x11/mesa/files/patch-glx.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index 8d7518e1f47868df6f4ff413e0ab2e8a24ce5a67..98e21a21b43621914d38e853cce6befd312a8131 100644
--- src/glx/glxext.c
+++ src/glx/glxext.c
@@ -790,6 +790,7 @@ bind_extensions(struct glx_screen *psc, const char *driverName)
__glXEnableDirectExtension(psc, "GLX_INTEL_swap_event");
}

+#if defined(GLX_DIRECT_RENDERING) && (!defined(GLX_USE_APPLEGL) || defined(GLX_USE_APPLE))
mask = driGetAPIMask(psc->frontend_screen);

__glXEnableDirectExtension(psc, "GLX_ARB_create_context");
@@ -846,6 +847,7 @@ bind_extensions(struct glx_screen *psc, const char *driverName)
psc->keep_native_window_glx_drawable = keep_native_window_glx_drawable;
}
}
+#endif
}


@@ -1078,6 +1080,13 @@ __glXInitialize(Display * dpy)
glx_driver |= GLX_DRIVER_SW;
#endif

+#if defined(GLX_USE_APPLEGL) && !defined(GLX_USE_APPLE)
+ if (!applegl_create_display(dpyPriv)) {
+ free(dpyPriv);
+ return NULL;
+ }
+#endif
+
if (!AllocAndFetchScreenConfigs(dpy, dpyPriv, glx_driver, !env)) {
Bool fail = True;
#if defined(GLX_DIRECT_RENDERING) && (!defined(GLX_USE_APPLEGL) || defined(GLX_USE_APPLE))

0 comments on commit 41c96fd

Please sign in to comment.