hal/vulkan/spir-v/module.lisp
A durable OpExtInstImport: one named instruction set the module uses. Extended operations reference its result id, so repeated operators in one module share a single import.
Lower one structured shader object to a list of instruction instances.
SPIR-V logical layout: extensions and extended-instruction imports sit between the capabilities and the memory model.
Lower structured module and assemble its linear instruction stream.
Make a structured compute shader which writes an XY gradient to RGBA8.
Assemble the structured RGBA8 gradient compute shader.
(forms &key (version #x00010000) (generator 0))Assemble surface FORMS or instruction occurrences into SPIR-V words. This assembler intentionally recognizes only the vocabulary declared in instruction classes and *ENUMERANTS*. Result symbols may be referenced before their definitions.
A durable OpExtInstImport: one named instruction set the module uses. Extended operations reference its result id, so repeated operators in one module share a single import.
(object)Lower one structured shader object to a list of instruction instances.
(objects)(form)One top-level defining form of a source file.
(module)(&key (width 640) (height 480))Logical conjunction of tests and raw truth values.
Division of two represented quantities.
(&key (width 640) (height 480))
Structured shader IR above the deliberately literal SPIR-V assembler.
instructions.lisp is the small instruction vocabulary and binary encoder. This file gives shaders enough shape to be pleasant live Lisp objects: modules contain functions, functions contain basic blocks, and lowering erases that structure into the linear instruction stream expected by
assemble.