render3d: frame keeps 32 to 16 - tables and queues sized at start-up, the rest declared; birth leaks freed
The texture and framebuffer tables grow to 4096/1024 and gvk_prime's queue is made in gvk_startup_state; gpu_unit_2d's and the actor lists' lazy starts go. @alloc_ok on layer_room (a layer outgrowing its cap), overlay_init, gvk_read_screen, gvk_hdr_metadata (a settings change), DLSS's gsl_struct/gsl_fn, an actor's part tables (given back by actor_release) and the pool's fallback. Birth leaks freed: gpu_caps_probe's create structs, gpu_caps_fake's text, gvk_note's line, gvk_layout_key's table and each key it grew from, ov_text_wrap's slices, the default sky path. (ludic deps --births still lists freed sites: its walk does not see free().) Compiled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
6fb5118afd
commit
46000362ba
9 changed files with 60 additions and 20 deletions
|
|
@ -761,14 +761,7 @@ function gvk_buf_reserve(render3d_st: mut Render3dState, b: int, n: int) -> bool
|
|||
# read once (4 bytes, copied out) at the start of the next frame's commands instead.
|
||||
const GVK_PRIME_MAX: int = 16384
|
||||
function gvk_prime(render3d_st: mut Render3dState, b: int, buf: long) -> void {
|
||||
if Os.platform() != "macos" { return }
|
||||
if render3d_st.gvk_prime_b == null {
|
||||
render3d_st.gvk_prime_b = words(GVK_PRIME_MAX)
|
||||
render3d_st.gvk_prime_h = new []long
|
||||
let hs = render3d_st.gvk_prime_h
|
||||
let none: long = 0
|
||||
for i in 0 .. GVK_PRIME_MAX { push(hs, none) }
|
||||
}
|
||||
if Os.platform() != "macos" or render3d_st.gvk_prime_b == null { return } # before start-up: its first draw makes it
|
||||
if render3d_st.gvk_prime_n >= GVK_PRIME_MAX { return }
|
||||
render3d_st.gvk_prime_b[render3d_st.gvk_prime_n] = b
|
||||
render3d_st.gvk_prime_h[render3d_st.gvk_prime_n] = buf
|
||||
|
|
@ -839,3 +832,12 @@ function gvk_say_no_conversion(bin: int, bout: int) -> void { print(`r3d: vulkan
|
|||
function gvk_say_no_readback(ifmt: int, fmt: int, ty: int) -> void { print(`r3d: vulkan: no read-back conversion for GL format {ifmt} as {fmt}/{ty}`) }
|
||||
@alloc_ok("a message, built only when it is said: a failure, a warning or a debug switch")
|
||||
function gvk_fail_create_buffer(render3d_st: mut Render3dState, size: int, r: int) -> bool { return gvk_fail(render3d_st, `vkCreateBuffer ({size} bytes)`, r) }
|
||||
|
||||
# gvk_prime's queue: GVK_PRIME_MAX buffers and their handles, made with the device
|
||||
function gvk_prime_tables(render3d_st: mut Render3dState) -> void {
|
||||
render3d_st.gvk_prime_b = words(GVK_PRIME_MAX)
|
||||
render3d_st.gvk_prime_h = new []long
|
||||
let hs = render3d_st.gvk_prime_h
|
||||
let none: long = 0
|
||||
for i in 0 .. GVK_PRIME_MAX { push(hs, none) }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue