gpu

module cpu::interpretersource

Runs the SPIR-V the shader compiler writes, one invocation at a time, for the CPU device. The module is decoded once: every instruction into an Op, every result id given fixed cells (32-bit words) in a register file, every variable fixed cells in memory, composites flattened, since shaders do not recurse. A pointer is three cells: its space (memory, a buffer, a texture or sampler handle), the buffer or handle's index, and the offset, in cells in memory and in bytes in buffers, where values are laid out by their decorations. The ops are then compiled into steps naming registers, types' sizes and branches' targets found, which a run goes through reading nothing else.