build_runtime.ps1: link d3d12_xs_pso_stream.cpp into root_sig_test and device_proxy_test (BUILD-FALLBACK-PSO-STREAM) #1854

Open
github-bot wants to merge 1 commit from github-bot/gh-1854 into main AGit
Owner

@⁠ambroseautomation on GitHub · 2026-11-25 13:11 UTC · original
ambroseautomation:fix/build-fallback-pso-stream → main · +27 −2 · 2 files · 1 commits · open

Claimed in the coordination issue as: BUILD-FALLBACK-PSO-STREAM (#1608)

What and why

On current main (98c2f7777), running scripts/build_runtime.ps1 on a Windows host without CMake/Ninja (the cl.exe fallback path) fails to link root_sig_test.exe with 6 LNK2019 unresolved external symbols (PsoStreamRecord::capture, PsoStreamRecord::derived, derive_stream, attach_pso_record, find_pso_record, ~PsoStreamRecord), and device_proxy_test.exe has the same omission.

Root cause: runtime/shims/d3d12_xs_device.cpp depends on runtime/shims/d3d12_xs_pso_stream.cpp. Both runtime/CMakeLists.txt (lines 241-272) and the gta6rt.exe $files list in scripts/build_runtime.ps1 include shims/d3d12_xs_pso_stream.cpp, but the two cl.exe fallback lines for root_sig_test.exe and device_proxy_test.exe omitted it, and tests/test_build_runtime_fallback.py only cross-checked gta6rt's source list against runtime/CMakeLists.txt.

Implementation summary:

  • Add "$src\shims\d3d12_xs_pso_stream.cpp" to the root_sig_test.exe and device_proxy_test.exe cl.exe commands in scripts/build_runtime.ps1.
  • Add test_every_non_vulkan_fallback_target_compiles_every_source_cmake_gives_it in tests/test_build_runtime_fallback.py checking gta6rt_tls_host, root_sig_test, device_proxy_test, descriptor_table_test, and command_list_test against runtime/CMakeLists.txt.

Tested

Before (clean main 98c2f7777):

  • .\scripts\build_runtime.ps1 -jobs 12 → FAIL (exit 1): root_sig_test.exe : fatal error LNK1120: 6 unresolved externals (PsoStreamRecord / derive_stream / attach_pso_record / find_pso_record).

After (Windows 11, MSVC 14.51.36231 / Visual Studio 18, cl.exe fallback path):

  • .\scripts\build_runtime.ps1 -jobs 12 → PASS (exit 0; built bcpack_history_train.exe, gta6rt.exe, gta6rt_tls_host.dll, root_sig_test.exe, device_proxy_test.exe, descriptor_table_test.exe, command_list_test.exe).
  • .\runtime\build\root_sig_test.exe → PASS (exit 0).
  • .\runtime\build\device_proxy_test.exe → device_proxy_test: OK (0 failures) (exit 0).
  • .\runtime\build\descriptor_table_test.exe → descriptor_table_test: all tests passed (0 failures) (exit 0).
  • .\runtime\build\command_list_test.exe → PASS (exit 0).
  • python -I tests/test_build_runtime_fallback.py -v → 11 tests OK.
  • python -I tests/test_text_write_line_endings.py → 3 tests OK.
  • python -I scripts/check_no_game_data.py scripts/build_runtime.ps1 tests/test_build_runtime_fallback.py → exit 0 (clean).

GPUs tested: NVIDIA GeForce RTX 2060 with Max-Q Design (driver 621.40, Windows 11) — device_proxy_test.exe ran on the local D3D12 WARP/host runtime; no game files used.

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a — build script and test only)
**@⁠ambroseautomation** on GitHub · 2026-11-25 13:11 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1854) `ambroseautomation:fix/build-fallback-pso-stream` → `main` · +27 −2 · 2 files · 1 commits · open Claimed in the coordination issue as: BUILD-FALLBACK-PSO-STREAM (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What and why On current `main` (`98c2f7777`), running `scripts/build_runtime.ps1` on a Windows host without CMake/Ninja (the `cl.exe` fallback path) fails to link `root_sig_test.exe` with 6 `LNK2019` unresolved external symbols (`PsoStreamRecord::capture`, `PsoStreamRecord::derived`, `derive_stream`, `attach_pso_record`, `find_pso_record`, `~PsoStreamRecord`), and `device_proxy_test.exe` has the same omission. **Root cause:** `runtime/shims/d3d12_xs_device.cpp` depends on `runtime/shims/d3d12_xs_pso_stream.cpp`. Both `runtime/CMakeLists.txt` (lines 241-272) and the `gta6rt.exe` `$files` list in `scripts/build_runtime.ps1` include `shims/d3d12_xs_pso_stream.cpp`, but the two `cl.exe` fallback lines for `root_sig_test.exe` and `device_proxy_test.exe` omitted it, and `tests/test_build_runtime_fallback.py` only cross-checked `gta6rt`'s source list against `runtime/CMakeLists.txt`. **Implementation summary:** - Add `"$src\shims\d3d12_xs_pso_stream.cpp"` to the `root_sig_test.exe` and `device_proxy_test.exe` `cl.exe` commands in `scripts/build_runtime.ps1`. - Add `test_every_non_vulkan_fallback_target_compiles_every_source_cmake_gives_it` in `tests/test_build_runtime_fallback.py` checking `gta6rt_tls_host`, `root_sig_test`, `device_proxy_test`, `descriptor_table_test`, and `command_list_test` against `runtime/CMakeLists.txt`. ### Tested **Before (clean `main` `98c2f7777`):** - `.\scripts\build_runtime.ps1 -jobs 12` → FAIL (exit 1): `root_sig_test.exe : fatal error LNK1120: 6 unresolved externals` (`PsoStreamRecord` / `derive_stream` / `attach_pso_record` / `find_pso_record`). **After (Windows 11, MSVC 14.51.36231 / Visual Studio 18, `cl.exe` fallback path):** - `.\scripts\build_runtime.ps1 -jobs 12` → PASS (exit 0; built `bcpack_history_train.exe`, `gta6rt.exe`, `gta6rt_tls_host.dll`, `root_sig_test.exe`, `device_proxy_test.exe`, `descriptor_table_test.exe`, `command_list_test.exe`). - `.\runtime\build\root_sig_test.exe` → PASS (exit 0). - `.\runtime\build\device_proxy_test.exe` → `device_proxy_test: OK (0 failures)` (exit 0). - `.\runtime\build\descriptor_table_test.exe` → `descriptor_table_test: all tests passed (0 failures)` (exit 0). - `.\runtime\build\command_list_test.exe` → PASS (exit 0). - `python -I tests/test_build_runtime_fallback.py -v` → 11 tests OK. - `python -I tests/test_text_write_line_endings.py` → 3 tests OK. - `python -I scripts/check_no_game_data.py scripts/build_runtime.ps1 tests/test_build_runtime_fallback.py` → exit 0 (clean). GPUs tested: NVIDIA GeForce RTX 2060 with Max-Q Design (driver 621.40, Windows 11) — `device_proxy_test.exe` ran on the local D3D12 WARP/host runtime; no game files used. AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a — build script and test only)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:08:46 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1854/head:github-bot/gh-1854'
git switch 'github-bot/gh-1854'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1854'
git switch 'github-bot/gh-1854'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1854'
git switch 'github-bot/gh-1854'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1854'
git switch 'main'
git merge --squash 'github-bot/gh-1854'
git switch 'main'
git merge --ff-only 'github-bot/gh-1854'
git switch 'main'
git merge 'github-bot/gh-1854'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.