[PR #1827] [MERGED] d3d12: title images use the staged upload on a device without host image copies (RT-TITLE-STAGED-NO-HOST-COPY) #1840

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

📋 Pull Request Information

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

Base: main ← Head: title-staged-no-host-copy


📝 Commits (1)

  • ea6d535 d3d12: title images use the staged upload on a device without host image copies (RT-TITLE-STAGED-NO-HOST-COPY)

📊 Changes

3 files changed (+24 additions, -5 deletions)

View changed files

📝 docs/d3d12_vulkan.md (+4 -1)
📝 runtime/shims/d3d12_vulkan_device.cpp (+11 -4)
📝 runtime/test/d3d12_existing_heap_test.cpp (+9 -0)

📄 Description

RT-TITLE-STAGED-NO-HOST-COPY, claimed and found in #1608.

What

A title image (a streamed or placed texture of the title's) is filled from the title's memory by one of two paths: a host image copy, or the staged upload (TitleImageUpload). create_texture chose the staged path only for an image that could have used host copies (host_transfer_). Without VK_EXT_host_image_copy an image got neither: fill_title_texture returned early because host_copy_now() is false, and the texture stayed zero for the whole run.

Now, on a device without host copies, colour title images take the staged upload, linear placements (the movie planes) included. Devices with host copies behave as before. There is no memory type to compare with in this case, so any type the image allows is accepted.

Why

  • Any GPU or driver without the extension shows no title textures. Seen here with the extension switched off: the intro movie is a flat green frame (zero YUV planes), and the refresh log reads 107844 changed, 0.0 MiB filled.
  • It makes host_image_copy off a usable diagnostic (#1810), as QemmHD's runs suggest host image copies are involved in the world-start WRITE_INVALID. With this change and host copies off, the movie shows and a retail boot reached the first world frame (136 draws, 11,525 indirect draws, 2,118 dispatches) with no type 2 fault; the device is then lost at another place (details in #1608, n=1).

This pull request does not turn host copies off for anyone.

Tests

  • d3d12_existing_heap_test: the mapped plane and mapped BC array cases also run on a device made without host copies. Negative check: without the change to d3d12_vulkan_device.cpp the test fails.
  • RTX 5080, NVIDIA 621.24, Windows 11, VS 18 RelWithDebInfo, on main 0d80bc5df: d3d12_existing_heap (and its two write-watch variants), d3d12_vulkan_device, d3d12_xmem_placed, d3d12_subresource_copy, d3d12_m2_textured pass.
  • Not run: the whole ctest set, other GPUs, Linux.

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/1827 **Author:** [@DadaCap](https://github.com/DadaCap) **Created:** 11/25/2026 **Status:** ✅ Merged **Merged:** 11/25/2026 **Merged by:** [@aslan2142](https://github.com/aslan2142) **Base:** `main` ← **Head:** `title-staged-no-host-copy` --- ### 📝 Commits (1) - [`ea6d535`](https://github.com/ubiquitarianism/leonida/commit/ea6d535ff5831c81bec75505bfc190142296579d) d3d12: title images use the staged upload on a device without host image copies (RT-TITLE-STAGED-NO-HOST-COPY) ### 📊 Changes **3 files changed** (+24 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `docs/d3d12_vulkan.md` (+4 -1) 📝 `runtime/shims/d3d12_vulkan_device.cpp` (+11 -4) 📝 `runtime/test/d3d12_existing_heap_test.cpp` (+9 -0) </details> ### 📄 Description RT-TITLE-STAGED-NO-HOST-COPY, claimed and found in [#1608](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7162394831). ## What A title image (a streamed or placed texture of the title's) is filled from the title's memory by one of two paths: a host image copy, or the staged upload (`TitleImageUpload`). `create_texture` chose the staged path only for an image that could have used host copies (`host_transfer_`). Without `VK_EXT_host_image_copy` an image got neither: `fill_title_texture` returned early because `host_copy_now()` is false, and the texture stayed zero for the whole run. Now, on a device without host copies, colour title images take the staged upload, linear placements (the movie planes) included. Devices with host copies behave as before. There is no memory type to compare with in this case, so any type the image allows is accepted. ## Why - Any GPU or driver without the extension shows no title textures. Seen here with the extension switched off: the intro movie is a flat green frame (zero YUV planes), and the refresh log reads `107844 changed, 0.0 MiB filled`. - It makes `host_image_copy` off a usable diagnostic (#1810), as QemmHD's runs suggest host image copies are involved in the world-start WRITE_INVALID. With this change and host copies off, the movie shows and a retail boot reached the first world frame (136 draws, 11,525 indirect draws, 2,118 dispatches) with no type 2 fault; the device is then lost at another place (details in #1608, n=1). This pull request does not turn host copies off for anyone. ## Tests - `d3d12_existing_heap_test`: the mapped plane and mapped BC array cases also run on a device made without host copies. Negative check: without the change to `d3d12_vulkan_device.cpp` the test fails. - RTX 5080, NVIDIA 621.24, Windows 11, VS 18 RelWithDebInfo, on `main` 0d80bc5df: `d3d12_existing_heap` (and its two write-watch variants), `d3d12_vulkan_device`, `d3d12_xmem_placed`, `d3d12_subresource_copy`, `d3d12_m2_textured` pass. - Not run: the whole `ctest` set, other GPUs, Linux. 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>
4ld0 2026-11-26 21:19:08 +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#1840
No description provided.