Skip to content

Commit

Permalink
Add Zink Override
Browse files Browse the repository at this point in the history
  • Loading branch information
klylabs committed Feb 11, 2025
1 parent 6d34b40 commit afba2ee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
12 changes: 11 additions & 1 deletion src/platform/unix/BuildLinuxImage.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,17 @@ export LD_LIBRARY_PATH="\$DIR/bin:\$LD_LIBRARY_PATH"
# FIXME: OrcaSlicer segfault workarounds
# 1) OrcaSlicer will segfault on systems where locale info is not as expected (i.e. Holo-ISO arch-based distro)
export LC_ALL=C
if command -v nvidia-smi >/dev/null 2>&1; then
DRIVER_VERSION=$(nvidia-smi --query-gpu=driver_version --format=csv,noheader | head -n 1)
DRIVER_MAJOR=$(echo "$DRIVER_VERSION" | cut -d. -f1)
if [ "$DRIVER_MAJOR" -gt 555 ]; then
export __GLX_VENDOR_LIBRARY_NAME=mesa
export __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json
export MESA_LOADER_DRIVER_OVERRIDE=zink
export GALLIUM_DRIVER=zink
export WEBKIT_DISABLE_DMABUF_RENDERER=1
fi
fi
exec "\$DIR/bin/@SLIC3R_APP_CMD@" "\$@"
EOF

Expand Down
15 changes: 0 additions & 15 deletions src/platform/unix/build_appimage.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,6 @@ fi

sed -i -e 's#/usr#././#g' bin/@SLIC3R_APP_CMD@
mv @SLIC3R_APP_CMD@ AppRun
cat << 'EOF' >> AppRun
if command -v nvidia-smi >/dev/null 2>&1; then
DRIVER_VERSION=$(nvidia-smi --query-gpu=driver_version --format=csv,noheader | head -n 1)
DRIVER_MAJOR=$(echo "$DRIVER_VERSION" | cut -d. -f1)
if [ "$DRIVER_MAJOR" -gt 555 ]; then
export __GLX_VENDOR_LIBRARY_NAME=mesa
export __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json
export MESA_LOADER_DRIVER_OVERRIDE=zink
export GALLIUM_DRIVER=zink
export WEBKIT_DISABLE_DMABUF_RENDERER=1
fi
fi
EOF
chmod +x AppRun

cp resources/images/@SLIC3R_APP_KEY@_192px.png @[email protected]
Expand Down

0 comments on commit afba2ee

Please sign in to comment.