Skip to content

d3d12: LEONIDA_HOST_IMAGE_COPY switch; auto leaves host image copies off on NVIDIA - #1851

Merged
aslan2142 merged 1 commit into
mainfrom
claude/host-image-copy-switch
Nov 27, 2026
Merged

aslan2142 merged 1 commit into
mainfrom
claude/host-image-copy-switch

Conversation

@QemmHD

@QemmHD QemmHD commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Depends on #1827 (DadaCap): without host image copies, title images only get filled once #1827 lands; otherwise they stay zero (verified by ecox982745 on an RTX 4090). Merge #1827 first.

The layer uses VK_EXT_host_image_copy for WriteToSubresource/ReadFromSubresource whenever the device has the extension and its hostImageCopy feature. On an RTX 4070 SUPER (Windows 11), a real boot lost the device with WRITE_INVALID in 7 of 7 runs that used host image copies and in 0 of 2 that didn't (481 s and 901 s, both still running at their time limits, up to 31,841 ExecuteCommandLists and 7,960 presents). The mechanism is still open. Details, and what's been ruled out, are in #1608:

  • not a translated store (store trace over every program);
  • no buffer device address near the fault;
  • not a mapping the layer made;
  • not the caller memory of recent host copies;
  • no image bound past its memory;
  • no validation-layer error about host copies or memory.

What this adds: LEONIDA_HOST_IMAGE_COPY.

  • 0: never.
  • 1: whenever available (the old behaviour).
  • auto (the default; also for unset or unrecognised text): the same as 1, except on NVIDIA (vendorID 0x10DE), where it's off.

When it's off, the extension is neither enabled nor chained, no image gets host-transfer usage, and every CPU texture copy takes the existing staging submit. That's exactly the path a device without the extension already takes. Device creation logs one line in place of the old "no VK_EXT_host_image_copy" line: [rt] d3d12: host image copy: on|off (<reason>).

Files

  • runtime/src/host_image_copy_policy.h (new): the choice as a pure function.
  • runtime/test/host_image_copy_policy_test.cpp (new, registered as host_image_copy_policy): the decision table (unset, empty, auto, 0, 1, other text) on NVIDIA, AMD and Intel, available and not.
  • runtime/shims/d3d12_vulkan_device.cpp: uses the choice.
  • runtime/README.md and docs/d3d12_vulkan.md: the variable, and why auto is off on NVIDIA.

Tested (Windows 11, RTX 4070 SUPER, MSVC RelWithDebInfo):

Cost and caveats

  • Staging uploads make the long loads slower.
  • The default leaves host copies unexercised on NVIDIA. The test harnesses that build their own device still cover them.
  • Replications on other NVIDIA cards (with =1 and with the default), and reports from AMD/Intel on whether auto should stay NVIDIA-only, are very welcome. If the mechanism turns out to be a layer usage error, the right fix replaces this default.

Claimed in #1608 as RT-HOST-IMAGE-COPY-SWITCH.

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

🤖 Generated with Claude Code

https://claude.ai/code/session_01SR1Fv7eQNgZjM6miWPKjHf

The layer enables VK_EXT_host_image_copy for WriteToSubresource and
ReadFromSubresource whenever the device has the extension and its
hostImageCopy feature. On an RTX 4070 SUPER (Windows 11) a real boot lost
the device with WRITE_INVALID in 7 of 7 runs that used host image copies
and in 0 of 2 that did not. The mechanism is not known yet.

LEONIDA_HOST_IMAGE_COPY chooses: 0 never, 1 whenever available, auto (the
default, also for unset or unrecognized text) as 1 except on NVIDIA
(vendorID 0x10DE), where it is off. Off, the extension is neither enabled
nor chained, so no image gets host-transfer usage and every CPU texture
copy takes the existing staging submit, as on a device without it.

The choice is a pure function (src/host_image_copy_policy.h) with a unit
test of its table, and device creation logs one line with the choice and
the reason in place of the old "no VK_EXT_host_image_copy" line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SR1Fv7eQNgZjM6miWPKjHf
@ecox982745

Copy link
Copy Markdown

Please land #1827 before enabling the NVIDIA default in this PR. I reproduced the dependency on an RTX 4090 (Windows 11, NVIDIA 616.64) using the production create_vulkan_device_standalone entry point. Each run started a fresh process, so the runtime itself selected the extension and created the Vulkan device.

