Skip to content

Instantly share code, notes, and snippets.

@lucamignatti
Last active January 9, 2026 12:05
Show Gist options
  • Select an option

  • Save lucamignatti/5312f5e937de2ba44256ecba6de54cc2 to your computer and use it in GitHub Desktop.

Select an option

Save lucamignatti/5312f5e937de2ba44256ecba6de54cc2 to your computer and use it in GitHub Desktop.
Running Minecraft on macOS with Zink + KosmicKrisp

Running Minecraft on macOS with Zink + KosmicKrisp

Screenshot 2025-12-31 at 11 15 00 AM

TL;DR: I got OpenGL 4.6 apps (Minecraft) running on macOS by translating OpenGL → Vulkan → Metal using Mesa's Zink driver and the KosmicKrisp Vulkan implementation.

Minecraft (OpenGL 4.6) → Zink → Vulkan → KosmicKrisp → Metal → GPU

Build Instructions

Prerequisites

# Core build tools
brew install meson ninja python3

# Mesa dependencies
brew install bison flex llvm glslang spirv-tools molten-vk

# Add LLVM and bison to PATH (Apple's versions are outdated)
export PATH="/opt/homebrew/opt/llvm/bin:/opt/homebrew/opt/bison/bin:$PATH"

Mesa

git clone https://github.com/lucamignatti/mesa.git
cd mesa

# Create native file for Homebrew bison
cat > native.ini << 'EOF'
[binaries]
bison = '/opt/homebrew/opt/bison/bin/bison'
EOF

# Configure
meson setup build --native-file native.ini \
  -Dprefix=$HOME/mesa-native \
  -Dbuildtype=release \
  -Dplatforms=macos \
  -Degl-native-platform=surfaceless \
  -Degl=enabled \
  -Dgallium-drivers=zink \
  -Dvulkan-drivers=kosmickrisp \
  -Dgles1=enabled \
  -Dgles2=enabled \
  -Dglx=disabled \
  -Dgbm=disabled \
  -Dmoltenvk-dir=/opt/homebrew/opt/molten-vk

# Build and install
ninja -C build
ninja -C build install

# Configure DRI
mkdir -p $HOME/mesa-native/lib/dri
cd $HOME/mesa-native/lib/dri  
ln -sf ../libgallium-26.0.0-devel.dylib zink_dri.so
ln -sf ../libgallium-26.0.0-devel.dylib swrast_dri.so

# Copy vulkan loader
cp /opt/homebrew/lib/libvulkan.1.dylib $HOME/mesa-native/lib/

GLFW

git clone https://github.com/lucamignatti/glfw.git
cd glfw
mkdir build && cd build
cmake .. -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=ON
make -j8

The library is at build/src/libglfw.3.dylib.

Running Minecraft

Environment Variables (set in your launcher):

DYLD_INSERT_LIBRARIES=$HOME/mesa-native/lib/libgl_interpose.dylib
DYLD_LIBRARY_PATH=$HOME/mesa-native/lib
LIBGL_DRIVERS_PATH=$HOME/mesa-native/lib/dri
VK_DRIVER_FILES=$HOME/mesa-native/share/vulkan/icd.d/kosmickrisp_mesa_icd.aarch64.json
EGL_PLATFORM=surfaceless
MESA_LOADER_DRIVER_OVERRIDE=zink
MESA_GL_VERSION_OVERRIDE=4.6
MESA_GLSL_VERSION_OVERRIDE=460

JVM Arguments:

-Dorg.lwjgl.egl.libname=$HOME/mesa-native/lib/libEGL.dylib
-Dorg.lwjgl.opengl.libname=$HOME/mesa-native/lib/libGL.dylib
-Dorg.lwjgl.glfw.libname=/path/to/glfw/build/src/libglfw.3.dylib

Known Issues

  • The game initially only renders in the bottom left quarter of the window. Resize the window to fix.

Getting it working

Apple deprecated OpenGL in 2018 and capped macOS at OpenGL 4.1. But shader packs, mods, and modern Minecraft features increasingly expect OpenGL 4.6. Apple's answer is Metal, but that doesnt help us.

Recently, the KosmicKrisp driver was created as a part of mesa. This is the first compliant vulkan driver on macOS, and according to various MRs it is capable of running zink. So, we translate OpenGL to Vulkan using Mesa's Zink driver, then translate Vulkan to Metal using KosmicKrisp. Sounds simple right? It wasn't.

