Loader: a texture fill the desktop refuses fails without an exception #15
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ThatRecompDev--five-star-recomp!15
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/15/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@marquezinii on GitHub · 2026-11-24 21:49 UTC · original
marquezinii:loader/texture-upload-oom→main· +129 −26 · 5 files · 1 commits · merged 2026-11-24 22:08 UTCFixes the boot crash in #13: on a 16 GB machine the process ended with 0xE0434352, with no error logged, right after the first texture was filled from memory.
Cause.
GpuTextureUploadermakes its upload buffer with Vortice'sCreateCommittedResource, and Vortice throws when that fails. The upload buffer is system memory, the GPU's non-local segment. The heaps over the game's XMem sections take from the same budget, and the address map opens one over the section of every mapped page. On the 16 GB machine in #13 that left nothing for the upload buffer, soE_OUTOFMEMORYwas thrown on the game's thread inside slot 133 (or slot 70), and the process ended. TheOpenExistingHeapFromAddress ... 0x8007000ewarnings just before it are the same budget running out.The non-local budget is half of physical memory:
QueryVideoMemoryInforeports 16.3 GB on this 32 GB machine with an RTX 5070. On the 15.6 GB machine in #13 that is about 7.8 GB, so what runs out is the machine's RAM, not the 3060's 12 GB.Change.
UploadFailedis counted in the texture counters line, and the first eight failures are logged with the reason.Test.
A_texture_whose_upload_buffer_the_desktop_refuses_is_left_unfilled_and_filled_latermakes the staging factory throwE_OUTOFMEMORYand places a texture through slot 133. Slot 133 succeeds and oneUploadFailedis counted. With the factory restored, the slot-70 view fills the texture with the right texels.SharpGenException: HRESULT: [0x8007000E] E_OUTOFMEMORYescaping slot 133.This only stops the crash. Pages in a section window whose heap failed still read as zeros on the GPU, so a 16 GB machine will likely reach the later fault that
68b6d06showed at the story load. I put the details on #13.@ThatRecompDev on GitHub · 2026-11-24 22:08 UTC · original
merged, thanks! nice catch on the non-local budget being half of RAM, that explains a lot about #13. the windows CI fail was a rounding thing in an unrelated test (0.5 clear color, WARP rounds it the other way), fixed on main now