[PR #1816] d3d12_title_va_test: a BLAS build in title memory no resource covers (RT-BVH-BUILD-TITLE-VA) #1827

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

📋 Pull Request Information

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

Base: main ← Head: bvh-build-title-va-test


📝 Commits (3)

  • cf8490c d3d12_title_va_test: a BLAS build in title memory no resource covers
  • d581668 Merge remote-tracking branch 'origin/main' into bvh-build-title-va-test
  • 97070ee d3d12_title_va_test: count the BLAS check and name the switches that fail it

📊 Changes

1 file changed (+118 additions, -0 deletions)

View changed files

📝 runtime/test/d3d12_title_va_test.cpp (+118 -0)

📄 Description

Item: RT-BVH-BUILD-TITLE-VA (#1608). Test only.

I claimed this item to translate the addresses of acceleration-structure builds. #1723 merged that fix first, and it covers more (the BLAS addresses in TLAS instances, copies sized by the build), so my version is dropped. What is left is one case its tests don't have.

d3d12_xdxr_rt_test builds into slot-133 buffers. The new check_bvh_build in d3d12_title_va_test builds a BLAS with the vertices, indices, destination and scratch all in the title's own memory and no resource over any of it, so every address goes through a title window. The test shader reads the header back at the destination and it must have the triangles' bounds. Before anything is submitted, the test checks that every address got a GPU copy, so a missing translation fails without losing the device.

The check is skipped with LEONIDA_GEOMETRY_MB > 0 (d3d12_geometry_views), like the geometry-only checks next to it are skipped without it.

Tested on RTX 5060 Ti, driver 621.01, Windows 10 22H2, main 0d80bc5df:

  • d3d12_title_va and d3d12_title_va_shadow pass, bounds -5 0 1 to 4 8 9. d3d12_com, d3d12_xdxr_rt, xbox_bvh_builder, d3d12_rebound_* and d3d12_api_descriptor_copy* pass.
  • Negative control: with LEONIDA_RT_AS=off the builds are dropped, and the test fails at the address check, before the submission.
  • d3d12_geometry_views fails on this machine, at !root_blob.empty() in main, before any check runs (the Windows 10 host serializer returned no blob for the heap-directly-indexed root signature). This change does not touch that code. I did not run it on main without the change.
  • Not run in the game.

Noticed while placing the check: a stream pool's two alias ranges stay in the table after the pool's memory is freed (remove_title_memory and dropping the pair do not remove them). When the test allocated its block at those addresses, two parts of it shared one copy and the build read zeros. That is why the check runs before check_stream_pool. Whether the retail title ever reuses a pool's addresses I have not checked.

AI-assisted (Claude Code).

🤖 Generated with Claude Code


🔄 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/1816 **Author:** [@Snooozs](https://github.com/Snooozs) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `bvh-build-title-va-test` --- ### 📝 Commits (3) - [`cf8490c`](https://github.com/ubiquitarianism/leonida/commit/cf8490c8f583431a6e3a09522678a13ebbb5e288) d3d12_title_va_test: a BLAS build in title memory no resource covers - [`d581668`](https://github.com/ubiquitarianism/leonida/commit/d5816683ba3b2f00eb597bb21e5988252ef2c802) Merge remote-tracking branch 'origin/main' into bvh-build-title-va-test - [`97070ee`](https://github.com/ubiquitarianism/leonida/commit/97070ee127c593e9d364be7b7050de2f2f37caf1) d3d12_title_va_test: count the BLAS check and name the switches that fail it ### 📊 Changes **1 file changed** (+118 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/d3d12_title_va_test.cpp` (+118 -0) </details> ### 📄 Description Item: RT-BVH-BUILD-TITLE-VA (#1608). Test only. I claimed this item to translate the addresses of acceleration-structure builds. #1723 merged that fix first, and it covers more (the BLAS addresses in TLAS instances, copies sized by the build), so my version is dropped. What is left is one case its tests don't have. `d3d12_xdxr_rt_test` builds into slot-133 buffers. The new `check_bvh_build` in `d3d12_title_va_test` builds a BLAS with the vertices, indices, destination and scratch all in the title's own memory and no resource over any of it, so every address goes through a title window. The test shader reads the header back at the destination and it must have the triangles' bounds. Before anything is submitted, the test checks that every address got a GPU copy, so a missing translation fails without losing the device. The check is skipped with `LEONIDA_GEOMETRY_MB` > 0 (`d3d12_geometry_views`), like the geometry-only checks next to it are skipped without it. Tested on RTX 5060 Ti, driver 621.01, Windows 10 22H2, main `0d80bc5df`: - `d3d12_title_va` and `d3d12_title_va_shadow` pass, bounds -5 0 1 to 4 8 9. `d3d12_com`, `d3d12_xdxr_rt`, `xbox_bvh_builder`, `d3d12_rebound_*` and `d3d12_api_descriptor_copy*` pass. - Negative control: with `LEONIDA_RT_AS=off` the builds are dropped, and the test fails at the address check, before the submission. - `d3d12_geometry_views` fails on this machine, at `!root_blob.empty()` in `main`, before any check runs (the Windows 10 host serializer returned no blob for the heap-directly-indexed root signature). This change does not touch that code. I did not run it on main without the change. - Not run in the game. Noticed while placing the check: a stream pool's two alias ranges stay in the table after the pool's memory is freed (`remove_title_memory` and dropping the pair do not remove them). When the test allocated its block at those addresses, two parts of it shared one copy and the build read zeros. That is why the check runs before `check_stream_pool`. Whether the retail title ever reuses a pool's addresses I have not checked. AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <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#1827
No description provided.