Making Zink support KosmicKrisp

Zink requires many different vulkan features to be supported to impliment correct and performant openGL, and until recently, kosmickrisp didnt support all of them. currently, it's lacking one non-critical feature: NullDescriptor. Fortunately a current MR enables zink to work around this. So, we apply this MR and it's off to the races. Except that it's not.

First Problem: Where Do We Even Render?

Mesa's EGL implementation needs a "platform" to talk to the display server. On Linux, this is X11, Wayland, or DRM/KMS. macOS has none of these. I tried creating a platform_macos.c from scratch. Dead end. it would require weeks of work to implement the full EGL platform interface. Then I noticed something: the surfaceless platform. It's designed for headless rendering such as GPU compute, offscreen rendering, or CI testing. It explicitly has no window support. But it does talk to Vulkan via Kopper, Zink's WSI layer. What if we just... added window support to surfaceless? On macOS only?

This is cursed. A platform called "surfaceless" that creates window surfaces. But it works. I added a macOS-specific code path in platform_surfaceless.c that activates when Kopper detects Metal support. The "Metal display vtbl" includes create_window_surface, swap_buffers, and swap_interval. Functions that surfaceless normally doesn't have. We also force the software driver probe path, because macOS has no DRM devices to enumerate.

Second Problem: GLFW Uses the Wrong OpenGL

GLFW on macOS defaults to NSGL, which is Apple's native OpenGL implementation. That's the capped 4.1 version we're trying to escape. I patched cocoa_window.m to route all context requests to EGL instead. This way Mesa handles the context, not Apple's deprecated driver.

Third Problem: LWJGL Looks for GL in the Wrong Place

