render3d: start-up declared, ov_nine and the caster test on buffers made once - 362 frame sites to 122

The renderer starts itself from the first frame (gpu_select), so the device, its tables, the
manifest and programs, grass, shadows, sky, terrain textures and the actor pool read as frame
allocations: each is @alloc_ok as start-up, with gvk_fail (a failure) and the actor census and
texture dump (debug switches). ov_nine's four corner/uv arrays are one floats(16) made in
gvk_startup_state; ac_in_light's four points are made there too. Compiled (steady, and ludic deps
over main 4316ff97).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 16:21:51 +03:00
parent 8dfcccad41
commit 9f233104a3
17 changed files with 37 additions and 8 deletions

View file

@ -321,6 +321,7 @@ function tex_solid(render3d_st: mut Render3dState, r: int, g: int, b: int, a: in
# ---- Radiance .hdr (RGBE, new-style RLE) -> RGB float bits -------------------------
@alloc_ok("start-up: the device, its tables, the programs, the passes and the world's first textures are made once, before play")
function hdr_decode(render3d_st: mut Render3dState, path: pointer) -> floats {
let d = r3d_read_file(render3d_st, path)
if d == null { print(`hdr: cannot read {path}`); return null }
@ -437,6 +438,7 @@ function tex_target(render3d_st: mut Render3dState, w: int, h: int, ifmt: int, f
}
# Debug: the brightest texel of an RGBA float texture and where it is.
@alloc_ok("a debug census and dumps, only under their switches")
function tex_max(render3d_st: mut Render3dState, tex: int, w: int, h: int, tag: pointer) -> void {
let buf = floats(w * h * 4)
gpu_tex_bind(render3d_st, GPU_TEX2D, tex)