render3d: the uniform ring is 16 MB a half and grows when a frame outgrows it; streamed layers are sized for the fog's reach
The ring held 2 x 64 MB of host memory for a frame that uses 3 MB at most (2761 draws at the overlook, 1.7 MB in town): it starts at 16 MB a half, and a frame that ever runs out grows it for the frames after (gvk_ring_grow, making the kept sets again; R3D_RING_KB=<n> starts small to watch it). -95 MB at every fog level, off included. A streamed layer's arrays and its stream's arena are made for the reach a fog wall leaves (twice its area's share, at least 4096 instances) and emptied to refill within the frame budget (fog_streams.ludic). The near streams' reach is already inside most walls, so it is -9 MB at 30 m. R3D_VKMEM adds the ring's high-water mark, the largest buffers and the streamed layers' share. Footprint at the overlook: 2008 MB off (2108 before this phase), 1748 MB at 175 m, 1682 MB at 30 m. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
4d485a1778
commit
f8c81e4066
7 changed files with 136 additions and 4 deletions
|
|
@ -198,6 +198,9 @@ export state Render3dState {
|
|||
gvk_al_map: []pointer = null
|
||||
gvk_al_tag: []int = null # per allocation id: owner * 4 + image * 2 + host (vkmem_report.ludic)
|
||||
gvk_tag: int = 0 # the owner allocations are made for now (VKM_*)
|
||||
gvk_ring_half: int = 0 # the ring half a frame writes, once it has had to grow (gvk_ring_grow)
|
||||
gvk_ring_full: bool = false # a frame ran out of ring: grow it at the next reset
|
||||
gvk_ring_peak: int = 0 # the most of a ring half a frame has used (R3D_VKMEM)
|
||||
vkmem_at: int = 0 # R3D_VKMEM=<frame>: the report is printed at that frame
|
||||
sh_layers: int = 5 # the shadow array's layers: the cascades the fog wall needs (shadow_fog)
|
||||
fog_imp_released: int = 0 # impostor atlases let go under a fog wall (fog_impostors.ludic)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue