DEVICE_LOST (Xid 31) switching split deferred lighting off live: intermediates freed mid-recording, set 0 / set 3 keep their views #809
Labels
No labels
amd
avatars
bug
builder
cannot-reproduce
crash
epic
feature
from-viewer
gl-removal
known-limitation
monitoring
parity
perf
platform
priority
critical
priority
high
priority
low
priority
medium
provenance
rendering
rt
status
in-progress
status
testing
status
up-next
triage
ui
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sky_line/Slipstream#809
Loading…
Add table
Add a link
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?
Symptom: switching
RenderVKDeferredSplitfrom 1 to 0 in a running session (deferred lighting on) loses the GPU within 1–3 frames, every time. Seen on a GTX 1080 with NVIDIA 580 on Linux at 3840×2062. The kernel log showsNVRM: Xid 31 ... MMU Fault: ENGINE GRAPHICS GPC0 GPCCLIENT_T1_x ... FAULT_PDE ACCESS_TYPE_READ, meaning the texture unit read unmapped memory. The breadcrumbs end atg_p2_barrier(right after deferred lighting, before pass 2). The log showsVKDeferSplit: intermediates freed (split lighting off)just before the loss.An offscreen snapshot taken after the switch hits the same fault. With split lighting off from login, so the intermediates are never created, snapshots and rendering are fine.
What's established
deferSplitFrame(vkDeviceWaitIdle+destroyDeferSplitTargets) runs insiderecordWorld, after the frame's command buffer has begun.ensureDeferSplitTargetswrites set 3 and draw set 0 bindings 41–43 (visibility reuse) under the open command buffer. Set 0 is PARTIALLY_BOUND, not UPDATE_AFTER_BIND, andresizeProbesIfNeeded(#521) documents that this is invalid. On free, nothing rewrites set 0's bindings 41–43 or set 3, so bound sets keep views of destroyed images.RenderVKResizeNoStall 0still crashes.RenderVKDeferVisReuse 0before enabling split still crashes (bindings 41/42 still point at the sun / projector images).pad0visibility-reuse flags. Cluster draws store their view index inpad0, so an odd index read asVISR_ON, which is a separate wrong-visibility bug while split lighting runs.RenderVKDebugDescriptorTrackingreported 0 stale binds, so it doesn't cover these bindings.Likely fix, the established pattern
resizeProbesIfNeededdoes.VISR_*flags inpad0, because of the cluster view index collision;destroyDeferSplitTargetswhen called mid-frame.Impact: players who change the split lighting setting in-world can crash. It also blocks making single-pass ("uber") lighting the default on Pascal-class cards, which measured about −1.4 ms at 4K on a GTX 1080 at Firestorm-equivalent settings.
Repro: at 4K, live
RenderVKDeferredSplit1 → 0. To check a fix, repeat 1 → 0 → 1 three times, with an offscreen snapshot after each 0.Fixed in 1.4.1 (
3a0437bffe). Reopen if you still see it.