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

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

📋 Pull Request Information

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

Base: main ← Head: rain/d3d12-first-light-camera


📝 Commits (1)

  • 6e3a442 tests: draw the First Light perspective camera through Xbox D3D12

📊 Changes

2 files changed (+121 additions, -19 deletions)

View changed files

📝 docs/first_light.md (+26 -3)
📝 runtime/test/d3d12_first_light_test.cpp (+95 -16)

📄 Description

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.


🔄 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/1540 **Author:** [@Rain156](https://github.com/Rain156) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `rain/d3d12-first-light-camera` --- ### 📝 Commits (1) - [`6e3a442`](https://github.com/ubiquitarianism/leonida/commit/6e3a44259c9464d5c5f2713c89fcd8d649f09c8f) tests: draw the First Light perspective camera through Xbox D3D12 ### 📊 Changes **2 files changed** (+121 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `docs/first_light.md` (+26 -3) 📝 `runtime/test/d3d12_first_light_test.cpp` (+95 -16) </details> ### 📄 Description Claimed in the coordination issue as: TEST-D3D12-FIRST-LIGHT-CAMERA. [Claim](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7151946238) 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. --- <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#1568
No description provided.