Per-frame constants: storage buffers -> uniform buffers #814
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#814
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?
Every per-frame constant block is a readonly storage buffer (frame info ~4.5 KB, light info, probe header, draw views). On NVIDIA a uniform-index storage-buffer read is a per-lane global load into a register; a uniform-buffer read is a constant-bank operand with no register and no latency (Pascal has no other uniform path). The blocks are vec4 / mat4 arrays, so the std140 layout is byte-identical and well under 64 KB: no image change. Expected: fewer registers in the 126-128-register lighting kernels and every other shader reading frame constants; helps all NVIDIA generations.
Measure: register counts (pipeline stats) of the lighting kernels / G-buffer / lit alpha before and after; shader-clock ATMOS and LOCAL stages.
Context: measured on a GTX 1080 (Pascal) at 4K with the test-control channel and the shader clock (RenderVKShaderClockLighting) / pipeline stats (RenderVKPipelineStats). The frame is GPU-bound but not bandwidth-bound (memory controller ~36% busy on the 1080, ~14% on a 5090): it is latency / occupancy bound, so trading a little memory traffic for fewer registers and fewer dependent loads should help every GPU generation.
Merged with #815 and #816 (
ada2bb088a,454fd3ecc0,9be87d4e98). GTX 1080, 4K, old vs new build A/B/A/B: Firestorm-equivalent 17.0 -> 15.1 ms, high 37.0 -> 32.6-33.9 ms (~30 FPS), with RenderVKLightStage off (staging measured +0.3-0.8 ms, now default off). Split combine 121-127 -> 116-126 registers; uber still 128 (local lights + reflections hold it). Remaining before close: image A/B, validation layers on the new UBO bindings, ship.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.