render3d: free a texture's create infos and the .dds path it looked for; steady's model at 0
gvk_tex_storage freed none of ici, out, req and vci (8 blocks a two-texture model); tex_load_ex kept dds_path_of's string. Found with malloc_history over 400 load/release rounds (712 bytes a round, all of it these). steady: the model's bound is 4 KB over 200 (was 1.6 MB), and the frame is the least of three settled windows - a valley self-test beside it read 87 KB once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
328dee77c8
commit
1adce5b58b
4 changed files with 43 additions and 14 deletions
|
|
@ -267,12 +267,14 @@ function tex_load_ex(render3d_st: mut Render3dState, path: pointer, srgb: bool,
|
|||
# (not for a cut-out atlas: its edge padding is made here, from the .png)
|
||||
if render3d_st.gvk_has_bc and dilate == 0 {
|
||||
let dds = dds_path_of(path)
|
||||
if len(dds) > 0 and Fs.exists(dds) {
|
||||
let t = tex_load_dds(render3d_st, dds, srgb)
|
||||
if t != 0 {
|
||||
tex_note_size(render3d_st, t)
|
||||
return t
|
||||
}
|
||||
var t = 0
|
||||
if len(dds) > 0 {
|
||||
if Fs.exists(dds) { t = tex_load_dds(render3d_st, dds, srgb) }
|
||||
free(dds) # made for this question ("" is a literal)
|
||||
}
|
||||
if t != 0 {
|
||||
tex_note_size(render3d_st, t)
|
||||
return t
|
||||
}
|
||||
}
|
||||
let px = png_decode(render3d_st, path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue