[PR #1631] [MERGED] d3d12: test that a view past the title-window cap is never the raw VA (RT-TITLE-WINDOW-OVERFLOW) #1646

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1631
Author: @Tyrannys
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142

Base: main ← Head: title-window-overflow


📝 Commits (3)

  • 6d66718 d3d12: title memory past the window cap names a zeroed scratch window (RT-TITLE-WINDOW-OVERFLOW)
  • 2c7440f Merge main into title-window-overflow
  • 02d719c Merge main into title-window-overflow; keep only the window-cap test

📊 Changes

2 files changed (+110 additions, -0 deletions)

View changed files

📝 runtime/CMakeLists.txt (+4 -0)
📝 runtime/test/d3d12_title_va_test.cpp (+106 -0)

📄 Description

Claimed in the coordination issue as: RT-TITLE-WINDOW-OVERFLOW (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7154369840)

Now test-only

This PR first added a zeroed scratch window for title memory past LEONIDA_TITLE_WINDOWS_MB, so the GPU would never get the title's raw VA (#1537: one read of it loses the device). Main has since fixed the runtime side another way, in ba626820e: past the cap (or with the arena full) a title address is backed by the persistent geometry copy, or else every view writer writes a zero-size V# (no base, no records: loads 0, stores dropped). The raw VA never comes out. That also covers the review points about a shared, writable scratch and the 16 MiB arena reserve, so the scratch window is dropped and the runtime and docs follow main.

What is left is the test, because main had none that dispatches through an over-cap title address:

  • ctest d3d12_title_window_cap runs d3d12_title_va_test --window-cap with LEONIDA_TITLE_WINDOWS_MB=0. Two CBVs of different pages of private title memory are written zero-size (base 0, 0 records, never the raw VA), no window is made, and a dispatch through one reads 64/64 zero words with no validation errors. No game files.

Tested

Windows 11, RTX 4070 SUPER, RelWithDebInfo, on main 384abe5b0 merged in:

  • d3d12_title_window_cap, d3d12_title_va, d3d12_title_va_shadow, d3d12_geometry_views, d3d12_unmapped_vsharp, d3d12_title_index_window, d3d12_title_vertex_window, d3d12_api_descriptor_copy(_off), d3d12_rebound_*, title_va_alias, title_window_plan, title_window, geometry_views: 20/20 pass.

The real-boot results earlier in this thread (QemmHD, sodove, whoalin1) were for the scratch-window version, not for main's route.

AI-assisted (Claude Code, Claude Opus 5.5).

🤖 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/1631 **Author:** [@Tyrannys](https://github.com/Tyrannys) **Created:** 11/25/2026 **Status:** ✅ Merged **Merged:** 11/25/2026 **Merged by:** [@aslan2142](https://github.com/aslan2142) **Base:** `main` ← **Head:** `title-window-overflow` --- ### 📝 Commits (3) - [`6d66718`](https://github.com/ubiquitarianism/leonida/commit/6d66718f3efbf799fe2d2e8a853702b72368e832) d3d12: title memory past the window cap names a zeroed scratch window (RT-TITLE-WINDOW-OVERFLOW) - [`2c7440f`](https://github.com/ubiquitarianism/leonida/commit/2c7440fed8c586d4eeed50f6b81e94b5dbaf2396) Merge main into title-window-overflow - [`02d719c`](https://github.com/ubiquitarianism/leonida/commit/02d719cdacae0a12414c9bc970812768daa49d5b) Merge main into title-window-overflow; keep only the window-cap test ### 📊 Changes **2 files changed** (+110 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `runtime/CMakeLists.txt` (+4 -0) 📝 `runtime/test/d3d12_title_va_test.cpp` (+106 -0) </details> ### 📄 Description Claimed in the coordination issue as: RT-TITLE-WINDOW-OVERFLOW (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7154369840) ### Now test-only This PR first added a zeroed scratch window for title memory past `LEONIDA_TITLE_WINDOWS_MB`, so the GPU would never get the title's raw VA (#1537: one read of it loses the device). Main has since fixed the runtime side another way, in ba626820e: past the cap (or with the arena full) a title address is backed by the persistent geometry copy, or else every view writer writes a zero-size V# (no base, no records: loads 0, stores dropped). The raw VA never comes out. That also covers the review points about a shared, writable scratch and the 16 MiB arena reserve, so the scratch window is dropped and the runtime and docs follow `main`. What is left is the test, because main had none that dispatches through an over-cap title address: - ctest `d3d12_title_window_cap` runs `d3d12_title_va_test --window-cap` with `LEONIDA_TITLE_WINDOWS_MB=0`. Two CBVs of different pages of private title memory are written zero-size (base 0, 0 records, never the raw VA), no window is made, and a dispatch through one reads 64/64 zero words with no validation errors. No game files. ### Tested Windows 11, RTX 4070 SUPER, RelWithDebInfo, on `main` 384abe5b0 merged in: - `d3d12_title_window_cap`, `d3d12_title_va`, `d3d12_title_va_shadow`, `d3d12_geometry_views`, `d3d12_unmapped_vsharp`, `d3d12_title_index_window`, `d3d12_title_vertex_window`, `d3d12_api_descriptor_copy(_off)`, `d3d12_rebound_*`, `title_va_alias`, `title_window_plan`, `title_window`, `geometry_views`: 20/20 pass. The real-boot results earlier in this thread (QemmHD, sodove, whoalin1) were for the scratch-window version, not for main's route. AI-assisted (Claude Code, Claude Opus 5.5). 🤖 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>
4ld0 2026-11-26 20:21:58 +01:00
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#1646
No description provided.