fix(render3d): three leaks in Vulkan play - sampler keys, mip blits, a program per actor
- gvk_sampler built a key string on every call it was reached (a texture read two ways in turn misses its per-texture cache each time); samplers are found by their seven numbers instead - gvk_tex_mips_into allocated a VkImageBlit per level, every frame (the exposure measure's chain); it comes from the scratch ring, as does gvk_tex_grow_mips's copy - gvk_program_new made a new program - modules, pipelines - on every call, and every actor asks for one; a variant is now made once and shared (a program is immutable), and one that cannot be made stays 0 for every later asker Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9a4137e9da
commit
6ee496ab1c
3 changed files with 29 additions and 11 deletions
|
|
@ -354,7 +354,7 @@ export state Render3dState {
|
|||
gvk_unpack_swap: bool = false # GL_UNPACK_SWAP_BYTES: 16-bit PNG samples arrive big-endian
|
||||
gvk_st_buf: long = 0
|
||||
gvk_st_mem: long = 0
|
||||
gvk_smp_keys: []string = null
|
||||
gvk_smp_keys: []int = null # 7 numbers per sampler: filters, wraps, compare, anisotropy, bias
|
||||
gvk_smp: []long = null
|
||||
gvk_buf: []long = null
|
||||
gvk_buf_mem: []long = null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue