hal/webgpu/wgsl/lowering.lisp
The WebGPU target policy for one lowering.
OVERRIDES is an ordered list of shader source-value symbols which should stay pipeline-overridable instead of becoming their already checked literal defaults. Other source values retain the native folded-literal semantics.
One scalar WGSL override retained with its Lisp source identity.
Spell name as a deterministic non-reserved WGSL identifier.
WGSL has no conditional expression. select is valid here because shader
expressions are pure; ordered effects live in shader statements.
The shared camera graph intentionally retains Vulkan's framebuffer-oriented clip Y. WebGPU owns this conversion.
Lower the shared shader graph directly to deterministic WGSL.
The WebGPU target policy for one lowering. OVERRIDES is an ordered list of shader source-value symbols which should stay pipeline-overridable instead of becoming their already checked literal defaults. Other source values retain the native folded-literal semantics.
One scalar WGSL override retained with its Lisp source identity.
Headings, paragraphs, figures and their IDs, mentions, marks.
PROPERTY: VALUES; -- the property a keyword, the values a list written space-separated.
(name)Logical disjunction of tests and raw truth values.
(name suffix)(type &optional source-form)(designator &optional source-form)(value)(context expression text)A MuPDF context: its allocator, its store, and its error stack.
(occurrence)(context)(context name)(context expression)(expression)Test whether two compatible scalars are equal.
(literal)(context expression)Logical conjunction of tests and raw truth values.
(reference)A lexical alias for one already parsed shader-function argument.
(binding)(object)(operator context expression)Lower EXPRESSION into CONTEXT's target product and return its value. Target context deliberately precedes operator identity in method selection: an operator implemented only for one backend must not capture another backend's context before its source-located unsupported-operation method.
An inspectable typed call whose body is inlined during backend lowering.
A typed value conditional from the shared language.
A typed bounded fold lowered as structured target control flow.
(context expression operand)A checked semantic name for a represented value, with no codegen effect.
(expression)An explicitly meaningful value constructed from semantically raw source.
(expression)An explicit assumption that an opaque represented value has a meaning.
(expression)An explicit exposure of a semantic value's raw machine representation.
(expression)An explicit linear unit conversion that may emit numerical scaling.
(expression)(expression)(context expression)(context expression operator)(context expression name)(context expression name)(operator text)Addition over compatible quantities.
Subtraction or unary negation.
Multiplication and scalar scaling.
Division of two represented quantities.
The non-negative remainder of integer division.
Test whether one compatible scalar is less than another.
Test whether one compatible scalar is at most another.
Test whether one compatible scalar is greater than another.
Test whether one compatible scalar is at least another.
(operator name)The inner product of two vectors.
Interpolate compatible quantities by a scalar amount.
The componentwise absolute value of a raw value.
The componentwise square root of a raw value.
Raise a dimensionless value to a dimensionless power.
Constrain a quantity between compatible bounds.
Produce dimensionless progress across compatible edges.
Compare compatible quantities and produce dimensionless values.
Normalize a dimensionless vector.
(operator name)The minimum of compatible quantities.
The maximum of compatible quantities.
(context expression)(operator)Convert one scalar float or unsigned value to a 32-bit unsigned integer.
Convert one scalar float or unsigned value to a 32-bit float.
Select and reorder vector components by a designator such as :XYZ or :RGB.
(declaration)(stream specification suffix declarations)(&body body)The declarations BODY makes, read as a rule body, for a rule to include: the way to write a mixin.
(stream resource)(context specification)One descriptor-backed uniform block with ordered, inspectable members.
(context statement)One ordered shader effect or structured group of shader effects.
(type)(type)(stream &optional (extra 0))(statement stream)(context)(context statements)(target specification)Lower SPECIFICATION for TARGET without changing its source graph. TARGET participates in ordinary CLOS dispatch so each backend can own its structured product and source provenance. #JDLQPN
(specification &key overrides)(document pathname)An open document and the context it was opened in.
Direct WebGPU Shading Language lowering for luv's mathematical shaders.
The shared graph remains the semantic source. This sibling target owns WGSL spelling, entry-point/resource ABI, pipeline overrides, structured statements, and source occurrences. The first target surface is deliberately conventional WebGPU: vertex and fragment stages, without pretending that task or mesh stages exist in standard WGSL.