Skip to main content

Module gpu

Module gpu 

Source
Expand description

Thin helpers over Godot’s main RenderingDevice.

Every function here must run on the render thread (the buffer RIDs we touch belong to the global device) — callers go through RenderingServer::call_on_render_thread, CEL-58 style.

Modules§

chunk_gpu
All RD resources for one chunk multimesh: the ChunkRealize compute pipeline + the shared vertex pool (positions buffer + attribute texture) + the descriptor/params buffers + uniform set + an indirect MultiMesh. Render-thread only. The chunk realize is a single vertex pass: it reads chunks/params and writes the vertex pool — it does NOT bind the multimesh, so the compute path is multimesh-independent.
device
Pipeline / buffer / texture creation helpers (render-thread only).
owned
RAII ownership of Godot RenderingDevice RIDs (CEL-91).

Constants§

ATTR_TEX_WIDTH
Width (texels) of the GPU attribute/atlas textures: chunk vertex pools and per-chunk detail atlases are 1-D runs wrapped at this width. Shaders read it as attr_w to recover 2-D texel coords from a linear index.