hal/metal/ffi.lisp
MTLStages and MTL4VisibilityOptions used by explicit Metal 4 barriers.
MTLRegion is two adjacent three-NSUInteger structures. Flat fields keep the identical ABI while remaining directly assignable through CFFI.
Device and Metal 4 submission.
Device resources and Metal 4 binding infrastructure.
Replace the complete base level of a two-dimensional Metal texture.
Create one owned two-dimensional Metal texture.
Create one owned Metal sampler state.
Create an owned residency set for long-lived Metal allocations.
Create an owned Metal 4 argument table with a buffer binding range.
Create one synchronous Metal 4 compiler owned by device.
Return the owned compiler and NIL on success, or NIL and a copied NSError description on native rejection.
MetalFX temporal reconstruction on a Metal 4 command buffer.
Create an owned Metal4FX temporal scaler and its owned synchronization fence.
Return scaler's required color, depth, motion, and output usage masks.
Bind one native frame to scaler before encoding it.
Luft writes normalized current-to-previous motion. MetalFX consumes pixels after applying these once-per-frame extent scales.
Synchronously compile source as Metal 4 and return an owned MTLLibrary.
The second value is NIL on success or a copied NSError description on native rejection. Source and names cross only as in-memory NSString objects.
Metal 4 render pipeline compilation.
Synchronously link Metal libraries into an owned Metal 4 pipeline state.
Synchronously link object, mesh, and fragment libraries into Metal 4.
Create an owned MTLDepthStencilState for a Metal render pipeline.
Copy a complete two-dimensional Metal texture into a buffer.
Commit a non-empty vector of ended Metal 4 command buffers to queue.
Commit one ended Metal 4 command buffer to queue.
SDL's borrowed CAMetalLayer and its current drawable.
Return layer's physical drawable width and height as two values.
Empty render pass used as a deterministic clear.
Begin one Metal 4 render pass with optional color and depth attachments.
Begin one Metal 4 color pass and return its borrowed render encoder.
Encode one empty Metal 4 render pass which clears texture to color.
(name (selector result-type &key ownership class consumes-receiver)
&body arguments)Headings, paragraphs, figures and their IDs, mentions, marks.
(&optional (stream *standard-output*))(texture width height bytes bytes-per-row)(device width height pixel-format usage &key (storage-mode +storage-mode-private+)
label)(() &body body)((variable form) &body body)Logical conjunction of tests and raw truth values.
(string)Return an autoreleased NSString containing STRING. The result is borrowed and must remain inside its surrounding autorelease pool. Native APIs which copy an NSString argument may retain it beyond that scope in the ordinary Objective-C way.
(device min-filter mag-filter mip-filter address-mode-s address-mode-t
address-mode-r compare-function &key label)(pointer &key (ownership :borrowed) protocol-name)(device &key label (initial-capacity 64))(device max-buffer-count
&key (max-texture-count 0) (max-sampler-count 0) label
(attribute-strides-p nil))A simple Org table without formulas.
(device &key label)Create one synchronous Metal 4 compiler owned by DEVICE. Return the owned compiler and NIL on success, or NIL and a copied NSError description on native rejection.
(device compiler color-format depth-format motion-format output-format
input-width input-height output-width output-height)(object)(scaler color depth motion exposure output width height jitter-x jitter-y
reset-p)(compiler source &key name)Synchronously compile SOURCE as Metal 4 and return an owned MTLLibrary. The second value is NIL on success or a copied NSError description on native rejection. Source and names cross only as in-memory NSString objects.
The library band: eyebrow, site name, and the three doors.
(descriptor vertex-buffers)Layouts: binding grids, clauses, loop rows. The selectors are the roles dexp.lisp assigns.
How the children of a list are arranged.
(compiler vertex-library vertex-name fragment-library fragment-name
vertex-buffers color-formats topology &key depth-format blends label)Test whether two compatible scalars are equal.
(compiler object-library object-name object-workgroup-size
mesh-library mesh-name mesh-workgroup-size
fragment-library fragment-name color-format max-mesh-workgroups
&key blend label)Multiplication and scalar scaling.
(device compare-function depth-write-enabled &key label)(command-buffer &key flags)(command-buffer)(client source)(encoder source width height destination bytes-per-row)(queue command-buffers)(queue command-buffer)(layer width height)(layer)One named verb over a session.
(descriptor index texture color clear-p store-p)(descriptor texture clear-depth clear-p store-p)(command-buffer &key color-attachments color-texture
(color #(0.0 0.0 0.0 1.0))
(color-clear-p t) (color-store-p t)
depth-texture (clear-depth 1.0)
(depth-clear-p t) (depth-store-p nil))(command-buffer texture color &key (clear-p t))(command-buffer texture color)
The Metal 4 and CAMetalLayer vocabulary needed by the first frame.
The two small structures cross as typed foreign storage through either the default NSInvocation bridge or direct libffi calls in an explicitly unchecked scope. They stay declarations in the same message system as scalar and object calls; no per-selector shim is needed.