GL readback runner: link render_pass_plan.c into the fixture

The MinGW fixture compiles gpu_gl_renderer.c (through
test_gl_readback_region.c) with only gpu_sw_renderer.c beside it.
gl_renderer_shutdown() now releases the render-pass resources, including
the VRAM journal's CPU rows, so the PE link left render_pass_journal_free
unresolved and the runner returned 2. render_pass_plan.c is self-contained
(libc only), so link it rather than stub each journal and policy entry
point.

Checked with a macOS clang stand-in for gcc.exe/g++.exe (-flto,
dead_strip): the branch before this left render_pass_journal_free
unresolved; now it links, and the probe then behaves exactly as on master
(macOS gives the fixture a GL 2.1 context, so both stop at shader compile).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shokunin
2026-09-28 20:32:19 -07:00
parent 1decf2574d
commit 0c0d375673
+6 -2
View File
@@ -66,7 +66,11 @@ def main():
return result
fixture = args.fixture or framework / "runtime/tests/test_gl_readback_region.c"
for name, source in [("probe", fixture), ("sw", framework / "runtime/src/gpu_sw_renderer.c")]:
# The renderer's render-pass paths call the journal and VRAM policy in
# render_pass_plan.c (self-contained: no other runtime symbols).
sources = [("probe", fixture), ("sw", framework / "runtime/src/gpu_sw_renderer.c"),
("rp", framework / "runtime/src/render_pass_plan.c")]
for name, source in sources:
if run([compiler / "gcc.exe", "-std=c11", "-O2", "-flto", "-DPSX_SDL3=1",
"-DPSX_NO_DEBUG_TOOLS=1", *includes, "-c", source,
"-o", dest / (name + ".o")]).returncode:
@@ -74,7 +78,7 @@ def main():
libraries = ["m", "kernel32", "user32", "gdi32", "winmm", "imm32", "ole32",
"oleaut32", "version", "uuid", "advapi32", "setupapi", "shell32",
"dinput8", "opengl32"]
if run([compiler / "g++.exe", "-O2", "-flto", dest / "probe.o", dest / "sw.o",
if run([compiler / "g++.exe", "-O2", "-flto", *[dest / (name + ".o") for name, _ in sources],
sdl_library, *["-l" + name for name in libraries],
"-o", dest / "probe.exe"]).returncode:
return 2