GPU: defer live title-slot views of newly-allocated resources until earlier submissions finish (fixes RADV GPUVM faults) #1031
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1033"
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?
Imported from fxceless/victory-fork. Originally posted by UwUCammie on 2026-11-25T16:49:28Z.
With
VICTORY_LATE_WAIT/VICTORY_RELAYenabled on Linux AMD (RADV +amdgpu), recording threads can allocate a new host texture/buffer and immediately write its descriptor into a live title slot (0..self.count) ofVK_EXT_descriptor_heapwhile an earlier submission is still executing on the card. Onamdgpu,AMDGPU_VA_OP_MAPisn't flushed into GPU page tables until the nextamdgpu_cs_ioctl, so the in-flight submission can sample the newly-written slot and hit an unmapped GPU VA (TCP (0x8) PERMISSION_FAULTS: 0x3 RW: 0x0a few ms after BO creation inRADV_DEBUG=bo_history), leading to aring gfx_0.0.0timeout andDXGI_ERROR_DEVICE_REMOVED.What changed
born_after = host::started()(the submission serial already in flight when the resource was created).HostHeap::mirror_as), ifborn_after > host::finished(), leave the live slot untouched and queue the update indeferred_views.born_after <= host::finished()) as submissions complete, and mark draws binding a title slot directly through a non-fresh table (mirror_required) so a submission that actually needs the new view settles first.VICTORY_DEFER_NEW_VIEWS=0restores immediate writes.Tested
VKD3D_CONFIG=descriptor_heap) + RADV,RADV_DEBUG=bo_history+journalctl -k.TCP (0x8) PERMISSION_FAULTSright after VRAM sweeps / texture streaming bursts onVICTORY_LATE_WAIT=3.540 s+540 s+480 s, up to frame 4200, deferring and publishing new-resource views across ~144 log intervals per run) with 0 GPUVM faults and 0 device removals.diag+victory-gputests) on465b94f.Imported from fxceless/victory-fork. Originally posted by UwUCammie on 2026-11-25T16:59:32Z.
Follow-up test with
VICTORY_RELAY=2+VICTORY_BACK_OWN_VIEW=1enabled (which used to reliably trigger theTCP (0x8)GPUVM fault on RADV under Wine): ran a full 480 s gameplay pass to frame 4600 on RX 7900 XT with 203 deferred/published view batches (up to 130 views deferred in a single streaming burst), 0 kernel GPUVM faults, 0 device removals, and median frame time dropped to 136–139 ms (~7.2 fps, 109 ms shortest).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.