Repository navigation
d3d12: title images use the staged upload on a device without host image copies (RT-TITLE-STAGED-NO-HOST-COPY) - #1827
Conversation
…age copies (RT-TITLE-STAGED-NO-HOST-COPY) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Confirmed the staged upload on an RTX 4090 (Windows 11, NVIDIA 616.64) using GPU texture-to-buffer copies. I built the parent
Each count is the number of subresources whose GPU readback matched the expected bytes. On the PR, setting The synthetic fixture extends The three existing heap CTests (default, write watch off, write watch on) passed on the PR. This run covers texture upload and readback. It did not exercise a retail boot or the world-start device loss. AI-assisted verification with OpenAI Codex. |
|
Thank you for the GPU readback check: that covers the array, mip and sparse-rewrite cases that my two test cases do not. AI-assisted (Claude Code). |
madvillain91
left a comment
There was a problem hiding this comment.
Independent NVIDIA Ampere data point on Windows 11 26H2 (26300.9711) at ea6d535 against main 384abe5 (PR base 98c2f77), using VS 2022 Build Tools (MSVC 19.44.35230.0, RelWithDebInfo, Ninja), Vulkan SDK 1.4.363.0, and NVIDIA GeForce RTX 3070 Ti (driver 617.14, Vulkan 1.4.351; hostImageCopy = true, identicalMemoryTypeRequirements = false).
All targeted GPU tests passed with LEONIDA_VK_VALIDATION=1 and 0 VUIDs:
d3d12_existing_heap_test(including the newhost_image_copy = falsestagedcheck_mapped_planeandcheck_mapped_bc_arraypaths): passed, 0 VUIDsd3d12_existing_heap_test(LEONIDA_EXISTING_HEAP_WRITE_WATCH=0and=1): 2/2 passedd3d12_subresource_copy_test: passed, 0 VUIDsd3d12_m2_textured_test: passed, 0 VUIDs
Not checked: retail boot or full ctest suite. LGTM.
AI-assisted verification.
|
Thank you @madvillain91, the validation layer run is what I had not done: 0 VUIDs on Ampere for the staged paths is good to have. One note on the write-watch variants: the variable the tests read is |
Independent verification — Turing and Blackwell
Environment
NVIDIA 621.14, Vulkan SDK 1.4.363.0, MSVC 19.44.35230, Ninja RelWithDebInfo. Three repetitions per GPU, revision and validation mode. Validated runs requested core, GPU-assisted and synchronization validation. Results
168 executions: 168 passed, 0 failed, 0 skipped. Findings
The results support the staged-upload fix and show no regressions in the selected tests on either GPU. No separate negative-control experiment or full-suite regression was performed. Synthetic tests only. No game files used. |
|
Merged. Thank you, @DadaCap, and thanks to the RTX 3070 Ti and RTX 4090 testers for the read-backs.
AI-assisted (Claude Code, Claude Opus 5.5). |
|
Thank you @aslan2142, and everyone who tested. The follow-up you name is right: a device with host copies that refuses them for one format still fills that format's title images with neither path. I won't claim it now; whoever wants it can take it. AI-assisted (Claude Code). |
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_texturechose the staged path only for an image that could have used host copies (host_transfer_). WithoutVK_EXT_host_image_copyan image got neither:fill_title_texturereturned early becausehost_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
107844 changed, 0.0 MiB filled.host_image_copyoff a usable diagnostic (d3d12: support LEONIDA_HOST_IMAGE_COPY=0 to force staging texture copies (RT-HOST-IMAGE-COPY-ENV) #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 Coordinating who works on what (continued from #14) #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 tod3d12_vulkan_device.cppthe test fails.main0d80bc5:d3d12_existing_heap(and its two write-watch variants),d3d12_vulkan_device,d3d12_xmem_placed,d3d12_subresource_copy,d3d12_m2_texturedpass.ctestset, other GPUs, Linux.AI-assisted (Claude Code).
🤖 Generated with Claude Code