render3d: 671 frame-reachable allocation sites to 161 - declared, split, or made nothing
@alloc_ok with its reason on what is made once per resource and kept (textures, programs, samplers, views, layouts, memory blocks, the pipeline cache in gvk_pipe_build), on resize and swapchain remakes, on screenshots and dumps, on a world being set up (streams, layers, water, post, bakes), on loads (gltf_load, skin_load, tex_load*, png_decode, fonts) and on R3D_PROF / drawstats. gltf_cached's hit path is its own and makes nothing; the miss (gltf_cached_load) is declared. m4_look_at (now over m4_look_at_xyz) and m4_inverse work on scalars, and cam_update makes no scratch. Left: lazy first-use starts, error and debug prints, and scratch made and freed each call (churn, plan 25.3). Compiled (steady, and ludic deps over the game). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f2dd27f443
commit
5d0f83b81c
21 changed files with 118 additions and 42 deletions
|
|
@ -196,6 +196,7 @@ function wb_wet(render3d_st: mut Render3dState, x: float, z: float, off: float)
|
|||
# walk of every rectangle, every frame. The body beyond the map (a sea runs far past it) is 64 x 64
|
||||
# coarse rectangles tested at their centre, in one last block, which only ever matter kilometres away.
|
||||
const WB_BLOCK: int = 8
|
||||
@alloc_ok("a world being set up (a stream, a layer, water, post, a bake): the map loading or swapping, not a frame")
|
||||
function water_cells_build(render3d_st: mut Render3dState) -> void {
|
||||
let bx0 = render3d_st.water_cx - render3d_st.water_ex; let bx1 = render3d_st.water_cx + render3d_st.water_ex
|
||||
let bz0 = render3d_st.water_cz - render3d_st.water_ez; let bz1 = render3d_st.water_cz + render3d_st.water_ez
|
||||
|
|
@ -256,6 +257,7 @@ function water_cells_build(render3d_st: mut Render3dState) -> void {
|
|||
}
|
||||
|
||||
# the program and the plane are the process's, built once; the bodies are the map's
|
||||
@alloc_ok("a world being set up (a stream, a layer, water, post, a bake): the map loading or swapping, not a frame")
|
||||
function water_setup(render3d_st: mut Render3dState) -> void {
|
||||
if render3d_st.water_prog != 0 { return }
|
||||
render3d_st.water_mesh = mesh_grid(render3d_st, 2, 0.5)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue