[video] frame_generation (opt-in, with render_thread): the render thread keeps
each game frame's replayed draw list, matches the triangles of the last two
(frame_gen.c), and presents in-between frames at the display refresh by
redrawing the newer list into separate surfaces with matched vertices
interpolated. It never runs guest code. Real frames are composed at their
flip and presented after the generated ones, with the same pixels and
order. Generation uses only measured surplus: a plan from render-thread CPU,
generated-frame cost and swap time, a breaker after backpressure or late
guest frames, and a pause while dynamic resolution is over budget. The
render-thread core gains a timed tick hook. Frame-cost queries pause around
generation, so dynamic resolution measures real frames only.
Tests: frame_gen_test, render_thread_test (tick), gl_frame_gen_test (real
frames identical off/on; phase 0/1 equal the endpoints). Docs:
docs/FRAME_GENERATION.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The step record's replay sat inside the debug-tools block, so release
builds dropped every recorded step. gl_render_thread_test gains a dynres
mode: the same level steps between frames with the thread off (applied at
once) and on (recorded), identical guest readbacks, VRAM, frame and wide
surface, and the render thread's frame cost measured. Also drop the
duplicate gpu_ws_background_requires_full_composite stub the #508 merge
left in the scale-invariance fixture.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
render_thread_test is registered on MinGW (winpthreads provides the
fixture's pthreads and nanosleep; the core takes its Win32 path).
gl_render_thread_test gains the MinGW link path run_gl_scale_invariance.py
uses on test/gl-scale-invariance-windows (static SDL3, opengl32 and its
Win32 libraries, LTO, probe.exe), and a host with no window or GL 3.3 core
context (headless, Windows over SSH) exits 77 from a preflight run, reported
by CTest as a skip.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gl_render_thread_test runs a scripted stream through the facade twice per
scale (1x, 4x): every value the guest reads back, native VRAM, the frame
at internal resolution and the native-wide surface must match with the
render thread off and on. The stream has mask set/check, a mask-checked
upload (per-pixel readback sync point), back-to-back uploads of one rect
with a catch-up between gpu.c's writes and its commit, ring wraps,
readback frames, presents, and widescreen tags that change per primitive
and are poisoned after each call. A slow render-thread present keeps the
replay a frame behind. It fails for each of: reading tags live, sharing
the upload source with the guest array, dropping the stream state.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>