tests: draw the First Light perspective camera through D3D12 (TEST-D3D12-FIRST-LIGHT-CAMERA) #1540

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

@⁠Rain156 on GitHub · 2026-11-25 03:55 UTC · original
Rain156:rain/d3d12-first-light-camera → main · +121 −19 · 2 files · 1 commits · open

Claimed in the coordination issue as: TEST-D3D12-FIRST-LIGHT-CAMERA. Claim

Depends on: #939, #974 (both merged).

What and why

The First Light camera already had a CPU projection and a Vulkan reference image. Its Xbox D3D12 device fixture used an empty root signature, so the same local mesh and shader pair produced a clear target in both camera poses. The fixture now uploads the world and view-projection matrices, creates the two CBVs in their measured descriptor slots, and binds the table through the graphics root signature. It converts the projection to the D3D12 viewport convention before comparing the readbacks. The runbook includes the Windows CTest command.

This is an offscreen draw through the Xbox device proxy and its Windows SDK command list. The model, shader containers and reference images stayed in the local work directory.

Tested

Windows 11 x64, MSVC RelWithDebInfo, NVIDIA GeForce RTX 5070 Ti, driver 617.42. Final build and GPU tests on main bfef489cb.

  • A local Xbox 1.0.2.1 model with 4,213 vertices and 7,968 triangles. The unmodified fixture on 0bc810504 covered 0 of 16,384 pixels at both 30° and 55° yaw. The updated D3D12 fixture covered 6,851 and 6,846 respectively. Each complete 128×128 image matched its independent vk_harness readback bit for bit and passed the centre and four CPU UV probes. Both angles and the orthographic control passed again under Khronos synchronization validation.

  • The two camera images differ at 6,862 pixels. The fixture rejected a substituted camera pose, a zero world matrix, an incomplete matrix row and a changed reference pixel. An older orthographic manifest with the camera field omitted passed.

  • The 48 First Light Python checks passed with the local package fixture enabled. Eight related native CTests passed, covering root arguments, depth resolve, translated and derived draws, compute and mesh. All 6,279 translator tests passed across 487 files. Documentation link and changed-file game-data checks passed.

  • Separate retail smoke test of the same runtime in a zero-capability AppContainer, using the locally rebuilt shader library from b07b9ecb0: the last sampled present was frame 24,321. All 96 sampled swapchain images were black. The title stopped at a breakpoint after 139 seconds. The trigger is still unidentified.

AI-assisted: Yes (Codex).

The claim linked above was posted before this PR. Issue #14 reached GitHub's 2,500-comment limit before the completion notice could be posted.

**@⁠Rain156** on GitHub · 2026-11-25 03:55 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1540) `Rain156:rain/d3d12-first-light-camera` → `main` · +121 −19 · 2 files · 1 commits · open Claimed in the coordination issue as: TEST-D3D12-FIRST-LIGHT-CAMERA. [Claim](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) Depends on: #939, #974 (both merged). ### What and why The First Light camera already had a CPU projection and a Vulkan reference image. Its Xbox D3D12 device fixture used an empty root signature, so the same local mesh and shader pair produced a clear target in both camera poses. The fixture now uploads the world and view-projection matrices, creates the two CBVs in their measured descriptor slots, and binds the table through the graphics root signature. It converts the projection to the D3D12 viewport convention before comparing the readbacks. The runbook includes the Windows CTest command. This is an offscreen draw through the Xbox device proxy and its Windows SDK command list. The model, shader containers and reference images stayed in the local work directory. ### Tested Windows 11 x64, MSVC RelWithDebInfo, NVIDIA GeForce RTX 5070 Ti, driver 617.42. Final build and GPU tests on main `bfef489cb`. - A local Xbox 1.0.2.1 model with 4,213 vertices and 7,968 triangles. The unmodified fixture on `0bc810504` covered 0 of 16,384 pixels at both 30° and 55° yaw. The updated D3D12 fixture covered 6,851 and 6,846 respectively. Each complete 128×128 image matched its independent `vk_harness` readback bit for bit and passed the centre and four CPU UV probes. Both angles and the orthographic control passed again under Khronos synchronization validation. - The two camera images differ at 6,862 pixels. The fixture rejected a substituted camera pose, a zero world matrix, an incomplete matrix row and a changed reference pixel. An older orthographic manifest with the camera field omitted passed. - The 48 First Light Python checks passed with the local package fixture enabled. Eight related native CTests passed, covering root arguments, depth resolve, translated and derived draws, compute and mesh. All 6,279 translator tests passed across 487 files. Documentation link and changed-file game-data checks passed. - Separate retail smoke test of the same runtime in a zero-capability AppContainer, using the locally rebuilt shader library from `b07b9ecb0`: the last sampled present was frame 24,321. All 96 sampled swapchain images were black. The title stopped at a breakpoint after 139 seconds. The trigger is still unidentified. AI-assisted: Yes (Codex). The claim linked above was posted before this PR. Issue #14 reached GitHub's 2,500-comment limit before the completion notice could be posted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:55:52 +00:00
Author
Owner

@⁠PierreEbele on GitHub · 2026-11-25 15:37 UTC · original

Reviewed 6e3a442: ran tests/test_first_light.py (48 OK, 4 skipped) and check_no_game_data.py on the changed files, plus a CPU probe replaying your CBV layout (world 256 B, view 512 B, viewproj at 0x160), clip-Y column negation and row mapping against first_light.py's camera oracle: CBV bytes, V# slots 1/3 (0x20/0x60) and the s8/s9 placement all agree; the passthrough path is unchanged. I could not run or compile the D3D12 fixture itself (no MSVC/GPU/package here), so the C++ was only read and the RTX 5070 Ti table stands as reported. No findings.

AI-assisted review.

Recommendation: Merge

**@⁠PierreEbele** on GitHub · 2026-11-25 15:37 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1540#issuecomment-7167133517) Reviewed 6e3a442: ran tests/test_first_light.py (48 OK, 4 skipped) and check_no_game_data.py on the changed files, plus a CPU probe replaying your CBV layout (world 256 B, view 512 B, viewproj at 0x160), clip-Y column negation and row mapping against first_light.py's camera oracle: CBV bytes, V# slots 1/3 (0x20/0x60) and the s8/s9 placement all agree; the passthrough path is unchanged. I could not run or compile the D3D12 fixture itself (no MSVC/GPU/package here), so the C++ was only read and the RTX 5070 Ti table stands as reported. No findings. AI-assisted review. **Recommendation:** Merge
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/1540/head:github-bot/gh-1540'
git switch 'github-bot/gh-1540'

Merge

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