ReSTIR emissive build: whole-grid gather costs ~7 ms/frame when far emitters overflow the pairs cap (camera high above an emissive build) #1108
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#1108
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: with the camera high above a large emissive build (about 3 km above an all-emissive race track, draw distance at max), the ReSTIR emissive light-grid build costs about 7 ms every frame. The deferred chain on the async queue grows from about 5 ms to about 12 ms, and the graphics queue waits on all of it.
Measured (GPU timers, 5 s averages, RTX 5090):
c_rs_emissive(mode 7, cell population)c_rs_em_long(mode 9, long cells)c_rs_em_select(mode 11)q_defer_lightNsight GPU Trace of the mode 7 dispatch: 2.0 warps per SM on average (4% occupancy), SM throughput 9%, RT core 0%, active threads per warp 13.8 of 32. The stalls are shared-memory loads and SFU work: a few long workgroups each loop serially over emitters, with a long tail.
Why: the light grid is centred on the camera (4 levels, outermost about +-128 m across). From far above, every cell is empty air and every emitter is about equally far from every cell, so distance rules nothing out. Every emitter becomes a candidate for every cell, the pairs cap overflows, mode 5 flags a whole-grid gather (bypassing the cell lists and select; that's why modes 9 and 11 drop to near zero), and mode 7 loops each cell over every emitter record. None of it reaches the picture: the emitters are far outside the grid, and their contribution at the grid is negligible.
Fix:
Test: hover about 3 km above a large emissive build with max draw distance and GPU timers on (
RenderVKGpuTimers 1).c_rs_emissiveshould stay near its ground-level cost; emissive lighting near emitters at ground level must be unchanged.