animader-cli 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "animader-cli",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "The animader command line: project creation, dev server, build, standalone export and host/project doctor checks",
5
5
  "type": "module",
6
6
  "bin": {
@@ -11,14 +11,14 @@
11
11
  },
12
12
  "license": "CC0-1.0",
13
13
  "dependencies": {
14
- "animader": "0.6.0",
14
+ "animader": "0.7.0",
15
15
  "esbuild": "0.24.2",
16
16
  "@mr_hugo/pacer": "0.2.0",
17
- "pngine": "4.3.1"
17
+ "pngine": "4.5.0"
18
18
  },
19
19
  "optionalDependencies": {
20
20
  "@mr_hugo/pacer-darwin-arm64": "0.2.0",
21
- "@pngine/darwin-arm64": "4.3.1"
21
+ "@pngine/darwin-arm64": "4.5.0"
22
22
  },
23
23
  "files": [
24
24
  "bin",
@@ -3,7 +3,7 @@
3
3
  "producers": {
4
4
  "animader": { "version": "0.0.0" },
5
5
  "tempura": { "version": "0.1.0" },
6
- "pngine": { "version": "4.3.1" }
6
+ "pngine": { "version": "4.5.0" }
7
7
  },
8
8
  "sources": [
9
9
  {
@@ -83,8 +83,8 @@
83
83
  "file": "pngine.sjon",
84
84
  "owner": "pngine",
85
85
  "optional": true,
86
- "bytes": 195316,
87
- "sha256": "ac873a5674d33fe9bf5f0372a7b2172b62d181dd90e0ce17ac43fec5e3de8150"
86
+ "bytes": 224253,
87
+ "sha256": "2be6857086fb49531ad18a44ab31f3d59b81c5de82b904caebab5c2d298999da"
88
88
  }
89
89
  ],
90
90
  "bundles": [
@@ -671,7 +671,8 @@
671
671
  (member :name rg16float :description "2×16-bit float; renderable, filterable.")
672
672
  (member :name r32float :description "1×32-bit float; renderable; filterable only with the float32-filterable feature.")
673
673
  (member :name r32uint :description "1×32-bit unsigned int; not filterable.")
674
- ; ---- base (no-feature) color / srgb / packed; compressed (BC/ETC2/EAC/ASTC) are deferred (need an upload path) ----
674
+ ; ---- base (no-feature) color / srgb / packed; all three compressed
675
+ ; families (BC, ETC2/EAC and ASTC) are exposed by plan 07 ----
675
676
  (member :name rgba8unorm-srgb :description "4×8-bit unorm, sRGB-encoded; renderable, filterable, blendable.")
676
677
  (member :name rgba8uint :description "4×8-bit unsigned int; renderable, not filterable.")
677
678
  (member :name rgba8sint :description "4×8-bit signed int; renderable, not filterable.")
@@ -706,6 +707,69 @@
706
707
  (member :name rgba16unorm :description "4×16-bit unorm; needs texture-formats-tier1. Renderable + blendable when enabled.")
707
708
  (member :name rgba16snorm :description "4×16-bit signed norm; needs texture-formats-tier1. Renderable + blendable when enabled.")
708
709
  (member :name depth32float-stencil8 :description "32-bit float depth plus 8-bit stencil; needs the depth32float-stencil8 device feature.")
710
+ ; ---- BC compressed (plan 07): 4×4 texel blocks, 8 or 16 bytes per
711
+ ; block, copy-only. Creation needs texture-compression-bc; 3D additionally
712
+ ; needs texture-compression-bc-sliced-3d. Descriptor width/height and copy
713
+ ; origin/extent are whole blocks. ----
714
+ (member :name bc1-rgba-unorm :description "BC1 4×4 RGB(A) unorm; 8 bytes per block. Needs texture-compression-bc.")
715
+ (member :name bc1-rgba-unorm-srgb :description "BC1 4×4 RGB(A), sRGB-encoded; 8 bytes per block. Needs texture-compression-bc.")
716
+ (member :name bc2-rgba-unorm :description "BC2 4×4 RGB(A) with explicit alpha; 16 bytes per block. Needs texture-compression-bc.")
717
+ (member :name bc2-rgba-unorm-srgb :description "BC2 4×4 RGB(A) with explicit alpha, sRGB-encoded; 16 bytes per block. Needs texture-compression-bc.")
718
+ (member :name bc3-rgba-unorm :description "BC3 4×4 interpolated alpha; 16 bytes per block. Needs texture-compression-bc.")
719
+ (member :name bc3-rgba-unorm-srgb :description "BC3 4×4 interpolated alpha, sRGB-encoded; 16 bytes per block. Needs texture-compression-bc.")
720
+ (member :name bc4-r-unorm :description "BC4 single-channel 4×4 unorm; 8 bytes per block. Needs texture-compression-bc.")
721
+ (member :name bc4-r-snorm :description "BC4 single-channel 4×4 snorm; 8 bytes per block. Needs texture-compression-bc.")
722
+ (member :name bc5-rg-unorm :description "BC5 two-channel 4×4 unorm; 16 bytes per block. Needs texture-compression-bc.")
723
+ (member :name bc5-rg-snorm :description "BC5 two-channel 4×4 snorm; 16 bytes per block. Needs texture-compression-bc.")
724
+ (member :name bc6h-rgb-ufloat :description "BC6H unsigned HDR RGB 4×4; 16 bytes per block. Needs texture-compression-bc.")
725
+ (member :name bc6h-rgb-float :description "BC6H signed HDR RGB 4×4; 16 bytes per block. Needs texture-compression-bc.")
726
+ (member :name bc7-rgba-unorm :description "BC7 high-quality RGBA 4×4 unorm; 16 bytes per block. Needs texture-compression-bc.")
727
+ (member :name bc7-rgba-unorm-srgb :description "BC7 high-quality RGBA 4×4, sRGB-encoded; 16 bytes per block. Needs texture-compression-bc.")
728
+ ; ---- ETC2/EAC compressed (plan 07 tranche B): 4×4 texel blocks, 8 or
729
+ ; 16 bytes per block, copy-only. Creation needs texture-compression-etc2;
730
+ ; the CRD has no ETC2/EAC sliced-3d feature, so 3D is refused. ----
731
+ (member :name etc2-rgb8unorm :description "ETC2 RGB 4×4 unorm; 8 bytes per block. Needs texture-compression-etc2.")
732
+ (member :name etc2-rgb8unorm-srgb :description "ETC2 RGB 4×4, sRGB-encoded; 8 bytes per block. Needs texture-compression-etc2.")
733
+ (member :name etc2-rgb8a1unorm :description "ETC2 RGB with 1-bit alpha, 4×4 unorm; 8 bytes per block. Needs texture-compression-etc2.")
734
+ (member :name etc2-rgb8a1unorm-srgb :description "ETC2 RGB with 1-bit alpha, 4×4, sRGB-encoded; 8 bytes per block. Needs texture-compression-etc2.")
735
+ (member :name etc2-rgba8unorm :description "ETC2 RGBA 4×4 unorm; 16 bytes per block. Needs texture-compression-etc2.")
736
+ (member :name etc2-rgba8unorm-srgb :description "ETC2 RGBA 4×4, sRGB-encoded; 16 bytes per block. Needs texture-compression-etc2.")
737
+ (member :name eac-r11unorm :description "EAC single-channel 4×4 unorm; 8 bytes per block. Needs texture-compression-etc2.")
738
+ (member :name eac-r11snorm :description "EAC single-channel 4×4 snorm; 8 bytes per block. Needs texture-compression-etc2.")
739
+ (member :name eac-rg11unorm :description "EAC two-channel 4×4 unorm; 16 bytes per block. Needs texture-compression-etc2.")
740
+ (member :name eac-rg11snorm :description "EAC two-channel 4×4 snorm; 16 bytes per block. Needs texture-compression-etc2.")
741
+ ; ---- ASTC compressed (plan 07 tranche C): the block dimensions are the
742
+ ; ones in the name (4×4 through 12×12), the block is always 16 bytes,
743
+ ; copy-only. Creation needs texture-compression-astc; 3D additionally
744
+ ; needs texture-compression-astc-sliced-3d. ----
745
+ (member :name astc-4x4-unorm :description "ASTC 4×4 RGBA unorm; 16 bytes per block. Needs texture-compression-astc.")
746
+ (member :name astc-4x4-unorm-srgb :description "ASTC 4×4 RGBA, sRGB-encoded; 16 bytes per block. Needs texture-compression-astc.")
747
+ (member :name astc-5x4-unorm :description "ASTC 5×4 RGBA unorm; 16 bytes per block. Needs texture-compression-astc.")
748
+ (member :name astc-5x4-unorm-srgb :description "ASTC 5×4 RGBA, sRGB-encoded; 16 bytes per block. Needs texture-compression-astc.")
749
+ (member :name astc-5x5-unorm :description "ASTC 5×5 RGBA unorm; 16 bytes per block. Needs texture-compression-astc.")
750
+ (member :name astc-5x5-unorm-srgb :description "ASTC 5×5 RGBA, sRGB-encoded; 16 bytes per block. Needs texture-compression-astc.")
751
+ (member :name astc-6x5-unorm :description "ASTC 6×5 RGBA unorm; 16 bytes per block. Needs texture-compression-astc.")
752
+ (member :name astc-6x5-unorm-srgb :description "ASTC 6×5 RGBA, sRGB-encoded; 16 bytes per block. Needs texture-compression-astc.")
753
+ (member :name astc-6x6-unorm :description "ASTC 6×6 RGBA unorm; 16 bytes per block. Needs texture-compression-astc.")
754
+ (member :name astc-6x6-unorm-srgb :description "ASTC 6×6 RGBA, sRGB-encoded; 16 bytes per block. Needs texture-compression-astc.")
755
+ (member :name astc-8x5-unorm :description "ASTC 8×5 RGBA unorm; 16 bytes per block. Needs texture-compression-astc.")
756
+ (member :name astc-8x5-unorm-srgb :description "ASTC 8×5 RGBA, sRGB-encoded; 16 bytes per block. Needs texture-compression-astc.")
757
+ (member :name astc-8x6-unorm :description "ASTC 8×6 RGBA unorm; 16 bytes per block. Needs texture-compression-astc.")
758
+ (member :name astc-8x6-unorm-srgb :description "ASTC 8×6 RGBA, sRGB-encoded; 16 bytes per block. Needs texture-compression-astc.")
759
+ (member :name astc-8x8-unorm :description "ASTC 8×8 RGBA unorm; 16 bytes per block. Needs texture-compression-astc.")
760
+ (member :name astc-8x8-unorm-srgb :description "ASTC 8×8 RGBA, sRGB-encoded; 16 bytes per block. Needs texture-compression-astc.")
761
+ (member :name astc-10x5-unorm :description "ASTC 10×5 RGBA unorm; 16 bytes per block. Needs texture-compression-astc.")
762
+ (member :name astc-10x5-unorm-srgb :description "ASTC 10×5 RGBA, sRGB-encoded; 16 bytes per block. Needs texture-compression-astc.")
763
+ (member :name astc-10x6-unorm :description "ASTC 10×6 RGBA unorm; 16 bytes per block. Needs texture-compression-astc.")
764
+ (member :name astc-10x6-unorm-srgb :description "ASTC 10×6 RGBA, sRGB-encoded; 16 bytes per block. Needs texture-compression-astc.")
765
+ (member :name astc-10x8-unorm :description "ASTC 10×8 RGBA unorm; 16 bytes per block. Needs texture-compression-astc.")
766
+ (member :name astc-10x8-unorm-srgb :description "ASTC 10×8 RGBA, sRGB-encoded; 16 bytes per block. Needs texture-compression-astc.")
767
+ (member :name astc-10x10-unorm :description "ASTC 10×10 RGBA unorm; 16 bytes per block. Needs texture-compression-astc.")
768
+ (member :name astc-10x10-unorm-srgb :description "ASTC 10×10 RGBA, sRGB-encoded; 16 bytes per block. Needs texture-compression-astc.")
769
+ (member :name astc-12x10-unorm :description "ASTC 12×10 RGBA unorm; 16 bytes per block. Needs texture-compression-astc.")
770
+ (member :name astc-12x10-unorm-srgb :description "ASTC 12×10 RGBA, sRGB-encoded; 16 bytes per block. Needs texture-compression-astc.")
771
+ (member :name astc-12x12-unorm :description "ASTC 12×12 RGBA unorm; 16 bytes per block. Needs texture-compression-astc.")
772
+ (member :name astc-12x12-unorm-srgb :description "ASTC 12×12 RGBA, sRGB-encoded; 16 bytes per block. Needs texture-compression-astc.")
709
773
  (member :name preferred-canvas-format :description "Resolved at runtime to the platform's canvas format. Runtime-provided; there is no authored document declaration to navigate to.")))
710
774
  (value-kind :name texture-usage
711
775
  :description "GPUTextureUsage flag — what the texture may be used for."
@@ -743,6 +807,19 @@
743
807
  :description "Texture size as [width], [width height], or [width height depth-or-array-layers]; the missing dimensions default to 1."
744
808
  :underlying vector
745
809
  :vector (vector-shape :element extent :min-len 1 :max-len 3))
810
+ ; GPUExtent3D as a COPY extent (writeTexture's `size` argument): [w], [w h]
811
+ ; or [w h d]. Same element type and length as extent3, deliberately its own
812
+ ; kind: an allocation dimension is `extent` (>= 1), while a copy dimension
813
+ ; can also be a bounded expression / define-ref through `u32`; and a copy
814
+ ; size is judged against the mip's physical extent by plan 01, not by a
815
+ ; texture's allocation rule. Its absent dimensions mean height/depth = 1
816
+ ; ONLY when the key is present. An absent KEY is a different thing: the
817
+ ; remaining physical extent at the origin, a recorded PNGine deviation from
818
+ ; the IDL's required `size` argument (see the write-texture form).
819
+ (value-kind :name copy-extent
820
+ :description "Copy size [width], [width height], or [width height depth-or-array-layers] (1–3 non-negative u32s). Absent dimensions default to 1 only when the key is present; an omitted :size means the remaining physical extent at the destination origin."
821
+ :underlying vector
822
+ :vector (vector-shape :element u32 :min-len 1 :max-len 3))
746
823
  ; GPUTextureDescriptor.size is ONE required member, so it is one required key
747
824
  ; over the three things a pngine texture may be sized by. Three
748
825
  ; different underlyings — vector, symbol member, cross-ref — so the union
@@ -851,11 +928,29 @@
851
928
  (head :name stencil-back :max 1)))
852
929
 
853
930
  ; ---- Phase 2d: MRT / MSAA / advanced render state ----
854
- ; A render-pass attachment view: the canvas (context-current-texture) or a
855
- ; declared (texture …) — e.g. an MSAA color target, or a resolve target.
931
+ ; A render-pass attachment view: the canvas (context-current-texture), a
932
+ ; declared (texture …), or a declared (texture-view …) selecting one mip and
933
+ ; one array layer. The union is the authoring surface of plan 09: a bare
934
+ ; texture still means the texture's default view (legacy bytes unchanged),
935
+ ; an explicit view names exactly the subresource the pass renders into.
936
+ ;
937
+ ; Two cross-ref arms first-match is safe here for the reason the one-namespace
938
+ ; rule exists: `checkNameNamespace` refuses a name declared by two forms, so
939
+ ; a symbol cannot be both a texture and a texture-view in one document. The
940
+ ; emitter resolves through its separate id tables and the union only has to
941
+ ; admit the spellings; should a collision ever survive schema validation, it
942
+ ; is refused before any phase, never silently resolved one way here and the
943
+ ; other downstream.
856
944
  (value-kind :name attachment-view
857
945
  :underlying union
858
- :union (union-shape :alternatives [view-source texture-ref]))
946
+ :union (union-shape :alternatives [view-source texture-ref texture-view-ref]))
947
+ ; The DEPTH authoring form's own union: texture or texture-view, never the
948
+ ; canvas. A depth attachment has no canvas spelling (the runtime's depth view
949
+ ; is the document's to declare), and the plan refuses it deliberately; the
950
+ ; colour/resolve `attachment-view` union keeps its view-source arm.
951
+ (value-kind :name depth-attachment-view
952
+ :underlying union
953
+ :union (union-shape :alternatives [texture-ref texture-view-ref]))
859
954
  (value-kind :name blend-factor
860
955
  :description "GPUBlendFactor — multiplier applied to source / destination color in the blend equation."
861
956
  :underlying symbol
@@ -1012,9 +1107,16 @@
1012
1107
 
1013
1108
  ; ---- strings ----
1014
1109
  (value-kind :name file-path
1015
- :description "File path relative to the source document (non-empty, no newlines)."
1110
+ :description "File path relative to the compile root (non-empty, no newlines)."
1016
1111
  :underlying string
1017
1112
  :string-bounds (string-bounds :format path))
1113
+ ; A package SPECIFIER, not a path: `<name>` or `@<scope>/<name>`, optionally
1114
+ ; followed by `/subpath`. The grammar is enforced by the resolver before any
1115
+ ; candidate path is constructed; this kind exists so the spelling is a named
1116
+ ; authoring concept rather than an unconstrained string.
1117
+ (value-kind :name package-specifier
1118
+ :description "A plain-WGSL package specifier: `name` or `@scope/name`, optionally `/subpath`. No URL, version suffix or `..`."
1119
+ :underlying string)
1018
1120
  ; The one string kind that carries CONTENT rather than a name or a path.
1019
1121
  ; SJON's `:format` set is email|uri|path|uuid|semver, so there is no schema
1020
1122
  ; check for base64 — the emitter decodes and reports `data_base64_invalid`
@@ -1094,17 +1196,33 @@
1094
1196
  ; `duplicate_cross_ref_target` at the declaration, so a step can never be
1095
1197
  ; ambiguous. A named graph is in the list because the frame names it in the
1096
1198
  ; AUTHORED aggregate, where it is a `(pass-graph …)` / `(draw-graph …)` and
1097
- ; not yet the `(step-group …)` its hook emits; a `(select …)` joins for the
1098
- ; same reason (2089e59's fix, applied to the fourth member).
1199
+ ; not yet the `(step-group …)` its hook emits; a `(select …)` and a
1200
+ ; `(mip-chain …)` join for the same reason (2089e59's fix, applied to the
1201
+ ; fourth and fifth members).
1099
1202
  ; (It used to be a union tried in order, while the emitter kept
1100
1203
  ; one table for both pass kinds — a collision silently dropped the render pass.)
1101
1204
  (value-kind :name frame-step
1102
- :description "One frame step: a render-pass, compute-pass or queue name, a named pass-graph/draw-graph (a step group), a step-group name, or a select name (one namespace across the forms)."
1205
+ :description "One frame step: a render-pass, compute-pass or queue name, a named pass-graph/draw-graph/mip-chain (a step group), a step-group name, or a select name (one namespace across the forms)."
1103
1206
  :underlying symbol
1104
- :cross-ref (cross-ref :target [render-pass compute-pass queue step-group pass-graph draw-graph select]))
1207
+ :cross-ref (cross-ref :target [render-pass compute-pass queue step-group pass-graph draw-graph select mip-chain]))
1105
1208
  (value-kind :name frame-step-list
1106
1209
  :description "Passes and queues run every frame, in order."
1107
1210
  :underlying vector :vector (vector-shape :element frame-step :max-len 2048))
1211
+ ; One frame step, run ONCE per loaded payload (VGPU-09). Same namespace and
1212
+ ; same targets as `frame-step`, and the same spelling — a one-time step is
1213
+ ; written by naming the ordinary form, not by a second declaration of it.
1214
+ ; What is refused on this slot is lifecycle, not syntax: the canvas (a
1215
+ ; per-frame view), a guarded group/select (zero or many runs), a step also
1216
+ ; reached by :before/:perform, a group cycle, a queue whose generated
1217
+ ; one-shot pass name is taken, and an upload whose asset does not resolve.
1218
+ ; See `docs/sjon-reference.md`, "What `:init` means, exactly".
1219
+ (value-kind :name init-step
1220
+ :description "One one-time step: a render-pass, compute-pass or queue name, a named pass-graph/draw-graph/mip-chain (a step group), a step-group name, or a select name (one namespace across the forms)."
1221
+ :underlying symbol
1222
+ :cross-ref (cross-ref :target [render-pass compute-pass queue step-group pass-graph draw-graph select mip-chain]))
1223
+ (value-kind :name init-step-list
1224
+ :description "One-time steps: run once per loaded payload, in order, before the recurring work. A queue write is lowered to a generated one-shot compute pass; a render/compute pass runs through exec_pass_once."
1225
+ :underlying vector :vector (vector-shape :element init-step :max-len 2048))
1108
1226
  ; `:min-len 1` because count 0 is not "no color targets" on the wire — it is
1109
1227
  ; the frozen legacy sentinel meaning "substitute the preferred canvas format"
1110
1228
  ; (docs/abi.md §6.5), which is exactly the fabrication 3.0.0 removes.
@@ -1298,11 +1416,12 @@
1298
1416
  (value-kind :name in-stage-section :underlying form :heads (head-set
1299
1417
  (head :name constant)))
1300
1418
  (value-kind :name bind-entry-item :underlying form :heads (head-set :names [entry]))
1301
- (value-kind :name queue-action :underlying form :heads (head-set :names [write-buffer copy-texture-to-texture copy-external-image-to-texture resolve-query-set copy-buffer-to-buffer]))
1302
- ; Both texture copies take exactly one endpoint of each kind. The heads
1303
- ; are shared but the FORMS are not — each copy declares its own slot-local
1419
+ (value-kind :name queue-action :underlying form :heads (head-set :names [write-buffer write-texture copy-buffer-to-texture copy-texture-to-buffer copy-texture-to-texture copy-external-image-to-texture resolve-query-set copy-buffer-to-buffer]))
1420
+ ; Every copy takes exactly one endpoint of each kind. The heads are shared
1421
+ ; but the FORMS are not — each copy declares its own slot-local
1304
1422
  ; `source`/`destination`, resolved local-first, so `(source :image …)` under
1305
- ; one is not `(source :texture …)` under the other.
1423
+ ; one is not `(source :texture …)` under the other, and a buffer endpoint's
1424
+ ; members are not a texture endpoint's.
1306
1425
  (value-kind :name copy-endpoints-section :underlying form :heads (head-set
1307
1426
  (head :name source :min 1 :max 1)
1308
1427
  (head :name destination :min 1 :max 1)))
@@ -1482,20 +1601,23 @@
1482
1601
  ; reported against the fragment rather than as an unresolved identifier
1483
1602
  ; somewhere in an assembled module the author never wrote.
1484
1603
  (form :name wgsl
1485
- :description "A named WGSL fragment, from inline :code or a :file, assembled into the modules that :imports it. Not a GPU object: never validated, minified or shipped alone."
1604
+ :description "A named WGSL fragment, from inline :code, a :file, or an installed package's export, assembled into the modules that :imports it. Not a GPU object: never validated, minified or shipped alone."
1486
1605
  (key :name name :type symbol
1487
1606
  :description "Fragment name referenced by another fragment's, a (shader-module …)'s or a (pass …)'s :imports.")
1488
1607
  (key :name code :type string :optional true
1489
- :description "WGSL source text, kept verbatim. Exactly one of :code or :file.")
1608
+ :description "WGSL source text, kept verbatim. Exactly one of :code, :file or :package.")
1490
1609
  (key :name file :type file-path :optional true
1491
- :description "Path to a .wgsl file, relative to the source document. Exactly one of :code or :file.")
1610
+ :description "Path to a .wgsl file, relative to the compile root. Exactly one of :code, :file or :package.")
1611
+ (key :name package :type package-specifier :optional true
1612
+ :description "An installed plain-WGSL package export, e.g. \"@example/noise\" or \"@example/noise/math\". Exactly one of :code, :file or :package; a package entry owns its own imports and holes, so :imports and :requires cannot be combined with it.")
1492
1613
  (key :name imports :type wgsl-ref-list :optional true
1493
1614
  :description "Fragments this one is assembled behind, in dependency order. The graph must be acyclic and each fragment appears once per assembled module.")
1494
1615
  (key :name requires :type wgsl-name-list :optional true
1495
1616
  :description "WGSL identifiers this fragment uses but does not declare. Every one must be declared by the module that imports it (or by a sibling fragment) — reached or not, since validation runs before dead-code elimination. `validate` checks the list against the fragment's own text and warns both ways: a listed name never used as a hole, a hole never listed.")
1496
1617
  (exclusive-group :cardinality exactly-one
1497
1618
  (alt :keys [code])
1498
- (alt :keys [file])))
1619
+ (alt :keys [file])
1620
+ (alt :keys [package])))
1499
1621
 
1500
1622
  (form :name shader-module
1501
1623
  :description "A named WGSL module. The source is opaque text to SJON. With :imports it is the ROOT of an assembled module: its fragments' text in dependency order, then its own."
@@ -1504,7 +1626,7 @@
1504
1626
  (key :name code :type string :optional true
1505
1627
  :description "WGSL source text, kept verbatim (a triple-quoted string's indentation is part of the shader). Exactly one of :code or :file.")
1506
1628
  (key :name file :type file-path :optional true
1507
- :description "Path to a .wgsl file, relative to the source document. Exactly one of :code or :file.")
1629
+ :description "Path to a .wgsl file, relative to the compile root. Exactly one of :code or :file.")
1508
1630
  (key :name imports :type wgsl-ref-list :optional true
1509
1631
  :description "Fragments assembled ahead of this module's own text. Minification and dead-code elimination run once over the whole assembled module, so names stay consistent across fragment boundaries and unreached fragment code is dropped.")
1510
1632
  (exclusive-group :cardinality exactly-one
@@ -1581,7 +1703,7 @@
1581
1703
  (form :name bytes
1582
1704
  :description "Verbatim bytes as a (data …) source: a sidecar file read at compile time, or inline base64. Stored with no MIME prefix and sized like an inline array, so a buffer's :data can size and fill from it — which (data … :file …) deliberately cannot."
1583
1705
  (key :name file :type file-path :optional true
1584
- :description "Binary file path relative to the source document, embedded byte-for-byte. Exactly one of :file or :base64.")
1706
+ :description "Binary file path relative to the compile root, embedded byte-for-byte. Exactly one of :file or :base64.")
1585
1707
  (key :name base64 :type base64-text :optional true
1586
1708
  :description "The bytes inline, base64-encoded, for a document that carries its own data. Exactly one of :file or :base64.")
1587
1709
  (exclusive-group :cardinality exactly-one
@@ -1679,9 +1801,10 @@
1679
1801
  :description "Number of queries in the set, 1 to 4096 (the createQuerySet bound)."))
1680
1802
 
1681
1803
  (form :name queue
1682
- :description "Queue actions (write-buffer, copy-buffer-to-buffer, copy-texture-to-texture,
1683
- copy-external-image-to-texture, resolve-query-set) run in order by the
1684
- frames that reference it."
1804
+ :description "Queue actions (write-buffer, write-texture, copy-buffer-to-texture,
1805
+ copy-texture-to-buffer, copy-buffer-to-buffer, copy-texture-to-texture,
1806
+ copy-external-image-to-texture, resolve-query-set)
1807
+ run in order by the frames that reference it."
1685
1808
  :positional queue-action
1686
1809
  (key :name name :type symbol))
1687
1810
 
@@ -1698,31 +1821,150 @@
1698
1821
  (key :name data :type write-buffer-source
1699
1822
  :description "Source: a (data …) ref, a (wasm-call …) whose result is written each frame, or a runtime builtin — pngine-inputs (16B time/width/height/aspect), scene-time-inputs (12B), pngine-frame-inputs (20B, + frameIndex), pointer-inputs (48B), control-inputs (4B per declared (control …) in declaration order)."))
1700
1823
 
1824
+ ; The flat form of GPUQueue.writeTexture. Nine keys mirror the two texel-copy
1825
+ ; dictionaries plus the method's own `data` and `size` arguments:
1826
+ ; GPUTexelCopyTextureInfo (texture, mipLevel, origin, aspect) and
1827
+ ; GPUTexelCopyBufferLayout (offset, bytesPerRow, rowsPerImage). PNGine spells
1828
+ ; every one as a :key, so the mapping table's only sentinels are `data` and
1829
+ ; `size`, the two arguments that are NOT members of either dictionary.
1830
+ ;
1831
+ ; Presence is the wire's: `:bytes-per-row` and `:rows-per-image` are optional
1832
+ ; because the IDL gives those members NO default, and their absence survives
1833
+ ; into the PNGB presence flags (explicit zero is not omission). `:origin`
1834
+ ; carries no `:default` token because origin3 is a vector; each component
1835
+ ; defaults to 0, which is what the IDL's `{}` means.
1836
+ ;
1837
+ ; `:size` is the ONE recorded deviation: the IDL REQUIRES the size argument,
1838
+ ; but an omitted `:size` here means the remaining physical extent at the
1839
+ ; origin (plan 01's calculateWrite), so an author can update a subregion
1840
+ ; without restating the texture size. An explicit `:size` keeps its absent
1841
+ ; dimensions at height/depth 1 only because the key is present.
1842
+ (form :name write-texture
1843
+ :description "Queue op: upload raw texels into a texture (GPUQueue.writeTexture). :texture and :data are required; :offset, :origin, :mip-level and :aspect carry WebGPU's defaults. An omitted :size means the remaining physical extent at :origin — a recorded PNGine deviation from the IDL's required size argument. Omitted :bytes-per-row / :rows-per-image stay absent on the wire; explicit zero is not omission."
1844
+ (key :name texture :type texture-ref
1845
+ :description "Destination texture (needs copy-dst usage, one sample, and a non-pooled id).")
1846
+ (key :name data :type data-ref
1847
+ :description "Raw source bytes: a (data …) entry with a byte length. Image-MIME-wrapped data is refused; the bytes are never base64 on the wire.")
1848
+ (key :name offset :type byte-count :default 0
1849
+ :description "Byte offset into :data (GPUTexelCopyBufferLayout.offset, default 0). Unaligned values are legal: writeTexture has no 256-byte rule.")
1850
+ (key :name bytes-per-row :type byte-count :optional true
1851
+ :description "GPUTexelCopyBufferLayout.bytesPerRow — bytes per texel-block row. Optional because the IDL gives it no default; absent stays absent (explicit 0 is not omission).")
1852
+ (key :name rows-per-image :type byte-count :optional true
1853
+ :description "GPUTexelCopyBufferLayout.rowsPerImage — rows per texel image (array layer / depth slice). Optional because the IDL gives it no default; absent stays absent (explicit 0 is not omission).")
1854
+ (key :name origin :type origin3 :optional true
1855
+ :description "Destination origin [x y z] in texels (GPUTexelCopyTextureInfo.origin, IDL default {} = all zero); components default to 0. z selects the array layer or depth slice.")
1856
+ (key :name mip-level :type subresource-index :default 0
1857
+ :description "Destination mip level (GPUTexelCopyTextureInfo.mipLevel, default 0); a u32 varint, no u8 ceiling.")
1858
+ (key :name aspect :type texture-aspect :default all
1859
+ :description "Destination aspect (GPUTexelCopyTextureInfo.aspect, default all). Depth/stencil formats require a single aspect and a full-subresource write.")
1860
+ (key :name size :type copy-extent :optional true
1861
+ :description "GPUExtent3D size to write (1–3 u32s). Optional only through the recorded deviation: absent means the remaining physical extent at :origin, whereas the IDL requires the size argument. Present, absent dimensions default to 1."))
1862
+
1863
+ ; Buffer↔texture copies reuse plan 01's descriptor/layout model with an
1864
+ ; explicit aligned-buffer policy (plan 05, D16). Both endpoints are separate
1865
+ ; IDL dictionaries, so both are slot-local child forms: the buffer side is
1866
+ ; GPUTexelCopyBufferInfo (its `buffer` plus the inherited
1867
+ ; GPUTexelCopyBufferLayout members) and the texture side is
1868
+ ; GPUTexelCopyTextureInfo. `:size` is each method's own `copySize` argument,
1869
+ ; not a member of either dictionary.
1870
+ ;
1871
+ ; Compared with writeTexture, the buffer copy adds exactly two rules, both
1872
+ ; only when the texture endpoint is present: a supplied `:bytes-per-row` is a
1873
+ ; multiple of 256, and `:offset` is a multiple of the texel block copy
1874
+ ; footprint — except a depth-stencil texture endpoint (source or
1875
+ ; destination) uses 4. `writeTexture` has neither rule.
1876
+ (form :name copy-buffer-to-texture
1877
+ :description "Queue op: copy from a buffer into a texture subresource (GPUCommandEncoder.copyBufferToTexture). The source is a GPUTexelCopyBufferInfo and the destination a GPUTexelCopyTextureInfo; :size is the method's copySize. A supplied source :bytes-per-row must be a multiple of 256, and :offset a multiple of the texel block copy footprint (4 for a depth-stencil destination)."
1878
+ :positional copy-endpoints-section
1879
+ (key :name size :type copy-extent :optional true
1880
+ :description "GPUCommandEncoder.copyBufferToTexture's copySize (1–3 u32s). Optional only through the recorded deviation: absent means the remaining physical extent at the destination origin.")
1881
+ (form :name source
1882
+ :description "Buffer source (GPUTexelCopyBufferInfo with its GPUTexelCopyBufferLayout)."
1883
+ (key :name buffer :type buffer-ref
1884
+ :description "Source buffer name; needs copy-src usage.")
1885
+ (key :name offset :type byte-count :default 0
1886
+ :description "Byte offset into the source buffer (GPUTexelCopyBufferLayout.offset, default 0). Must be a multiple of the texel block copy footprint, or 4 for a depth-stencil endpoint.")
1887
+ (key :name bytes-per-row :type byte-count :optional true
1888
+ :description "GPUTexelCopyBufferLayout.bytesPerRow — bytes between texel-block rows. Optional in the IDL (no default); a supplied value must be a multiple of 256, and WebGPU requires it when the copy spans more than one block row or image.")
1889
+ (key :name rows-per-image :type byte-count :optional true
1890
+ :description "GPUTexelCopyBufferLayout.rowsPerImage — rows per texel image. Optional in the IDL (no default); WebGPU requires it when the copy spans more than one image."))
1891
+ (form :name destination
1892
+ :description "Texture destination (GPUTexelCopyTextureInfo)."
1893
+ (key :name texture :type texture-ref
1894
+ :description "Destination texture name; needs copy-dst usage, one sample, and a non-pooled id.")
1895
+ (key :name mip-level :type subresource-index :default 0
1896
+ :description "Destination mip level (GPUTexelCopyTextureInfo.mipLevel, default 0).")
1897
+ (key :name origin :type origin3 :optional true
1898
+ :description "Destination origin [x y z] in texels (GPUTexelCopyTextureInfo.origin, IDL default {} = all zero); z selects the array layer or depth slice.")
1899
+ (key :name aspect :type texture-aspect :default all
1900
+ :description "Destination aspect (GPUTexelCopyTextureInfo.aspect, default all). Depth/stencil formats require a single aspect and a full-subresource copy.")))
1901
+
1902
+ (form :name copy-texture-to-buffer
1903
+ :description "Queue op: copy a texture subresource into a buffer (GPUCommandEncoder.copyTextureToBuffer), the byte-preserving readback path. The source is a GPUTexelCopyTextureInfo and the destination a GPUTexelCopyBufferInfo; :size is the method's copySize. A supplied destination :bytes-per-row must be a multiple of 256, and :offset a multiple of the texel block copy footprint (4 for a depth-stencil source)."
1904
+ :positional copy-endpoints-section
1905
+ (key :name size :type copy-extent :optional true
1906
+ :description "GPUCommandEncoder.copyTextureToBuffer's copySize (1–3 u32s). Optional only through the recorded deviation: absent means the remaining physical extent at the source origin.")
1907
+ (form :name source
1908
+ :description "Texture source (GPUTexelCopyTextureInfo)."
1909
+ (key :name texture :type texture-ref
1910
+ :description "Source texture name; needs copy-src usage.")
1911
+ (key :name mip-level :type subresource-index :default 0
1912
+ :description "Source mip level (GPUTexelCopyTextureInfo.mipLevel, default 0).")
1913
+ (key :name origin :type origin3 :optional true
1914
+ :description "Source origin [x y z] in texels (GPUTexelCopyTextureInfo.origin, IDL default {} = all zero); z selects the array layer or depth slice.")
1915
+ (key :name aspect :type texture-aspect :default all
1916
+ :description "Source aspect (GPUTexelCopyTextureInfo.aspect, default all). Depth/stencil formats require a single aspect and a full-subresource copy."))
1917
+ (form :name destination
1918
+ :description "Buffer destination (GPUTexelCopyBufferInfo with its GPUTexelCopyBufferLayout)."
1919
+ (key :name buffer :type buffer-ref
1920
+ :description "Destination buffer name; needs copy-dst usage, and map-read when the bytes are read back to the host.")
1921
+ (key :name offset :type byte-count :default 0
1922
+ :description "Byte offset into the destination buffer (GPUTexelCopyBufferLayout.offset, default 0). Must be a multiple of the texel block copy footprint, or 4 for a depth-stencil endpoint.")
1923
+ (key :name bytes-per-row :type byte-count :optional true
1924
+ :description "GPUTexelCopyBufferLayout.bytesPerRow — bytes between texel-block rows. Optional in the IDL (no default); a supplied value must be a multiple of 256, and WebGPU requires it when the copy spans more than one block row or image.")
1925
+ (key :name rows-per-image :type byte-count :optional true
1926
+ :description "GPUTexelCopyBufferLayout.rowsPerImage — rows per texel image. Optional in the IDL (no default); WebGPU requires it when the copy spans more than one image.")))
1927
+
1701
1928
  ; Both ends of a copy are dictionaries in the IDL
1702
1929
  ; (GPUTexelCopyTextureInfo / GPUCopyExternalImageSourceInfo), so they are
1703
1930
  ; child forms, and their members are that form's keys: `:mip-level` and
1704
- ; `:origin` describe the DESTINATION subresource, not the copy. The flat
1931
+ ; `:origin` describe the endpoint's subresource, not the copy. The flat
1705
1932
  ; `:source X :texture Y` spelling is retired rather than kept as a second one.
1706
1933
  ; Their heads are SLOT-LOCAL: `source` carries a texture under one copy
1707
1934
  ; and an image under the other, and neither is a global form.
1708
1935
  ;
1709
- ; There is no `:size`: pngine copies the whole source, which is what both
1710
- ; runtimes do today. A key the bytecode cannot carry would validate and be
1711
- ; dropped in silence — the texture→texture opcode encodes the two texture
1712
- ; ids and nothing else (`wire_schema` L_2V); the external-image opcode encodes
1713
- ; the bitmap id, the texture id and the destination mip level + origin
1714
- ; (L_COPY_EXT_IMG). Neither carries a size. It arrives when the opcode does.
1936
+ ; COMPATIBILITY RULE (plan 06): a `(copy-texture-to-texture …)` that authors
1937
+ ; none of `:mip-level`, `:origin`, `:aspect` on either endpoint and no `:size`
1938
+ ; stays on the legacy whole-texture operation forever — PNGB 0x23 and command
1939
+ ; 0x23, byte-identical, including the canvas-size fallback. Any one of those
1940
+ ; keys (even with its default value) selects the subresource operation and the
1941
+ ; normalized SubresourceCopy model. The legacy opcode carries two ids and
1942
+ ; nothing else (`wire_schema` L_2V); the new operation is PNGB 0x80.
1715
1943
  (form :name copy-texture-to-texture
1716
- :description "Queue op: GPU texture→texture copy. context-current-texture names the canvas; otherwise a (texture …) name."
1944
+ :description "Queue op: GPU texture→texture copy. With no :mip-level, :origin or :aspect on either endpoint and no :size, this is the legacy whole-texture copy (PNGB 0x23) byte-identically; any such key selects the subresource operation. context-current-texture names the canvas; otherwise a (texture …) name."
1717
1945
  :positional copy-endpoints-section
1946
+ (key :name size :type copy-extent :optional true
1947
+ :description "GPUCommandEncoder.copyTextureToTexture's copySize (1–3 u32s). Optional only through the recorded deviation: absent means the remaining physical SOURCE extent at the source :origin and :mip-level; the destination must contain the same extent at its origin. Presence selects the subresource operation.")
1718
1948
  (form :name source
1719
- :description "Copy source (GPUTexelCopyTextureInfo)."
1949
+ :description "Copy source (GPUTexelCopyTextureInfo). With no subresource key and no outer :size it is the legacy whole-texture source."
1720
1950
  (key :name texture :type attachment-view
1721
- :description "Source texture: context-current-texture or a (texture …) name."))
1951
+ :description "Source texture: context-current-texture or a (texture …) name; needs copy-src usage.")
1952
+ (key :name mip-level :type subresource-index :default 0
1953
+ :description "Source mip level (GPUTexelCopyTextureInfo.mipLevel, default 0). Authoring the key selects the subresource operation; omitting it leaves the legacy route available.")
1954
+ (key :name origin :type origin3 :optional true
1955
+ :description "Source origin [x y z] in texels (GPUTexelCopyTextureInfo.origin, IDL default {} = all zero); z selects the array layer or depth slice. Its presence selects the subresource operation.")
1956
+ (key :name aspect :type texture-aspect :default all
1957
+ :description "Source aspect (GPUTexelCopyTextureInfo.aspect, default all). A depth-stencil texture→texture copy requires all on BOTH endpoints — the opposite of the write path's single-aspect rule. Its presence selects the subresource operation."))
1722
1958
  (form :name destination
1723
- :description "Copy destination (GPUTexelCopyTextureInfo)."
1959
+ :description "Copy destination (GPUTexelCopyTextureInfo). With no subresource key and no outer :size it is the legacy whole-texture destination."
1724
1960
  (key :name texture :type attachment-view
1725
- :description "Destination texture: context-current-texture or a (texture …) name.")))
1961
+ :description "Destination texture: context-current-texture or a (texture …) name; needs copy-dst usage and a non-pooled id on the subresource path.")
1962
+ (key :name mip-level :type subresource-index :default 0
1963
+ :description "Destination mip level (GPUTexelCopyTextureInfo.mipLevel, default 0). Its presence selects the subresource operation.")
1964
+ (key :name origin :type origin3 :optional true
1965
+ :description "Destination origin [x y z] in texels (GPUTexelCopyTextureInfo.origin, IDL default {} = all zero); z selects the array layer or depth slice. Its presence selects the subresource operation.")
1966
+ (key :name aspect :type texture-aspect :default all
1967
+ :description "Destination aspect (GPUTexelCopyTextureInfo.aspect, default all). A depth-stencil texture→texture copy requires all on BOTH endpoints. Its presence selects the subresource operation.")))
1726
1968
 
1727
1969
  (form :name copy-external-image-to-texture
1728
1970
  :description "Queue op: upload a decoded image (image-bitmap) into a texture. mip-level / origin default to 0 per the WebGPU spec."
@@ -1818,6 +2060,21 @@
1818
2060
  ; the layout, so there is nothing to derive a reachable set from.
1819
2061
  (key :name prune-unused :type boolean :default false
1820
2062
  :description "Drop each (entry …) whose (group, binding) no entry point of the :layout pipeline reaches. Prevents the bind-group/auto-layout desync that aborts at set_bind_group. Ignored when :layout names an explicit (bind-group-layout …); refused as redundant on a group with no :layout, which is pruned per pipeline already.")
2063
+ ; VGPU-08 Slice B — the narrow, all-or-nothing compile-time resource
2064
+ ; inference. For each reflected fixed-size uniform binding at this group's
2065
+ ; :group that an entry point of a binding pipeline reaches and no explicit
2066
+ ; (entry …) claims, the emitter synthesizes the ordinary buffer and entry:
2067
+ ; a buffer named `auto_uniforms__g<group>_b<binding>` with the reflected
2068
+ ; struct's exact layout size and [uniform copy-dst] usage, and the
2069
+ ; (entry :binding N :buffer …) that binds it. Explicit entries win; an
2070
+ ; unclaimed storage/texture/sampler binding, incompatible layout variants
2071
+ ; across pipelines, a generated-name collision or a slot past the
2072
+ ; compiler's 8-way destination join refuse with a named code rather than
2073
+ ; guess. Textures, samplers, storage buffers and vertex buffers are never
2074
+ ; synthesized. This is pure emitter inference, not a lowering hook: there
2075
+ ; is no `:lowering` and no sugar-ledger row.
2076
+ (key :name auto-uniforms :type boolean :default false
2077
+ :description "Synthesize an ordinary buffer + entry for every reflected fixed-size uniform binding at this group's :group that a binding pipeline reaches and no explicit (entry …) claims. Explicit entries win; unclaimed non-uniform bindings, incompatible layout variants, name collisions and slots past the compiler's 8-way destination join refuse. Pure emitter inference: no lowering hook.")
1821
2078
  ; Slot-local entry form: `(entry :binding N :buffer|:sampler|:texture|:texture-view R)`.
1822
2079
  ; Resolved LOCAL-FIRST under bind-group, so this `entry` is distinct from the
1823
2080
  ; bind-group-layout's entry. (A global `entry` stand-in used to sit above
@@ -2167,9 +2424,9 @@
2167
2424
  (form :name color-attachment
2168
2425
  :description "One color target of a render pass."
2169
2426
  (key :name view :type attachment-view
2170
- :description "Texture written by this pass: the canvas (context-current-texture) or a (texture …).")
2427
+ :description "Attachment written by this pass: the canvas (context-current-texture), a (texture …) (its default view), or a (texture-view …) selecting one mip level and one array layer.")
2171
2428
  (key :name resolve-target :type attachment-view :optional true
2172
- :description "Receives the resolved single-sample output when :view is multisampled.")
2429
+ :description "Receives the resolved single-sample output when :view is multisampled — the canvas, a (texture …), or a (texture-view …) selecting one mip level and one array layer.")
2173
2430
  (key :name clear-value :type clear-color :optional true
2174
2431
  :description "RGBA the attachment is cleared to when load-op is clear (WebGPU default: transparent black). Stating one beside `:load-op load` is an error — WebGPU would ignore it.")
2175
2432
  ; REQUIRED, matching GPURenderPassColorAttachment.loadOp/storeOp. WebGPU has
@@ -2204,8 +2461,8 @@
2204
2461
  ; document. The emitter says it instead, with a span on the attachment.
2205
2462
  (form :name depth-stencil-attachment
2206
2463
  :description "Depth/stencil target of a render pass."
2207
- (key :name view :type texture-ref
2208
- :description "The depth/stencil (texture …) this pass tests/writes against.")
2464
+ (key :name view :type depth-attachment-view
2465
+ :description "The depth/stencil (texture …) or (texture-view …) this pass tests/writes against. The canvas is not a depth attachment.")
2209
2466
  (key :name depth-clear-value :type unorm :optional true
2210
2467
  :description "Depth cleared to when depth-load-op is clear, in [0,1]. Required when it clears — WebGPU has no default for it — and rejected beside `:depth-load-op load`.")
2211
2468
  (key :name depth-load-op :type load-op :optional true
@@ -2389,8 +2646,8 @@
2389
2646
  (form :name frame
2390
2647
  :description "Frame program: what runs each frame, in order."
2391
2648
  (key :name name :type symbol)
2392
- (key :name init :type compute-pass-ref-list :optional true
2393
- :description "One-shot (init …) steps run on the first frame only (each lowers to a compute-pass of the same name).")
2649
+ (key :name init :type init-step-list :optional true
2650
+ :description "One-time steps, run once per loaded payload in this order and before any recurring work: a (queue …) (its actions are lowered to a generated one-shot compute pass), an offscreen (render-pass …), a (compute-pass …) or an (init …) (which lowers to one), or a named group of those forms. Refused: a canvas target or canvas-sized storage binding (including through a replayed render bundle), a guarded group or (select …), a step also reached from :before/:perform, a group cycle, a generated-name collision, a runtime-provided write source (pngine-inputs, scene-time-inputs, pngine-frame-inputs, pointer-inputs), an upload whose asset does not resolve, and a legal group fan-out that exceeds the emitter's walk budget.")
2394
2651
  (key :name before :type queue-ref-list :optional true
2395
2652
  :description "(queue …) ops run before each frame's passes.")
2396
2653
  (key :name perform :type frame-step-list
@@ -2455,6 +2712,34 @@
2455
2712
  (key :name else :type frame-step-list :optional true
2456
2713
  :description "The steps that run when no case holds. Becomes the last group's :else, so it is the chain's fallback arm."))
2457
2714
 
2715
+ ; =====================================================================
2716
+ ; `(mip-chain …)` sugar — lowered to a render-pass chain by
2717
+ ; pngine/mips-v1 (plan 08)
2718
+ ; =====================================================================
2719
+ ; A mip chain is ordinary resources and ordinary scheduling: the hook emits
2720
+ ; a sampled/attachment (texture-view …) pair per generated level, one linear
2721
+ ; sampler, one fullscreen module/pipeline for the texture's format, a bind
2722
+ ; group and render pass per level, and one named `(step-group …)` holding
2723
+ ; those passes in ascending order. The author schedules that group in a
2724
+ ; frame like any other step and queues the level-0 write before it; nothing
2725
+ ; runs at load time and no once-only side channel is created.
2726
+ ;
2727
+ ; The descriptor checks are the hook's, not the schema's (they relate keys
2728
+ ; to a sibling `(texture …)`): 2d, one sample, one layer, not pooled, at
2729
+ ; least two mip levels, sampled AND attachable, and a format that is both
2730
+ ; filterable and color-renderable without an optional feature. A one-level
2731
+ ; texture is `nothing-to-generate` rather than an empty group.
2732
+ (form :name mip-chain
2733
+ :description "Generate a (texture …)'s mip levels from level 0 with a named step-group of ordinary render passes. Sugar: pngine/mips-v1."
2734
+ :lowering (lowering :hook pngine/mips-v1
2735
+ :produces [texture-view sampler shader-module render-pipeline vertex
2736
+ fragment color-target bind-group entry render-pass
2737
+ color-attachment draw step-group])
2738
+ (key :name name :type symbol
2739
+ :description "The generated step-group's name. A (frame …) performs it like any other step, after the step that writes level 0.")
2740
+ (key :name texture :type texture-ref
2741
+ :description "The (texture …) whose levels 1..mip-level-count-1 the chain generates. Level 0 is an input and is never overwritten; the texture must be 2d, one-sample, one-layer, non-pooled, sampled and renderable, with a filterable color format."))
2742
+
2458
2743
 
2459
2744
  ; ---- init sugar: lowered to compute-pipeline + bind-group + compute-pass ----
2460
2745
  (form :name init
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "format": "animader-toolchain/1",
3
- "toolchainVersion": "0.6.0",
3
+ "toolchainVersion": "0.7.0",
4
4
  "target": {
5
5
  "os": "darwin",
6
6
  "arch": "arm64"
7
7
  },
8
- "createdAt": "2026-11-13T23:17:57.521Z",
8
+ "createdAt": "2026-12-04T21:53:22.317Z",
9
9
  "producers": {
10
10
  "animader": {
11
- "version": "0.6.0",
12
- "revision": "bc34e4050ac75813dac5c6eba71f948d9d473d96"
11
+ "version": "0.7.0",
12
+ "revision": "2bd4e0ab75e8b72aad1a4714451e6f293f9fbdde"
13
13
  },
14
14
  "pngine": {
15
- "version": "4.3.1",
16
- "revision": "10f7a26362aa471c83ddfdfd43b953d3fcbacf67"
15
+ "version": "4.5.0",
16
+ "revision": "55570e7d7b1afdf94a2e42306b9dd8d1dbcc9ea6"
17
17
  },
18
18
  "pacer": {
19
19
  "version": "0.2.0",
@@ -177,21 +177,21 @@
177
177
  "path": "pngine.mjs",
178
178
  "package": "pngine",
179
179
  "spec": "pngine/viewer",
180
- "sha256": "b7117348bf7500e6831c3be5b3a17bb7b75c574608496f56fcb820b247bde9fe",
181
- "bytes": 63956
180
+ "sha256": "1198991325ae8550fc054825515ed49892ca67fb3e78d1e5cc617519e7ef9d9d",
181
+ "bytes": 145385
182
182
  }
183
183
  ],
184
184
  "pngineCore": {
185
185
  "spec": "pngine/core",
186
- "sha256": "0777b7722c9a96be724ab8a1b1375c8780b616a4dd14c09a32c6205135ace8ee",
187
- "bytes": 32261
186
+ "sha256": "06076c06aaef40d0da7cb663e5762d679cb419cb9a9b6929cc7775c9d917a232",
187
+ "bytes": 96615
188
188
  },
189
189
  "tools": {
190
190
  "pngineCli": {
191
191
  "package": "@pngine/darwin-arm64",
192
192
  "file": "bin/pngine",
193
- "sha256": "4ee656c5c39ce15505054dd827ae0f04e9936867de7f41d34f67a21ff5e205a0",
194
- "bytes": 4724104
193
+ "sha256": "531e460c85b996f086342a5efe4c64e686fcfd29ddad5b397b2764632be98405",
194
+ "bytes": 6464376
195
195
  },
196
196
  "pacerCli": {
197
197
  "package": "@mr_hugo/pacer-darwin-arm64",
@@ -204,9 +204,9 @@
204
204
  "uniformTypeName": {
205
205
  "file": "toolchain/uniform-type-name.js",
206
206
  "source": "pngine npm/pngine/src/uniform-convert.js",
207
- "sha256": "a99ae669ad1e306e531a4261eae3403b1b92ed41ea37556cc25ab41f5911037b",
208
- "bytes": 9018
207
+ "sha256": "f57fb6912e43b2c46753cf6ab5cc207442bcdbe7af9db49e31a61b32fd41e1c0",
208
+ "bytes": 9105
209
209
  }
210
210
  },
211
- "digest": "646d2b186989c2b0a967ee3326de3cf2131da025dee6b7b15bfcabf731851fd7"
211
+ "digest": "7c18a5c409856fb68a3d1771e86aaa0b7b9d8174b0ace916ea22bf3870a596c3"
212
212
  }
@@ -99,7 +99,7 @@ export function describeUniforms(uniforms, buffers) {
99
99
  * are 16-byte multiples, so elements are padded, not packed). Accepts flat
100
100
  * ([1,2,3,4,5,6]) or nested ([[1,2,3],[4,5,6]]) input; missing trailing
101
101
  * elements stay zero. Exported for tests/npm/gpu-uniform-arrays.test.js.
102
- * @param {number|number[]|number[][]} value
102
+ * @param {unknown} value - a number, flat/nested numbers, or any value the public API may carry (the caller owns shape validation)
103
103
  * @param {number} uniformType - UniformType enum value (the ELEMENT type for arrays)
104
104
  * @param {number} size - Expected byte size (TOTAL array bytes for arrays)
105
105
  * @param {number} [elemCount] - Array element count; 0/undefined = not an array