module pkg::alloy::gpu::metal::metalsource
The Metal device (PLAN.md, F7b), on macOS: Metal's objects
through Objective-C messages (pkg::alloy::objc). Shaders are the MSL
#shader wrote (shader/msl.alloy), compiled when made; each stage
binds its resources at the Metal indices metal_index gives, and its
vertex buffers after them. Buffers and textures live in the GPU's
private memory: writes wait until the next submission copies them in
from a shared staging buffer with a blit, and reads copy out into a
shared buffer the device waits on. Metal tracks what each
command buffer uses, so objects are released at once. A window's
surface is a CAMetalLayer as its view's layer, each frame one of its
drawables. Clip space keeps y up, as WebGPU's.