GLFW was now using EGL, but Minecraft still crashed. LWJGL (Minecraft's native library layer) loads OpenGL function pointers by calling dlsym on libGL.dylib. But our OpenGL implementation lives in EGL. there is no system libGL.dylib that knows about our context.

I created a small interposition library (libgl_interpose.dylib) that uses macOS's DYLD_INTERPOSE mechanism to intercept all dlsym calls. When code asks for a function starting with gl, we redirect to eglGetProcAddress instead. Then, we inject this via DYLD_INSERT_LIBRARIES and a launch argument. Now when LWJGL asks for glGenBuffers, it gets Mesa's implementation instead of nothing.

Fourth Problem: Wrong Layer Type

First launch. Immediate crash: vkCreateMetalSurfaceEXT failed. Debugging revealed the issue: GLFW passes us an NSView's backing layer. By default that's NSViewBackingLayer, which is a generic 2D compositing layer. Metal needs a CAMetalLayer.

We can't ask GLFW to change this without major patches. So we swap the layer ourselves. When our surface creation callback is invoked, we check the layer class using Objective-C runtime introspection. If it's NSViewBackingLayer, we create a fresh CAMetalLayer, configure it (frame, scale factor, opaque), and attach it to the view. All of this must happen on the main thread, CoreAnimation's requirement. We use dispatch_sync_f() to safely dispatch from render threads.

Fifth Problem: 1×1 Swapchain

Minecraft launched! Into a 1×1 pixel window.

The Kopper interface has a GetDrawableInfo() callback to query window dimensions. Our implementation queried [layer drawableSize]. But CAMetalLayer.drawableSize isn't populated until the next CoreAnimation layout pass, which hasn't happened yet because we just created the layer. So, we explicitly set drawableSize when creating the layer, matching the view bounds times the scale factor. Now the first query returns sensible values.

Sixth Problem: Random SIGBUS Crashes

Minecraft would sometimes crash with SIGBUS in CoreAnimation internals when querying drawable size. Completely non-deterministic.

After adding backtraces, I identified the pattern: crashes happened when GetDrawableInfo() was called from a render thread while CoreAnimation was doing layout on the main thread. CoreAnimation is not thread-safe. We wrapped all size queries in dispatch_sync_f() to the main thread.

Seventh Problem: Next-Launch Crashes

The first run works! the second run has crash in Metal shader compilation with invalid pointers though.

I discovered that KosmicKrisp caches compiled shaders to disk. The cache included Metal Pipeline State Object pointers, but those are process-specific. On the next launch, they're garbage pointing to deallocated GPU resources. So, I disable shader disk caching in KosmicKrisp. Performance loss is negligible for Minecraft anyway.

Eighth Problem: The Gray Screen

Minecraft loaded. The main menu background though, was gray. The world was also gray. Only UI elements where visible. oddly though, the 3d world was visible from behind f3 text and the chat box.

I added logging throughout the blit path. The RGB channels had correct values, but the gray areas all had alpha = 0. Minecraft renders the 3D world with alpha=0, it doesn't need transparency for terrain. On typical OpenGL, this is fine. But Metal's compositor respects alpha. Alpha=0 means "fully transparent". To fix this, I force alpha = 1.0 in the blit shaders.

Ninth Problem: Black Flashing

Main menu rendered correctly! Loading a world... black frames. Every few frames where pure black.

Zink has two blit paths:

  1. vk_meta_blit (native): Uses Vulkan blit commands. Fast.
  2. util_blitter (Gallium fallback): Software-assisted, and more compatible.

For format conversions (RGBA↔BGRA when blitting to the swapchain), Zink was using vk_meta_blit. On KosmicKrisp, this exhibited intermittent black frames. The root cause is still unknown. possibly a synchronization issue in KosmicKrisp's blit. Regardless, I force format-conversion blits to use util_blitter instead. The performance penalty is about ~2-3%, which is acceptable for stable frames. Both paths now force alpha=1.

Tenth Problem: Dead-end Window Resizing

The game finally launched, looked right, and ran smoothly. But there was one final annoyance. Resizing the window didnt resize the view, and broke everything. The internal rendering resolution remained stuck at whatever size the window was when the game first appeared, leading to either black borders or extreme stretching.

Zink's Kopper layer has an update mechanism that is supposed to handle window resizing. However, this path was hardcoded to only query surface capabilities for X11 platform surfaces. For every other surface type, including our new Metal surfaces, it just returned the current resource dimensions, effectively telling the driver that the size had never changed.

I extended zink_kopper_update and the DRI frontend to handle KOPPER_METAL surfaces. Now, every frame, Zink queries the current actual size of the CAMetalLayer via Vulkan surface capabilities. If there's a mismatch, it triggers a swapchain recreation. After this change Minecraft responds correctly to window resizes, maintaining the correct aspect ratio and resolution as you resize.

It Works

70fps, shader packs load, modern mods work, and f3 reports OpenGL 4.6 on macOS, running entirely through Mesa, Vulkan, and Metal.

The surfaceless platform has surfaces, the blit is emulated and lies, we swap layer types at runtime, and theres no shader cache. It's held together with the most hackiest of hacks.

But it works. mostly. There are still bugs in rendering deep in kosmickrisp somewhere (youll notice the hotbar, for example, looks strange). not all shaders work as kosmickrisp doesnt expose all needed features for zink to run them, and voxy doesnt have the indirect GL features it needs as kosmickrisp doesnt support them yet, and performance is lacking. But maybe one day not to far away, everything will work. This at least proves that it can. On another note, it's not impossible this is the first time ever openGL 4.6 has run on macOS, which is cool.

@Taha-Kilic
Copy link

Taha-Kilic commented Jan 2, 2026

Impressive! could you maybe leave a repo with your individually edited files so anyone could reproduce it? Also wanna play on Mac :). The interpose.dylib is missing

@mskiptr
Copy link

mskiptr commented Jan 2, 2026

Great writeup and definitely an impressive achievement!

[outdated] (you might want to pass it through `sed "s/ its / it's /g"` btw)

@lucamignatti
Copy link
Author

@Taha-Kilic, good callout. I have update the instructions, and it works now in my testing. I forgot to add it to meson 🤦‍♂️.

@arsold2002-cyber
Copy link

Awesome!!!

@jb4-dev
Copy link

jb4-dev commented Jan 2, 2026

This is very impressive! I'll be watching this. Hopefully soon more features will be implemented into KosmicKrisp and more advancements will be made towards better performance and whatnot.

@arsold2002-cyber
Copy link

arsold2002-cyber commented Jan 2, 2026

Screenshot 2026-01-03 at 01 04 43 It looks like the Voxy mod doesn’t work even with OpenGL 4.6 on macOS. I managed to launch Minecraft and everything ran fine, but the whole point was Voxy — unfortunately, no luck.

@lucamignatti
Copy link
Author

@arsold2002-cyber As i said in the gist, voxy does not currently work. kosmickrisp doesnt support the all the indirect draw features needed for zink to support indirect openGL, which voxy uses. Now, implimenting them does not seem too hard and I may tackle this in the future, but for now no voxy. Not to mention that voxy intentionally disables itself on macOS so even if it did support everything it wouldnt work.

@Wixonic
Copy link

Wixonic commented Jan 3, 2026

bliss-on-mac Bliss Shaders

Complementary's ACL doesn't work, as it is disabled on macOS by default, but should work if patched.
I need to find a way to reduce resolution, as my usual "Reduce Resolution on macOS" from sodium-extra doesn't work at all

@sour-kiwi
Copy link

@Wixonic you can use the "RenderScale" mod

@Samalando
Copy link

Not to mention that voxy intentionally disables itself on macOS so even if it did support everything it wouldnt work.

@lucamignatti
this actually isn't that hard to disable, https://github.com/MCRcortex/voxy/blob/c5e447125b7cb465772bec297a58bddb7c0ce265/src/main/java/me/cortex/voxy/client/VoxyClient.java#L37-L51 these lines are stopping it from happening so commenting them out and recompiling (./gradlew build) is all you need to do.
theoretically, if kosmicKrisp & zink is functional there could be some compatibility, but until then ill be waiting for the update with the indirect draw calls.

@jb4-dev
Copy link

jb4-dev commented Jan 3, 2026

Complementary's ACL doesn't work, as it is disabled on macOS by default, but should work if patched.

I attempted to patch Complementary Unbound so colored lighting features would work, but it fails to load with the "Very High" and "Ultra" presets, with the "Ultra" preset returning this error:
SHADOW_TERRAIN_CUTOUT: SHADOW_TERRAIN_CUTOUT: error: Too many vertex shader storage blocks (1/0)
The Very High preset doesn't return any specific error, but the rendering is clearly messed up.
Screenshot 2026-01-03 at 1 41 17 PM
In the logs of Prism Launcher the only message I get after enabling the "Very High" preset is this:
[13:41:54] [Render thread/WARN]: Error while parsing the block ID map entry for "block.10104":
[13:41:54] [Render thread/WARN]: - The block minecraft:stone_slab has no property with the name variant, ignoring!
Which is only a warning, but it seems to happen every time the "Very High" preset is enabled. It seems to happen with all presets for Complementary Unbound.

@Wixonic you can use the "RenderScale" mod

This mod doesn't seem to work at anything besides 1.0 scale factor, any amount above or below will cause severe flickering to a black screen which renders the game as unplayable.

@Minemaximus1023
Copy link

Sorry if this diverges from the original topic

But is it possible to use that Kosmic crisp driver instead of moltenvk for this mod that uses Vulkan

https://modrinth.com/mod/vulkanmod/

If so I’d gladly want to know how.

@ggenesiss
Copy link

Hi there! I was wondering if I could get some help with getting Minecraft to run

I did everything that was listed above and got:

Prism Launcher version: 9.4 (official)

Launched instance in online mode

login.microsoftonline.com resolves to:
[2603:1036:3000:148::8, 2603:1037:1:148::12, 2603:1037:1:148::9, 2603:1037:1:148::b, 2603:1037:1:148::d, 2603:1037:1:148::e, 2603:1036:3000:148::b, 2603:1036:3000:148::9, 20.190.157.11, 40.126.29.14, 20.190.157.14, 20.190.157.1, 20.190.157.15, 40.126.29.7, 20.190.157.12, 20.190.157.4]

session.minecraft.net resolves to:
[2620:1ec:29:1::70, 2620:1ec:48:1::70, 13.107.253.70, 13.107.226.70]

textures.minecraft.net resolves to:
[2620:1ec:29:1::70, 2620:1ec:48:1::70, 13.107.253.70, 13.107.226.70]

api.mojang.com resolves to:
[2620:1ec:29:1::70, 2620:1ec:48:1::70, 13.107.226.70, 13.107.253.70]

Minecraft folder is:
/Users/genesis/Library/Application Support/PrismLauncher/instances/1.21(1)/minecraft

Java path is:
/Users/genesis/Library/Application Support/PrismLauncher/java/java-runtime-delta/bin/java

Java is version 21.0.7, using 64 (aarch64) architecture, from Microsoft.

Main Class:
net.fabricmc.loader.impl.launch.knot.KnotClient

Native path:
/Users/genesis/Library/Application Support/PrismLauncher/instances/1.21(1)/natives

