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

Open
opened 2026-11-26 21:19:14 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1854
Author: @ambroseautomation
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: fix/build-fallback-pso-stream


📝 Commits (1)

  • 7bf1dbe build_runtime.ps1: link d3d12_xs_pso_stream.cpp into root_sig_test and device_proxy_test (BUILD-FALLBACK-PSO-STREAM)

📊 Changes

2 files changed (+27 additions, -2 deletions)

View changed files

📝 scripts/build_runtime.ps1 (+2 -2)
📝 tests/test_build_runtime_fallback.py (+25 -0)

📄 Description

Claimed in the coordination issue as: BUILD-FALLBACK-PSO-STREAM (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7163342978)

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)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1854 **Author:** [@ambroseautomation](https://github.com/ambroseautomation) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/build-fallback-pso-stream` --- ### 📝 Commits (1) - [`7bf1dbe`](https://github.com/ubiquitarianism/leonida/commit/7bf1dbe81cfd21f7a750dba71c3675d4d66daca6) build_runtime.ps1: link d3d12_xs_pso_stream.cpp into root_sig_test and device_proxy_test (BUILD-FALLBACK-PSO-STREAM) ### 📊 Changes **2 files changed** (+27 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `scripts/build_runtime.ps1` (+2 -2) 📝 `tests/test_build_runtime_fallback.py` (+25 -0) </details> ### 📄 Description Claimed in the coordination issue as: BUILD-FALLBACK-PSO-STREAM (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7163342978) ### 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1867
No description provided.