summaryrefslogtreecommitdiffstats
path: root/tools/guest-diag/mission-gz.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/guest-diag/mission-gz.sh')
-rw-r--r--tools/guest-diag/mission-gz.sh22
1 files changed, 16 insertions, 6 deletions
diff --git a/tools/guest-diag/mission-gz.sh b/tools/guest-diag/mission-gz.sh
index c4665d2..cb27503 100644
--- a/tools/guest-diag/mission-gz.sh
+++ b/tools/guest-diag/mission-gz.sh
@@ -8,6 +8,8 @@
#
# Env knobs: GZ_SECS (default 240) GLF_FRAMES (default 0 = skip probe)
# GLF_W/GLF_H GZCAP GZCAP_MAXF GZ_ATTEMPTS (default 2)
+# GZ_EGL (default 0; 1 = SDL offscreen + real NVIDIA EGL via
+# gz_es.so, no X - the c1020/c1021 real-GL path)
#
# 2026-11-16 (post-reboot c895-c898): the gl_frames probe is now OFF by default
# (GLF_FRAMES=0). It is a diagnostic, not a render source, and in the batch it
@@ -20,6 +22,8 @@ export DISPLAY=:0
GZCAP="${GZCAP:-/dev/shm/gzframes.bin}"
GZCAP_MAXF="${GZCAP_MAXF:-1800}"
GZ_ATTEMPTS="${GZ_ATTEMPTS:-2}"
+GZ_EGL="${GZ_EGL:-0}"
+export GZ_EGL
x_up() {
local t r
@@ -39,11 +43,17 @@ echo "mission start $(date +%T)"
rm -f /tmp/mission-done /tmp/gzframes.bin "$GZCAP"
mkdir -p /tmp/gzshots
-# 1. X up (the DDX ScreenInit is a per-start lottery)
+# 1. X up (the DDX ScreenInit is a per-start lottery). The GZ_EGL path is
+# offscreen EGL and does not need X at all.
XOK=0
-XTRY=$(x_up) && XOK=1
-echo "XOK try=$XTRY $(date +%T)"
-if [ "$XOK" = 0 ]; then echo "X-FAIL" > /tmp/mission-done; exit 1; fi
+if [ "$GZ_EGL" = "1" ]; then
+ XOK=1
+ echo "X skipped (GZ_EGL=1 offscreen EGL) $(date +%T)"
+else
+ XTRY=$(x_up) && XOK=1
+ echo "XOK try=$XTRY $(date +%T)"
+ if [ "$XOK" = 0 ]; then echo "X-FAIL" > /tmp/mission-done; exit 1; fi
+fi
bash /tmp/guest_mode.sh 2>/dev/null || true
# 2. Optional GPU GL probe (diagnostic only; off by default)
@@ -73,12 +83,12 @@ export GZ_RCFILE=/tmp/gz-rc
GZRC=255
attempt=1
while [ "$attempt" -le "$GZ_ATTEMPTS" ]; do
- if ! pgrep -x Xorg >/dev/null; then
+ if [ "$GZ_EGL" != "1" ] && ! pgrep -x Xorg >/dev/null; then
echo "X dead before GZDoom attempt $attempt - restarting" >> /tmp/mission-gz.log
x_up >/dev/null 2>&1 || { echo "X restart failed" >> /tmp/mission-gz.log; break; }
fi
rm -f "$GZ_RCFILE"
- GZ_DETACH=1 TIMEOUT="$GZ_SECS" GZLOG=/tmp/mission-gz.log GZCAP="$GZCAP" \
+ GZ_EGL="$GZ_EGL" GZ_DETACH=1 TIMEOUT="$GZ_SECS" GZLOG=/tmp/mission-gz.log GZCAP="$GZCAP" \
GZCAP_MAXF="$GZCAP_MAXF" \
GZPBUF_W="${GZPBUF_W:-640}" GZPBUF_H="${GZPBUF_H:-480}" \
bash /tmp/gzdoom_pbuf_run.sh