Device hung on AMD: the GPU reads retired textures after the registry released them; --placed-textures avoids it #23
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#23
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@Sr-0w on GitHub · 2026-11-25 07:11 UTC · original
On an RX 7800 XT the device hangs (DXGI_ERROR_DEVICE_HUNG) 3 to 8 minutes into the opening cutscene. DRED puts the page fault in a retired texture that
GpuTextureRegistryreleased after its grace period. With--placed-texturesthe same boot ran past 10,000 presents without a device removal.Setup: RX 7800 XT (16 GB), Adrenalin 32.0.32029.2010, 64 GB RAM, Windows 11 26300.
mainat72b7328plus #20 and #21. Run with--d3d12-dred --sample-threads 30.What DRED says
A local change named every retired texture
fs-retired-<console address>at retirement (ID3D12Object::SetName). Every device removal looked the same: reason 0x887a0006, then a page fault on a recently freed retired texture.--placed-texturesCreatePipelineState(amdxc), not a device removalAt removal the queues were only about 0.15 s behind, so the GPU was not running 120 presents late.
What I tried that did not fix it
The registry releases a retired texture once its grace period ends, whatever still names it.
docs/gpu-resources.mdlists this as a limit that had not been seen ("the game rewrites its views when it reuses memory").I tried counting, per texture, the desktop descriptors that hold a view of it, and releasing a retired texture only once that count was zero. The count covered:
It did not stop the faults. The textures DRED named had all been viewed (1 to 4 times), and every one of those descriptors had been written over by a later slot-70 write to the same handle before the texture was retired. So whatever the GPU reads them through is not a desktop descriptor the loader writes. I could not find that path.
Why placed textures avoid it
With
--placed-textures, a released read-only texture gives its range back to a 256 MB heap that stays alive. A stale read then hits mapped memory, as it would on the console, where a descriptor names memory rather than an object. Without it, the committed resource is freed and its VA unmapped, and the GPU page-faults. GPU-written textures are still committed in both modes. One of the textures above was a GPU-written target, but no removal happened with placed textures.Questions
--placed-texturesis off by default? On this machine it is what keeps the opening cutscene running.I can share the logs or the diagnostic patch.
@ThatRecompDev on GitHub · 2026-11-25 08:10 UTC · original
thanks, this was the key finding. placed textures are now the default on main (
--committed-texturesturns them off). with them our 4090 went from losing the device at ~185 s to running 1,000+ s into the prologue's gameplay. we think the GPU reaches those textures through descriptor bytes the game keeps or copies itself, with an index we'd reused, which is why tracking our own descriptors didn't catch it. there are still hangs, but the one we've pinned down so far is in a mesh shader (skinned linear depth), not textures@ThatRecompDev on GitHub · 2026-11-25 11:42 UTC · original
closing this one since placed textures have been the default for a day now and your later boots (#27) get past where this used to bite. if you see a device hang on AMD that
--committed-textureschanges, feel free to reopen