Traits:
traits XR:Initial
traits feature:is_quick_play_singleplayer
traits FirstThreadOnMacOS
traits feature:is_quick_play_multiplayer

Libraries:
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/lwjgl/lwjgl-freetype-natives-macos-arm64/3.3.3/lwjgl-freetype-natives-macos-arm64-3.3.3.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/lwjgl/lwjgl-freetype/3.3.3/lwjgl-freetype-3.3.3.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/lwjgl/lwjgl-glfw-natives-macos-arm64/3.3.3/lwjgl-glfw-natives-macos-arm64-3.3.3.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/lwjgl/lwjgl-glfw/3.3.3/lwjgl-glfw-3.3.3.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/lwjgl/lwjgl-jemalloc-natives-macos-arm64/3.3.3/lwjgl-jemalloc-natives-macos-arm64-3.3.3.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/lwjgl/lwjgl-jemalloc/3.3.3/lwjgl-jemalloc-3.3.3.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/lwjgl/lwjgl-natives-macos-arm64/3.3.3/lwjgl-natives-macos-arm64-3.3.3.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/lwjgl/lwjgl-openal-natives-macos-arm64/3.3.3/lwjgl-openal-natives-macos-arm64-3.3.3.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/lwjgl/lwjgl-openal/3.3.3/lwjgl-openal-3.3.3.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/lwjgl/lwjgl-opengl-natives-macos-arm64/3.3.3/lwjgl-opengl-natives-macos-arm64-3.3.3.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/lwjgl/lwjgl-opengl/3.3.3/lwjgl-opengl-3.3.3.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/lwjgl/lwjgl-stb-natives-macos-arm64/3.3.3/lwjgl-stb-natives-macos-arm64-3.3.3.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/lwjgl/lwjgl-stb/3.3.3/lwjgl-stb-3.3.3.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/lwjgl/lwjgl-tinyfd-natives-macos-arm64/3.3.3/lwjgl-tinyfd-natives-macos-arm64-3.3.3.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/lwjgl/lwjgl-tinyfd/3.3.3/lwjgl-tinyfd-3.3.3.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/lwjgl/lwjgl/3.3.3/lwjgl-3.3.3.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/ca/weblite/java-objc-bridge/1.1/java-objc-bridge-1.1.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/com/github/oshi/oshi-core/6.4.10/oshi-core-6.4.10.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/com/google/code/gson/gson/2.10.1/gson-2.10.1.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/com/google/guava/guava/32.1.2-jre/guava-32.1.2-jre.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/com/ibm/icu/icu4j/73.2/icu4j-73.2.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/com/mojang/authlib/6.0.54/authlib-6.0.54.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/com/mojang/blocklist/1.0.10/blocklist-1.0.10.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/com/mojang/brigadier/1.2.9/brigadier-1.2.9.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/com/mojang/datafixerupper/8.0.16/datafixerupper-8.0.16.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/com/mojang/logging/1.2.7/logging-1.2.7.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/com/mojang/patchy/2.2.10/patchy-2.2.10.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/com/mojang/text2speech/1.17.9/text2speech-1.17.9.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/commons-codec/commons-codec/1.16.0/commons-codec-1.16.0.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/commons-io/commons-io/2.15.1/commons-io-2.15.1.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/commons-logging/commons-logging/1.2/commons-logging-1.2.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/io/netty/netty-buffer/4.1.97.Final/netty-buffer-4.1.97.Final.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/io/netty/netty-codec/4.1.97.Final/netty-codec-4.1.97.Final.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/io/netty/netty-common/4.1.97.Final/netty-common-4.1.97.Final.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/io/netty/netty-handler/4.1.97.Final/netty-handler-4.1.97.Final.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/io/netty/netty-resolver/4.1.97.Final/netty-resolver-4.1.97.Final.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/io/netty/netty-transport-classes-epoll/4.1.97.Final/netty-transport-classes-epoll-4.1.97.Final.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/io/netty/netty-transport-native-unix-common/4.1.97.Final/netty-transport-native-unix-common-4.1.97.Final.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/io/netty/netty-transport/4.1.97.Final/netty-transport-4.1.97.Final.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/it/unimi/dsi/fastutil/8.5.12/fastutil-8.5.12.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/net/java/dev/jna/jna-platform/5.14.0/jna-platform-5.14.0.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/net/java/dev/jna/jna/5.14.0/jna-5.14.0.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/apache/commons/commons-compress/1.26.0/commons-compress-1.26.0.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/apache/commons/commons-lang3/3.14.0/commons-lang3-3.14.0.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/apache/logging/log4j/log4j-api/2.22.1/log4j-api-2.22.1.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/apache/logging/log4j/log4j-core/2.22.1/log4j-core-2.22.1.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/apache/logging/log4j/log4j-slf4j2-impl/2.22.1/log4j-slf4j2-impl-2.22.1.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/jcraft/jorbis/0.0.17/jorbis-0.0.17.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/joml/joml/1.10.5/joml-1.10.5.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/lz4/lz4-java/1.8.0/lz4-java-1.8.0.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/slf4j/slf4j-api/2.0.9/slf4j-api-2.0.9.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/net/fabricmc/intermediary/1.21/intermediary-1.21.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/ow2/asm/asm/9.9/asm-9.9.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/ow2/asm/asm-analysis/9.9/asm-analysis-9.9.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/ow2/asm/asm-commons/9.9/asm-commons-9.9.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/ow2/asm/asm-tree/9.9/asm-tree-9.9.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/org/ow2/asm/asm-util/9.9/asm-util-9.9.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/net/fabricmc/sponge-mixin/0.17.0+mixin.0.8.7/sponge-mixin-0.17.0+mixin.0.8.7.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/net/fabricmc/fabric-loader/0.18.4/fabric-loader-0.18.4.jar
/Users/genesis/Library/Application Support/PrismLauncher/libraries/com/mojang/minecraft/1.21/minecraft-1.21-client.jar

Native libraries:

Params:
--username --version 1.21 --gameDir /Users/genesis/Library/Application Support/PrismLauncher/instances/1.21(1)/minecraft --assetsDir /Users/genesis/Library/Application Support/PrismLauncher/assets --assetIndex 17 --uuid --accessToken --userType --versionType release

Window size: 854 x 480

Launcher: standard

Java Arguments:
[-Dorg.lwjgl.egl.libname=$HOME/mesa-native/lib/libEGL.dylib, -Dorg.lwjgl.opengl.libname=$HOME/mesa-native/lib/libGL.dylib, -Dorg.lwjgl.glfw.libname=/Users/genesis/glfw/build/src/libglfw.3.dylib, -Xdock:icon=icon.png, -Xdock:name="Prism Launcher: ZINK", -XstartOnFirstThread, -Xms4096m, -Xmx4096m, -Duser.language=en]

Minecraft process ID: 96392

[01:49:50] [main/INFO]: Loading Minecraft 1.21 with Fabric Loader 0.18.4
[01:49:50] [main/INFO]: Loading 4 mods:
- fabricloader 0.18.4
-- mixinextras 0.5.0
- java 21
- minecraft 1.21
[01:49:50] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.7 Source=file:/Users/genesis/Library/Application%20Support/PrismLauncher/libraries/net/fabricmc/sponge-mixin/0.17.0+mixin.0.8.7/sponge-mixin-0.17.0+mixin.0.8.7.jar Service=Knot/Fabric Env=CLIENT
[01:49:50] [Datafixer Bootstrap/INFO]: 226 Datafixer optimizations took 107 milliseconds
[01:49:53] [Render thread/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[01:49:53] [Render thread/INFO]: Setting user: ggenesiss
[01:49:53] [Render thread/INFO]: Backend library: LWJGL version 3.3.3-snapshot
libEGL warning: egl: failed to create dri2 screen
libEGL warning: DRI2: failed to create screen
MESA: error: ZINK: failed to load libvulkan.1.dylib
libEGL warning: egl: failed to create dri2 screen
libEGL warning: DRI2: failed to create screen
libEGL warning: egl: failed to create dri2 screen
libEGL warning: DRI2: failed to create screen
[01:49:55] [Render thread/WARN]: Failed to create window:
net.minecraft.class_1041$class_4716: GLFW error 65542: EGL: Failed to initialize EGL: EGL is not or could not be initialized
at knot/net.minecraft.class_1041.method_4501(class_1041.java:212) ~[client-intermediary.jar:?]
at knot/org.lwjgl.glfw.GLFWErrorCallbackI.callback(GLFWErrorCallbackI.java:43) ~[lwjgl-glfw-3.3.3.jar:?]
at knot/org.lwjgl.system.JNI.invokePPPP(Native Method) ~[lwjgl-3.3.3.jar:?]
at knot/org.lwjgl.glfw.GLFW.nglfwCreateWindow(GLFW.java:2058) ~[lwjgl-glfw-3.3.3.jar:?]
at knot/org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:2229) ~[lwjgl-glfw-3.3.3.jar:?]
at knot/net.minecraft.class_1041.(class_1041.java:96) ~[client-intermediary.jar:?]
at knot/net.minecraft.class_3682.method_16038(class_3682.java:21) ~[client-intermediary.jar:?]
at knot/net.minecraft.class_310.(class_310.java:505) ~[client-intermediary.jar:?]
at knot/net.minecraft.client.main.Main.main(Main.java:239) [client-intermediary.jar:?]
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:514) [fabric-loader-0.18.4.jar:?]
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:72) [fabric-loader-0.18.4.jar:?]
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.18.4.jar:?]
at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:105) [NewLaunch.jar:?]
at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129) [NewLaunch.jar:?]
at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) [NewLaunch.jar:?]
Process exited with code 0.

