Deferred lighting: split by feature (64-register base pass + local-lights pass + reflection pass) #827
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#827
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?
Deferred lighting is the largest pass on Pascal and is register-bound, not ALU- or bandwidth-bound.
Measured (GTX 1080, 4K, today's build):
g_defer_light7.0 ms at high settings and 4.9 ms at Firestorm-equivalent; the split shadow + reflection pass (g_defer_sr) is another 2.1 ms at high. Registers: split combine 116-126, uber kernel 128. The memory controller runs at ~36% on the 1080 and ~15% on a 5090, so there is bandwidth to spare.Register probes (
RenderVKLightRegProbe, same specialisation constants as production):The local-light loop and the reflection code (probe walk / SSR) each pin the kernel at 128 registers for every pixel, including pixels with no local light and no reflection contribution.
Plan: split by feature
RenderVKLightCulling); tiles with zero lights are skipped entirely (indirect dispatch over non-empty tiles), additive onto the base result.Intermediate results go through VRAM (trading bandwidth for occupancy). Output must match the current image (A/B snapshot diff); keep the old kernels behind a setting for A/B.
Measure
Registers per new kernel (
RenderVKPipelineStats), then a serial A/B on the GTX 1080 (Firestorm-equivalent and high) and the RTX 5090, in the same scene. Expected 2-3 ms at high on Pascal, 1.5-2 ms at Firestorm-equivalent.Merged into vulkan-port-tb (
4b0d7a92bd+ merge4475c3ef04). Replaces the split path's combine with tile classify + BASE (all non-local terms) + LOCAL (indirect over lit tiles only). Reflections stay in BASE: they sit inside nonlinear steps, so they can't be added afterwards.Registers (GTX 1080): BASE 72, LOCAL 114-115 (80 in one spec variant), classify 48; the old combine is 116-127.
GTX 1080, 4K, interleaved on/off within each session (same scene):
Image: a snapshot diff of on vs off is at the animated-scene noise floor (mean 2.8-2.9 vs 2.0-2.9 for same-setting pairs), with differences only on moving avatars / particles / water.
Follow-up seen: classify costs 0.8-1.2 ms (light grid build + lit-guard scan), which is the next thing to slim.
Still to do: a validation-layer run; live toggle cycling; the async-deferred path on the 5090.
Fixed in Slipstream 1.3.0 (stable): https://git.slipstreamviewer.org/sky_line/Slipstream/releases/tag/v1.3.0
If you still see this on 1.3.0, reply here and we'll reopen it.