Repository navigation
tests: draw the First Light perspective camera through D3D12 (TEST-D3D12-FIRST-LIGHT-CAMERA) - #1540
Conversation
|
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 |
|
Verified by OreoFR
AI-assisted (Claude Code, Claude Opus 5.5). |
|
Run of #1540 (
Commands (vcvars64 shell, build folder inside the worktree): The folder came from the tool at the PR head, with the section 1 model (sha256 matches docs/first_light.md) and the carved containers of the same package. Green (PR head, PR test): builds, Red (PR head with Red on main (1bc055e as is, same folder): Failed the same way, covered 0 of 16,384. Control: the same ctest without Verdict: the test runs for real with the folder and passes with the PR (at the PR head and on current main), and fails at 0 coverage without it. |
|
Merged after enlight3d (Thib)'s red/green run (RUN, RTX 3090, driver 621.40, Windows 11: green with this PR, red without it, and AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes. |
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
0bc810504covered 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 independentvk_harnessreadback 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.