Could someone take a look at this and provide a potential fix? Thanks!

@lucamignatti
Copy link
Author

You need to replace the $HOME with your actual homepath (/Users/yourusername)

@calcastor
Copy link

Cool work here, great to see OpenGL 4.6 running on macOS in 2026 :)

Theoretically, this could also let us use MoltenVK; however there is a shader naming conflict when doing so that I don't know how to workaround.

@xrt3z
Copy link

xrt3z commented Jan 5, 2026

dyld[87564]: terminating because inserted dylib '/Users/xrt3zy/mesa-native/lib/libgl_interpose.dylib' could not be loaded: tried: '/Users/xrt3zy/mesa-native/lib/libgl_interpose.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/Users/xrt3zy/mesa-native/lib/libgl_interpose.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Users/xrt3zy/mesa-native/lib/libgl_interpose.dylib' (no such file), '/Users/xrt3zy/mesa-native/lib/libgl_interpose.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e'))
dyld[87564]: tried: '/Users/xrt3zy/mesa-native/lib/libgl_interpose.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/Users/xrt3zy/mesa-native/lib/libgl_interpose.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Users/xrt3zy/mesa-native/lib/libgl_interpose.dylib' (no such file), '/Users/xrt3zy/mesa-native/lib/libgl_interpose.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e'))

Any ideas? Did I build something incorrectly?

@Thinkseal
Copy link

try updating prism launcher to 10.0.1 and replace all instances of $HOME with your home path in both the jvm args and environment variables

@kerudion
Copy link

kerudion commented Jan 7, 2026

Prism launcher's recently updated to 10.0 and broke environment variables, so they randomly don't apply or disappear. I guess the only option for now is to disable auto updates and downgrade to https://github.com/PrismLauncher/PrismLauncher/releases/tag/9.4 until it gets fixed.

@Thinkseal
Copy link

from my testing it seems to break them for a bit then stop and idk why

@sassa7777
Copy link

dyld[87564]: terminating because inserted dylib '/Users/xrt3zy/mesa-native/lib/libgl_interpose.dylib' could not be loaded: tried: '/Users/xrt3zy/mesa-native/lib/libgl_interpose.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/Users/xrt3zy/mesa-native/lib/libgl_interpose.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Users/xrt3zy/mesa-native/lib/libgl_interpose.dylib' (no such file), '/Users/xrt3zy/mesa-native/lib/libgl_interpose.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')) dyld[87564]: tried: '/Users/xrt3zy/mesa-native/lib/libgl_interpose.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/Users/xrt3zy/mesa-native/lib/libgl_interpose.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Users/xrt3zy/mesa-native/lib/libgl_interpose.dylib' (no such file), '/Users/xrt3zy/mesa-native/lib/libgl_interpose.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e'))

Any ideas? Did I build something incorrectly?

Do you have SIP disabled? If so, try enabling it.

@Thinkseal
Copy link

you need to compile the libraries as arm64 not arm64e

@SeseMueller
Copy link

Great Work! I did try to get it running in GTNH since the development team was crazy enough to get it to use Java 17-21 despite being on Mineraft 1.7.10.
Sadly, the workaround they use conflicts with this setup in some way; I get the error java.lang.IllegalStateException: There is no OpenGL context current in the current thread. no matter what I try. And the Java 8 instance just doesn't use it. I will keep experimenting, but I doubt I'll be successfull.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment