mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 12:28:40 +00:00
Conflicts resolved keeping both sides: main's comment cleanup (#764) taken where only comments differed; the test branch's code kept everywhere else. ensureAuto runs main's Quest auto drivers before the Mali paths; vkp_update_map keeps the Quest layer path and the completion-unknown check (pass_begin goes through it); gamescope backend selection plus main's steam-mode cursor composite; droiddeck-session's watcher is main's shared loop with the Venus GL probe after it; SessionFiles/runtime_inputs/build.yml carry both the Xclipse layer and main's VR assets. Main's GPU detection test follows the non-Adreno support text; the Steam presentation test finds its block by code, not by a removed comment.
33 lines
1.3 KiB
Bash
33 lines
1.3 KiB
Bash
#!/bin/bash
|
|
set -u
|
|
[ $# -gt 0 ] || { echo "usage: droiddeck-gpu <program> [args...]" >&2; exit 64; }
|
|
if [ -n "${BL_DEBUG_DIR:-}" ]; then
|
|
exec >>"$BL_DEBUG_DIR/desktop.log" 2>&1
|
|
fi
|
|
width=${BL_WIDTH:-1280}
|
|
height=${BL_HEIGHT:-720}
|
|
backend=${BL_GAMESCOPE_BACKEND:-wayland}
|
|
case "$backend" in
|
|
wayland|sdl) ;;
|
|
*) echo "== unsupported gamescope backend: $backend" >&2; exit 64 ;;
|
|
esac
|
|
args=(--backend "$backend" --expose-wayland -f -W "$width" -H "$height" -w "$width" -h "$height")
|
|
if [ "${BL_FPS:-0}" -gt 0 ]; then
|
|
args+=(-r "$BL_FPS")
|
|
elif [ "${BL_REFRESH:-0}" -gt 0 ]; then
|
|
args+=(-r "$BL_REFRESH")
|
|
fi
|
|
[ "${BL_HDR:-0}" = 1 ] && args+=(--hdr-enabled)
|
|
echo "== droiddeck-gpu $(date -u +%H:%M:%S): $* (gamescope ${width}x${height} on wayland-0)"
|
|
export WAYLAND_DISPLAY=wayland-0
|
|
export GDK_BACKEND=x11 QT_QPA_PLATFORM=xcb SDL_VIDEODRIVER=x11
|
|
[ "$backend" = sdl ] && export SDL_VIDEODRIVER=wayland
|
|
unset LIBGL_ALWAYS_SOFTWARE QT_QUICK_BACKEND KWIN_COMPOSE
|
|
export MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink LIBGL_KOPPER_DRI2=true
|
|
[ -n "${DROIDDECK_GLTHREAD:-}" ] && export mesa_glthread=$DROIDDECK_GLTHREAD
|
|
export APPIMAGE_EXTRACT_AND_RUN=1
|
|
gamescope "${args[@]}" -- env SDL_VIDEODRIVER=x11 /usr/local/bin/droiddeck-gpu-window "$@"
|
|
rc=$?
|
|
echo "== droiddeck-gpu $(date -u +%H:%M:%S): exited $rc"
|
|
exit $rc
|