wip(render3d): one frame recording while one draws on Vulkan (double-buffered ring and pools), R3D_VK_LABELS, grass measuring switches (R3D_NOGRASS, R3D_BLADES, R3D_GRASS_S0/D0)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-27 14:32:01 +03:00
parent 4e2087d6eb
commit f815f3e3cf
8 changed files with 100 additions and 19 deletions

View file

@ -191,7 +191,13 @@ export state Render3dState {
gvk_frame_fence: bytes = null # the presented frame still on the GPU (one frame in flight)
gvk_frame_pending: bool = false
gvk_frame_pending_cb: pointer = null
gvk_inflight: int = -1 # -1 until asked: 1 leaves the presented frame in flight
gvk_frame_pending_no: int = -1 # which frame it is (gvk_frame_no when it was submitted)
gvk_dpools: []long = null # a descriptor pool per frame slot (frame_no & 1)
gvk_ring_end: int = 0 # the end of this frame's half of the ring
gvk_retired_frame: []int = null # the last frame that read each retired buffer
gvk_labels: bool = false # R3D_VK_LABELS: each profiled pass is a debug label (Metal System Trace)
gvk_inflight: int = -1
gvk_label_depth: int = 0 # -1 until asked: 1 leaves the presented frame in flight
gvk_has_hqr: bool = false
gvk_ts_period: float = 0.0 # float bits: nanoseconds per timestamp tick
gvk_qpool: long = 0
@ -582,6 +588,8 @@ export state Render3dState {
sc_cast_dy: float = 0.0
sc_cast_k: float = 0.0
sc_skip_blade: bool = false
sc_skip_grass: bool = false
grass_force: bool = false # R3D_BLADES: the blades on whatever the game set
sc_skip_card: bool = false
cb_state: int = 12345
shadow_res: int = 2048