Build and LEONIDA_HOST_IMAGE_COPY Runtime decision on the 4090 BC7 initial GPU readback Mapped R8 linear plane
#1851 alone, unset / auto / 0 off 0/21 subresources matched byte check failed
#1851 alone, 1 on 21/21 passed
#1851 + #1827, unset / auto / 0 off 21/21 passed
#1851 + #1827, 1 on 21/21 passed

Exact sources were #1851 59c1586d4 and the same revision with the #1827 ea6d535ff diff applied. I tested unset, auto, 0 and 1 separately in both builds. Every passing BC7 run also preserved all 21 subresources after rewriting only mip 3 of array slice 2 and again after a submission with no writes. The CPU host_image_copy_policy test passed in both builds.

The R8 fixture was check_mapped_plane from d3d12_existing_heap_test.cpp. The BC7 fixture used fenced GPU texture-to-buffer copies over 43,632 payload bytes per submission. This verifies texture contents under the proposed default and the forced-on control. Retail boot stability remains unmeasured in this run. Synthetic fixture details on #1827

AI-assisted verification with OpenAI Codex.

@MoonEyes MoonEyes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more NVIDIA configuration: desktop RTX 4060 (Ada), driver 610.88, Windows 11, MSVC 19.44 RelWithDebInfo, head 59c1586.

  • host_image_copy_policy: passes.
  • d3d12_texture_memory and d3d12_texture1d (both build the device through create_vulkan_device_standalone, so they read the switch), run three times:
LEONIDA_HOST_IMAGE_COPY logged line the 2 tests
unset host image copy: off (auto: NVIDIA); CPU texture copies use a staging submit 2/2 passed
0 host image copy: off (LEONIDA_HOST_IMAGE_COPY=0); CPU texture copies use a staging submit 2/2 passed
1 host image copy: on (LEONIDA_HOST_IMAGE_COPY=1) 2/2 passed

These two only check that the switch is read and the device comes up; they do no CPU texture copies. d3d12_subresource_copy builds its own devices with host_image_copy set per path, so it ignores the switch: in all three runs its host-image-copy and forced-retry paths reported 0 mismatches against the host and Microsoft's recorded answers (109 steps each). That says host copies are correct in this synthetic test on this card, not that the switch's staging path was exercised. None of this covers the BC7/R8 cases from the 4090 comment here (#1827).

A driver fact that may help with the open mechanism: on this card and driver, vulkaninfo reports identicalMemoryTypeRequirements = false (VkPhysicalDeviceVulkan14Properties, promoted from VkPhysicalDeviceHostImageCopyPropertiesEXT), with hostImageCopy = true and 28 copy src/dst layouts. So adding VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT may change an image's memory requirements on NVIDIA. The layer adds that usage (d3d12_vulkan_device.cpp 6196); it compares memoryTypeBits with and without that usage for staged title images (6237-6258) and retries without it when no type is allowed (6332), but not for ordinary textures. That fits your note that the switch also changes the images' memory type; it is a lead, not a cause.

The in-game replication on a 4070 Laptop / 621.40 is in #1608 (made with a local info.host_image_copy = false, not this switch). #1810 also accepts off (here off falls to auto, so stays on outside NVIDIA) and makes the test harness (vk_test_device.h) honour =0; this PR covers =0 in the layer only.

AI-assisted: yes (Claude Code ran the build and the tests; a separate agent checked this text against the logs and the code; I read both).

@QemmHD

QemmHD commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

@ecox982745 thank you, that's an important catch, and the table makes it unambiguous. Without host copies, title images take neither path before #1827, so auto on NVIDIA would leave them zero. Agreed: this depends on #1827 and shouldn't land before it. I've marked that in the description. Next on this side: a real-boot run of #1851 + #1827 with the default (auto → off on NVIDIA) on the RTX 4070 SUPER, checking for both the device loss and textured captures. I'll post the result here and on #1827.

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

@madvillain91 madvillain91 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent NVIDIA Ampere data point on Windows 11 26H2 (26300.9711) at 59c1586 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).

  • vulkaninfo reports hostImageCopy = true and identicalMemoryTypeRequirements = false on Ampere / 617.14 as well.
  • host_image_copy_policy_test: passed (all cases passed).
  • d3d12_texture_memory_test & d3d12_texture1d_test (both via create_vulkan_device_standalone):
    • unset: [rt] d3d12: host image copy: off (auto: NVIDIA); CPU texture copies use a staging submit (2/2 passed)
    • LEONIDA_HOST_IMAGE_COPY=0: [rt] d3d12: host image copy: off (LEONIDA_HOST_IMAGE_COPY=0); CPU texture copies use a staging submit (2/2 passed)
    • LEONIDA_HOST_IMAGE_COPY=1: [rt] d3d12: host image copy: on (LEONIDA_HOST_IMAGE_COPY=1) (2/2 passed)
  • d3d12_subresource_copy_test: passed.

Also independently verified prerequisite #1827 on this same RTX 3070 Ti (d3d12_existing_heap_test staged host_image_copy=false paths + d3d12_subresource_copy_test + d3d12_m2_textured_test, all 0 VUIDs under LEONIDA_VK_VALIDATION=1). Not checked: retail boot. LGTM (pending #1827 landing first as noted).

AI-assisted verification.

@QemmHD

QemmHD commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

Note: #1810 by abnalstlll-byte (opened earlier) adds LEONIDA_HOST_IMAGE_COPY=0/off for the same finding. This PR overlaps it and adds auto (off on NVIDIA) plus a tested decision table. I've offered on #1810 to rebase this on top of it with credit, or to fold the extra parts into it, whichever the maintainers prefer. Still blocked on #1827 either way.

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

@QemmHD

QemmHD commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

#1827 has landed on main (ea6d535, via #1192 at 3d4f661), so the dependency is met: with auto off on NVIDIA, title images now take the staged upload instead of staying zero. This branch merges cleanly onto 3d4f661. Since the last update, real-boot counts on the 4070 SUPER: 0 of 8 runs lose the device with host image copies off, against 7 of 7 with them, across both console profiles and two mains. OreoFR/MoonEyes reproduced it on a 4070 Laptop (621.40). A review from a maintainer would be welcome. On the overlap with #1810, whichever shape the maintainers prefer is fine by me.

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

@OreoFR

OreoFR commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Data point, not a decision: with #1893 (fixes the D32S8 → D32 depth copy that wrote past the end of the D32 image) and host image copy on (default), I no longer get crash A on my RTX 4070 Laptop 8 GB, driver 621.40.

So turning host image copy off may no longer be needed against crash A. That is 2 runs on one machine. Could someone with a 12 GB+ card (and ideally one who reproduced A with host copy on) run #1893 with host image copy on before we decide on this PR?

AI-assisted.

@QemmHD

QemmHD commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

@OreoFR that's a much better explanation than mine: a mismatched-format depth copy writing past the D32 image fits everything I saw (a driver routine, no translated store, the fault just past an image). It also explains why host image copies off only hid it, by moving memory around. I'm running #1893 with host image copies ON on the RTX 4070 SUPER now (12 GB; it reproduced A in 7 of 7 runs without the switch): 2 runs of #1893 alone, 1 with #1849, and a control without #1893 on the same main. If #1893 clears A here too, this PR's NVIDIA default shouldn't land. I'd then reduce it to the plain switch, or close it in favour of #1810, and #1893 is the real fix.

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

@Diegobecker07

Copy link
Copy Markdown

Data point for this PR, on a desktop RTX 5070 Ti 16 GB with NVIDIA 621.24 (Windows 11 Pro 26300, Ryzen 9 5900X, 48 GB, own 1.0.2.1). Counts only.

LEONIDA_HOST_IMAGE_COPY boots story load covered device loss how it ended
unset (off (auto: NVIDIA)) 1 ~340 s none 0xc0000005 in amd_fidelityfx_upscaler_xbox.dll+0x65ff (FSPX 27/29, #1862)
1 2 ~330 s and ~350 s none time limit (482 s)
1 with LEONIDA_VK_VALIDATION=1 1 ~375 s none the same upscaler 0xc0000005

This doesn't contradict the 4070 SUPER result. If #1893's explanation holds (a copy that writes past the end of a D32 image), whether that write hits something that faults probably depends on what is bound after the image, which can differ between cards. Because the control boots didn't fail here, I didn't run #1893 on this card.

AI-assisted.

@QemmHD

QemmHD commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @Diegobecker07, that's useful: no loss with host copies on in 3 of 3 boots on a 16 GB 5070 Ti fits #1893's explanation. Whether the write past the D32 image faults depends on what's bound after it, which differs with VRAM size and allocation order. Right now on the 4070 SUPER (same driver, 621.24): a control boot of main without #1893, then #1893 ×2 with host copies on, then #1893 + #1849. If #1893 clears it here, I'll drop this PR's NVIDIA default.

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

@OreoFR

OreoFR commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Merge order suggestion: #1893 first. If QemmHD's 4070 SUPER runs confirm that #1893 clears crash A with host image copy on, this PR could keep only the opt-in switch (LEONIDA_HOST_IMAGE_COPY=0) and drop the NVIDIA default. Host copy off costs upload performance on every NVIDIA card. Happy to rerun if needed.

@quartz-heron-58

Copy link
Copy Markdown
Contributor

Retail data for the default question, from a 16 GB card: host image copies on did not lose the device here once #1893 was in, and leaving them off costs about 3.9 GB of VRAM at the world start.

RTX 4080 16 GB, NVIDIA 621.24, Windows 11 26300, 32 GB RAM. Local merge of main b0f3d39 + #1849 #1893 #1889 #1860 #1886 #1882 #1887 and this PR; LEONIDA_TITLE_WINDOWS_MB=4096, LEONIDA_ARENA_MB=2048, LEONIDA_TITLE_WATCHDOG=0, LEONIDA_DEVICE_FAULT=1, scripted keyboard pad.

LEONIDA_HOST_IMAGE_COPY runs device loss ended by
unset (auto: off here) 2 none my free-RAM guard at 161 s; time limit at 150 s
1 4 none my free-RAM guard at 174, 229, 238 and 280 s

All six got to the world start (frames stop, large compute pipelines build); none got further, so this says nothing about later crashes.

Memory with LEONIDA_MEM_PROBE=1, one run each:

auto (off), t=150 s 1, t=237 s
registered image backing from slot 133 8,122 MiB 4,350 MiB
"CPU-fillable without a fill" 3,894 MiB 91 MiB
device-local (type 1) allocations 12,294 MiB 8,181 MiB

With the 2,048 MiB arena on top, the off run is at about 14.3 GB of 16 GB by 150 s, and in the other off run the log has "a 5594624-byte allocation did not fit in device-local memory and went to memory type 0". So on 16 GB the off default pushes allocations into shared memory around the world start; with copies on there is room left.

Not checked: main without #1893 with copies on (so I cannot say #1893 is what makes it safe here), anything past the world start, more than one probe run per setting. The probe times differ (150 s and 237 s); the later one is the smaller, so the gap is not from running longer.

AI-assisted (Claude Code).

@quartz-heron-58

Copy link
Copy Markdown
Contributor

One detail to my table above: the 174 s run with copies on also had Snooozs's merge of #1592 with main and a translated fspx_gfx (16,914 programs); the other five runs are the merge exactly as listed.

@QemmHD

QemmHD commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @OreoFR, @quartz-heron-58 and @abnalstlll-byte. #1893 has landed now, and quartz-heron-58's numbers settle the default question by themselves: host copies OFF cost about 3.9 GB of device-local memory at world start (12.3 GB vs 8.2 GB on a 4080), which pushes 12 GB cards into shared memory. So the NVIDIA auto: off default should go. I'll rework this PR into the plain opt-in switch: LEONIDA_HOST_IMAGE_COPY=0 to force staging, default on as before, with the one log line and the decision test kept. I'll push that after my A/B of #1893 on the 4070 SUPER finishes (on the build that lost the device in 7 of 7 runs), and post the counts here.

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

@QemmHD

QemmHD commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

Correction to my last comment, with data. I said I'd drop the NVIDIA default once #1893 was in; on the RTX 4070 SUPER it isn't that simple. On the build that lost the device in 7 of 7 runs with host copies on, adding #1893 changed nothing: 2 of 2 valid runs still lost the device with the same signature (WRITE_INVALID, same offset mod 2 MiB, same instruction-pointer entry; a third run was void). A log of every image-to-image copy at the patched spot shows no copy between two depth formats at all before the loss, so #1893 had nothing to act on here. On this card it's a different trigger from OreoFR's world-start one. That's also consistent with Diegobecker07's and quartz-heron-58's 16 GB cards not losing the device with copies on.

The running tally on the 4070 SUPER: losses in 9 of 9 runs with host image copies, 0 of 8 without, and 0 of 1 with only the vkCopyMemoryToImage calls skipped (usage and memory type unchanged). That points at a host copy write itself. Before the loss, the only unusual image copies in that window are block-compressed uploads with mips down to 1×1. I'm bisecting which class of host write is needed (BC formats, sub-block mips, …) to turn this into a narrow fix, so copies can stay on for everything else (quartz-heron-58's 3.9 GB matters). Until then I'd keep this PR as it is, and I'll update it with the bisect.

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

@QemmHD

QemmHD commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

Correction to my last comment: two things I said there don't hold.

  1. The "0 of 1 with only vkCopyMemoryToImage skipped" run was on a main where the load crawls, and it never reached the point where the loss happens. It's not evidence, so please disregard it.
  2. "It points at a host copy write itself" is wrong. On the build that reproduces the loss, skipping every block-compressed host write left only two plain host writes in the whole run, both the runtime's own startup picture at t=0. The loss still came at 261 s with the same signature.

What stands: with host image copies enabled the loss happens every time on that build (11 of 11); with the extension unused it doesn't (0 of 2 there, 0 of 6 on newer mains). So, as OreoFR suggested for their case, what the switch changes is most likely placement: HOST_TRANSFER usage changes the images' memory type and where they're bound, and that decides whether some other operation's overrun lands on unmapped memory. On this card that operation isn't the depth copy #1893 fixed. I'm adding VK_EXT_device_address_binding_report to the loss diagnostics, with unbind history (or using @MoonEyes's version if it's up), to name the object at the fault on this card.

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

@Tyrannys

Tyrannys commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Test report from a combined build on a second NVIDIA machine. Counts only.

Machine: Windows 11, RTX 4070 SUPER, NVIDIA 621.01, 64 GB, own 1.0.2.1 copy.

Build: main fe1553456 (already contains #1827 and #1893), plus #674, #1662, #1851, #1849, #1905, #1957, #1950, #1886 and #1894. All of them merged without conflicts.

Shaders: translated on 3de22a190 + #674 + #1662 with --wave64-emulate. 29,279 of 29,280 translated, and all 29,279 pass spirv-val. That is 2,683 library programs and 29 of 29 FSPX. main's translator changes since then are correctness fixes only.

Pipeline cache: warm and complete, 26,503 of 26,503 (9.6 GB).

  • Three library compute programs took 30 to 32 minutes each to build alone: the ScreenProbes ActivateRays, ActivateProbes and ActivateProbesTarget programs of indirect diffuse lighting.
  • Building all three at once crashed the NVIDIA compiler ("NVVM compilation failed: 3", after 22 minutes).

Recipe: scripts/windows-boot/boot.ps1 -Seconds 480, LEONIDA_KEYBOARD_PAD=1 LEONIDA_SKIP_INT3=1 LEONIDA_TITLE_WINDOWS_MB=1024 LEONIDA_MAP_READBACK=1, LEONIDA_PIPELINE_CACHE_DIR pointing at the offline cache. Host image copy: off (auto: NVIDIA) from #1851. One run per row.

run 1 run 2 (+ LEONIDA_TITLE_WATCHDOG=0)
end 344 s: the title's hang watchdog (null write at game_scarlett_master.exe+0x23cf683) full 484 s, stopped by the script
device loss / fault report none none
D3D12 calls 330,487 375,686
ExecuteCommandLists 5,490 6,017
Dispatch / DrawIndexedInstanced 2,435 / 2,726 2,779 / 6,026
PresentX 1,358 ok, 0 failed 1,465 ok, 0 failed
captures 23, all non-black 25, all non-black
indirect draws recorded / emitted / skipped 64 / 0 / 5,092 128 / 34 / 9,244 (#429 not included)

AI-assisted (Claude Code).

@QemmHD

QemmHD commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @Tyrannys, that's the second RTX 4070 SUPER: with host image copies off (auto from this PR) no WRITE_INVALID in either run, against your earlier loss with them on. That matches mine (on/off 11/11 vs 0/8 on the build that reproduces it). Two things in your table are worth their own threads: the three ScreenProbes compute programs at 30-32 minutes each (and the NVVM failure when built together), and the session cache that isn't written once a seeded cache is over the 4 GiB limit (#1886).

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

@QemmHD
QemmHD marked this pull request as draft November 25, 2026 19:00
@QemmHD

QemmHD commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

Moving this back to draft. New evidence on the RTX 4070 SUPER suggests the host-image-copy switch doesn't address the root cause of the world-start loss here: with copies off, the runs simply never reached the stage where the loss happens. So the 0-of-8 is not evidence of a fix. Please don't merge on the strength of my earlier counts. I'll follow up once the root cause is confirmed and a proper fix is tested.

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

@OreoFR

OreoFR commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Retail data from profile M (RTX 4070 Laptop 8 GB, NVIDIA 621.40, Windows 11). Merged onto main d1dff79 together with #2412, #2260, #2020, #2166 and #2418, it merged cleanly. The log line reads host image copy: off (LEONIDA_HOST_IMAGE_COPY=0); CPU texture copies use a staging submit with the switch, and off (auto: NVIDIA) without it. Four runs with host copies off and #2020, up to 815 s each: no device loss at all. Two were stopped by my memory guard, one by an unrelated hang (#2418), and one reached the world phase (more than 63k indirect draws). Host commit went up (37 GB private at peak in the world phase), so a small page file is not enough with this on. MEASURED (n=4). (Edited a minute after posting: the first version said the runs had compute-timeout losses; those were in other runs with host copies on.) AI-assisted (Claude Code, Claude Opus 5.5).

@MoonEyes

Copy link
Copy Markdown
Collaborator

A/B of this PR against main on one machine: same recipe, same pipeline cache folder, only the runtime executable changes (my recipe-diff tool reports exactly one difference). n=1 per side, indicative only.

Note for reviewers, from reading main ec91d69: LEONIDA_HOST_IMAGE_COPY is not read anywhere in runtime/; it appears only in a recipe in docs/running.md. On main, LEONIDA_HOST_IMAGE_COPY=0 therefore leaves it active when the driver offers VK_EXT_host_image_copy (it does here: no "no VK_EXT_host_image_copy" line in the main log). With this PR merged, the log says host image copy: off (LEONIDA_HOST_IMAGE_COPY=0), so the variable takes effect (that line is read from the log).

RUN w74 | 2026-11-27 | MoonEyes | AI-assisted: Claude Code (Claude Opus 5.5)
BASE:        main ec91d695c + PR #1851 (head 59c1586d4), merged locally without conflict | shaders: main's own translation, retranslated locally
COMPARED TO: RUN w71 = main ec91d695c alone, same recipe, same cache folder
MACHINE:     RTX 4060 8 GB, desktop, only GPU, display attached | NVIDIA 610.88 | Windows 11 Pro 26300 | Ryzen 5 3600 | 32 GB
RECIPE:      docs/running.md Windows NVIDIA recipe + Proton NVIDIA list, with LEONIDA_HOST_IMAGE_COPY=0 as in that recipe | scripted button presses every 10 s from 150 s
DEVIATIONS:  Windows GPU timeout at the default (2 s); ASYNC_MIN_BYTES and COMPILE_GATE at main's defaults
CACHES:      pipeline cache warm, same folder as w71 (not snapshotted between the two runs) | RUN 1 of 1 for this build
INSTRUMENTS: device fault report 1, device markers 1, memory probe 5, overlay, stall checkpoints, capture every 300 s
MEASURED (w74 | w71 main):
  world entered                  190 s | 185 s
  last window >= 1 img/s         281 s | 267 s
  frames after world entry+240 s 0 | 0
  PresentX ok / failed           2962 / 0 | 3112 / 0
  private RAM max                21.3 GB | 17.6 GB (+3.6 GB)
  free RAM min                   16 MB | 2800 MB
END:         stopped by my local stall guard (w74: no submit-phases line for 63 s, last at 301 s; w71: 183 s, last at 267 s; the two thresholds differ, so compare the last-window figure, not the end time) | device loss: no, either run
VERDICT:     display stop unchanged; memory use higher in the PR run (n=1)

Reading (marked):

  • MEASURED: the stop is the same on both sides (last window >= 1 img/s at 281 s against 267 s, 14 s apart). Four runs of main on this machine (two recipes, cold and warm cache) enter the world at 185-200 s and have their last window >= 1 img/s at 267-293 s; the only same-recipe repeat differs by 5 s and 7 s. One run per side, so this is not conclusive.
  • MEASURED: +3.6 GB of private RAM and a free-RAM floor of 16 MB (2800 MB on main). The machine was close to running out of RAM in this run.
  • NOT INVESTIGATED: the cause of the extra RAM. I make no claim about it.
  • This does not say the PR is wrong in itself; it says that in this setup it does not change the stop and it was accompanied by +3.6 GB of private RAM in this one run. One run per side.

AI-assisted (Claude Code, Claude Opus 5.5)

@aslan2142
aslan2142 merged commit 6014cb1 into main Nov 27, 2026
5 of 12 checks passed
aslan2142 added a commit that referenced this pull request Nov 27, 2026
d3d12: merge bundle of eight open runtime PRs, conflicts fixed (#2020 #2166 #1851 #2465 #1705 #2117 #2012 #407)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants