From ed8a9c6b8e061fe772fc0050ab83c2dec2db8d1e Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Mon, 16 Nov 2026 09:50:31 -0500 Subject: vgsp: eng89 - live-derived GS map, draw-move anchor, raster enables, async capture Kernel (deterministic fixes, each with an A/B knob): - sema_gl_sph_gs_maps=6: derive the whole 216-bit GS IMAP/OMAP blocks from the bound VTG image's OMAP and the PS image's IMAP at authoring time (SPH-GS-MAP receipt; SPH-GS-SKIP names ps-invalid/gs-invalid/ vtg-overlap/vtg-short). maps=4 stays as the fallback. - DS-MAP census line: dump stage-4/5 w5/w10/w13/w17 next to DS-IMAGE so the fetched maps are visible without a new probe. - MME pack carrier: reject maxa > 4096 (the IR pack array) instead of 64K, with MME-PACK-REJECT reason=bound. - MME-DRAW-MOVE: anchor the slot-34 move after a 0x3810 VERTEX_STREAM run. c848 moved CALL(34) to 0x204, ahead of the prepended stream bind, so the 8x3 fetch used stale stream state. - sema_gl_raster_enable=1: emit SET_RASTER_ENABLE=1 and SET_GLOBAL_RENDER_ENABLE MODE_TRUE in the raster prelude (fresh replay contexts may carry 0 for both, discarding every fragment). Guest tooling (unblocks the render loop and capture): - sdl_cap.c: asynchronous PBO+fence capture with a 5 s abandonment bound; no glFinish/blocking readback (c899 wedged gzdoom in an uninterruptible nv ioctl); clean sentinel from a destructor. - gz_pbuf.c: request depth 24/stencil 8, log GL_DEPTH_BITS, and swap with glFlush only. - mission-gz.sh: gl_frames probe off by default; GZDoom launched detached with a bounded wait, per-attempt X restart and retry; capture in /dev/shm with GZCAP_MAXF. - gzdoom_pbuf_run.sh: gl_pipeline_depth=2, gl_finishbeforeswap=0, GZCAP_MAXF default, rc-file support for the detached run. - run_cycles_long.sh: durable multi-cycle runner (the previous one lived in /tmp and was lost on reboot); pushes tools, runs the mission, grabs dmesg + guest logs + capture per cycle, stops on pixels. Test matrix: params-r1624-maps{4,6}.txt. --- tools/guest-diag/gzdoom_pbuf_run.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'tools/guest-diag/gzdoom_pbuf_run.sh') diff --git a/tools/guest-diag/gzdoom_pbuf_run.sh b/tools/guest-diag/gzdoom_pbuf_run.sh index 47817b7..49c5c96 100755 --- a/tools/guest-diag/gzdoom_pbuf_run.sh +++ b/tools/guest-diag/gzdoom_pbuf_run.sh @@ -25,18 +25,20 @@ set -u GZDOOM_BIN="${GZDOOM_BIN:-/opt/gzdoom/gzdoom}" WAD="${WAD:-/usr/share/games/doom/freedoom2.wad}" -GZCAP="${GZCAP:-/tmp/gzframes.bin}" +GZCAP="${GZCAP:-/dev/shm/gzframes.bin}" GZPBUF_W="${GZPBUF_W:-640}" +GZCAP_MAXF="${GZCAP_MAXF:-1800}" GZPBUF_H="${GZPBUF_H:-480}" GZLOG="${GZLOG:-/tmp/gzdoom-pbuf.log}" TIMEOUT="${TIMEOUT:-300}" GZ_ARGS="${GZ_ARGS:-}" GZ_DETACH="${GZ_DETACH:-0}" +GZ_RCFILE="${GZ_RCFILE:-/tmp/gz-rc}" DISPLAY="${DISPLAY:-:0}" SDL_VIDEODRIVER="${SDL_VIDEODRIVER:-offscreen}" LD_PRELOAD="${LD_PRELOAD:-/tmp/sdl_cap.so /tmp/gz_pbuf.so}" -export DISPLAY SDL_VIDEODRIVER LD_PRELOAD GZCAP GZPBUF_W GZPBUF_H +export DISPLAY SDL_VIDEODRIVER LD_PRELOAD GZCAP GZCAP_MAXF GZPBUF_W GZPBUF_H GZ_RCFILE if [ ! -x "$GZDOOM_BIN" ]; then echo "gzdoom_pbuf_run: GZDOOM_BIN not executable: $GZDOOM_BIN" >&2 @@ -65,6 +67,8 @@ CMD=( -nomusic +vid_activeinbackground 1 +vid_maxfps 60 + +set gl_pipeline_depth 2 + +set gl_finishbeforeswap 0 +map MAP01 ) if [ -n "$GZ_ARGS" ]; then @@ -74,14 +78,17 @@ fi echo "gzdoom_pbuf_run: DISPLAY=$DISPLAY SDL_VIDEODRIVER=$SDL_VIDEODRIVER" echo "gzdoom_pbuf_run: LD_PRELOAD=$LD_PRELOAD" -echo "gzdoom_pbuf_run: GZCAP=$GZCAP GZPBUF_W=$GZPBUF_W GZPBUF_H=$GZPBUF_H" +echo "gzdoom_pbuf_run: GZCAP=$GZCAP GZCAP_MAXF=$GZCAP_MAXF GZPBUF_W=$GZPBUF_W GZPBUF_H=$GZPBUF_H" echo "gzdoom_pbuf_run: LOG=$GZLOG TIMEOUT=$TIMEOUT DETACH=$GZ_DETACH" printf 'CMD:' printf ' %q' "${CMD[@]}" echo if [ "$GZ_DETACH" = "1" ]; then - setsid nohup timeout -k 5 "$TIMEOUT" "${CMD[@]}" > "$GZLOG" 2>&1 < /dev/null & + RCF="${GZ_RCFILE:-/tmp/gz-rc}" + rm -f "$RCF" + setsid nohup bash -c 'timeout -k 5 "$0" "${@:1}"; echo $? > "$GZ_RCFILE"' \ + "$TIMEOUT" "${CMD[@]}" > "$GZLOG" 2>&1 < /dev/null & echo "PID=$!" echo "LOG=$GZLOG" exit 0 -- cgit v1.2.3