VRAM: allocate the projector shadow atlas (and sun cascades) only when shadow maps are actually used -- ~320 MB back for ray-traced shadows #600
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#600
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?
Shadow maps are allocated at startup whether or not they're used. With ray-traced shadows active they're unused memory, so ray tracing only ever adds VRAM instead of replacing the shadow-map cost.
Measured (4K, RTX 5090, RT sun + projector shadows on):
vramPick,initProjShadowsinllcleanrenderervk.cpp). Unused while projector shadows are ray traced.On an 8 GB card the startup pick sees an empty card, so it takes the full 1024-cell atlas; that's ~320 MB of an often 5-6 GB OS budget, wasted while RT is on (see #595 / #597 / #599 for 6-8 GB cards hitting the wall).
Do:
Expected win: ~320 MB back for every RT user (more than the RT shadow mask itself at 1440p), plus up to ~96 MB from cascades.
Part of #282 (8 GB fit).
808bb1cdd4: the projector shadow atlas is allocated only while projectors are shadow-mapped (sized against the current budget, soft-fail) and freed after 45 s unused; the sun cascades drop to 512 while the sun is ray traced. Verified: with RT the atlas is never allocated (shadow VRAM 6 MB, was ~416 MB); switching projectors to shadow maps allocated it (320 MB, 17 ms one-time hitch). Lands in 1.2.0 Beta 8.Verified end to end: switching projectors back to ray traced freed the atlas after the grace period ("projector shadow atlas FREED ... 320 MB"), shadow VRAM back to 6 MB. Lands in 1.2.0 Beta 8.