@aardworx/wombat.rendering 0.9.11 → 0.9.13

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.
Files changed (79) hide show
  1. package/dist/runtime/derivedUniforms/codegen.d.ts +8 -0
  2. package/dist/runtime/derivedUniforms/codegen.d.ts.map +1 -0
  3. package/dist/runtime/derivedUniforms/codegen.js +449 -0
  4. package/dist/runtime/derivedUniforms/codegen.js.map +1 -0
  5. package/dist/runtime/derivedUniforms/dispatch.d.ts +14 -93
  6. package/dist/runtime/derivedUniforms/dispatch.d.ts.map +1 -1
  7. package/dist/runtime/derivedUniforms/dispatch.js +123 -299
  8. package/dist/runtime/derivedUniforms/dispatch.js.map +1 -1
  9. package/dist/runtime/derivedUniforms/flatten.d.ts +25 -0
  10. package/dist/runtime/derivedUniforms/flatten.d.ts.map +1 -0
  11. package/dist/runtime/derivedUniforms/flatten.js +71 -0
  12. package/dist/runtime/derivedUniforms/flatten.js.map +1 -0
  13. package/dist/runtime/derivedUniforms/index.d.ts +10 -5
  14. package/dist/runtime/derivedUniforms/index.d.ts.map +1 -1
  15. package/dist/runtime/derivedUniforms/index.js +24 -19
  16. package/dist/runtime/derivedUniforms/index.js.map +1 -1
  17. package/dist/runtime/derivedUniforms/marker.d.ts +76 -0
  18. package/dist/runtime/derivedUniforms/marker.d.ts.map +1 -0
  19. package/dist/runtime/derivedUniforms/marker.js +156 -0
  20. package/dist/runtime/derivedUniforms/marker.js.map +1 -0
  21. package/dist/runtime/derivedUniforms/recipes.d.ts +6 -41
  22. package/dist/runtime/derivedUniforms/recipes.d.ts.map +1 -1
  23. package/dist/runtime/derivedUniforms/recipes.js +53 -129
  24. package/dist/runtime/derivedUniforms/recipes.js.map +1 -1
  25. package/dist/runtime/derivedUniforms/records.d.ts +40 -0
  26. package/dist/runtime/derivedUniforms/records.d.ts.map +1 -0
  27. package/dist/runtime/derivedUniforms/records.js +151 -0
  28. package/dist/runtime/derivedUniforms/records.js.map +1 -0
  29. package/dist/runtime/derivedUniforms/registry.d.ts +33 -0
  30. package/dist/runtime/derivedUniforms/registry.d.ts.map +1 -0
  31. package/dist/runtime/derivedUniforms/registry.js +58 -0
  32. package/dist/runtime/derivedUniforms/registry.js.map +1 -0
  33. package/dist/runtime/derivedUniforms/rule.d.ts +26 -0
  34. package/dist/runtime/derivedUniforms/rule.d.ts.map +1 -0
  35. package/dist/runtime/derivedUniforms/rule.js +35 -0
  36. package/dist/runtime/derivedUniforms/rule.js.map +1 -0
  37. package/dist/runtime/derivedUniforms/sceneIntegration.d.ts +34 -33
  38. package/dist/runtime/derivedUniforms/sceneIntegration.d.ts.map +1 -1
  39. package/dist/runtime/derivedUniforms/sceneIntegration.js +80 -90
  40. package/dist/runtime/derivedUniforms/sceneIntegration.js.map +1 -1
  41. package/dist/runtime/heapScene.d.ts.map +1 -1
  42. package/dist/runtime/heapScene.js +78 -26
  43. package/dist/runtime/heapScene.js.map +1 -1
  44. package/dist/runtime/hybridScene.js +1 -1
  45. package/dist/runtime/hybridScene.js.map +1 -1
  46. package/dist/runtime/index.d.ts +1 -0
  47. package/dist/runtime/index.d.ts.map +1 -1
  48. package/dist/runtime/index.js +2 -0
  49. package/dist/runtime/index.js.map +1 -1
  50. package/dist/runtime/renderTask.js +1 -1
  51. package/dist/runtime/renderTask.js.map +1 -1
  52. package/dist/runtime/runtime.js +1 -1
  53. package/dist/runtime/runtime.js.map +1 -1
  54. package/package.json +1 -1
  55. package/src/runtime/derivedUniforms/codegen.ts +477 -0
  56. package/src/runtime/derivedUniforms/dispatch.ts +135 -341
  57. package/src/runtime/derivedUniforms/flatten.ts +89 -0
  58. package/src/runtime/derivedUniforms/index.ts +50 -34
  59. package/src/runtime/derivedUniforms/marker.ts +169 -0
  60. package/src/runtime/derivedUniforms/recipes.ts +63 -155
  61. package/src/runtime/derivedUniforms/records.ts +158 -0
  62. package/src/runtime/derivedUniforms/registry.ts +77 -0
  63. package/src/runtime/derivedUniforms/rule.ts +59 -0
  64. package/src/runtime/derivedUniforms/sceneIntegration.ts +115 -149
  65. package/src/runtime/heapScene.ts +77 -28
  66. package/src/runtime/hybridScene.ts +1 -1
  67. package/src/runtime/index.ts +8 -0
  68. package/src/runtime/renderTask.ts +1 -1
  69. package/src/runtime/runtime.ts +1 -1
  70. package/dist/runtime/derivedUniforms/slotId.d.ts +0 -15
  71. package/dist/runtime/derivedUniforms/slotId.d.ts.map +0 -1
  72. package/dist/runtime/derivedUniforms/slotId.js +0 -30
  73. package/dist/runtime/derivedUniforms/slotId.js.map +0 -1
  74. package/dist/runtime/derivedUniforms/uberKernel.wgsl.d.ts +0 -13
  75. package/dist/runtime/derivedUniforms/uberKernel.wgsl.d.ts.map +0 -1
  76. package/dist/runtime/derivedUniforms/uberKernel.wgsl.js +0 -218
  77. package/dist/runtime/derivedUniforms/uberKernel.wgsl.js.map +0 -1
  78. package/src/runtime/derivedUniforms/slotId.ts +0 -35
  79. package/src/runtime/derivedUniforms/uberKernel.wgsl.ts +0 -220
@@ -1 +1 @@
1
- {"version":3,"file":"recipes.js","sourceRoot":"","sources":["../../../src/runtime/derivedUniforms/recipes.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,kEAAkE;AAClE,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,2DAA2D;AAC3D,EAAE;AACF,wDAAwD;AACxD,gEAAgE;AAEhE,2EAA2E;AAC3E,MAAM,CAAN,IAAkB,QA6BjB;AA7BD,WAAkB,QAAQ;IACxB,4BAA4B;IAC5B,mDAAyB,CAAA;IACzB,4BAA4B;IAC5B,yDAAyB,CAAA;IACzB,yCAAyC;IACzC,uDAAyB,CAAA;IAEzB,uCAAuC;IACvC,2DAAyB,CAAA;IACzB,uCAAuC;IACvC,iEAAyB,CAAA;IACzB,kDAAkD;IAClD,mEAAyB,CAAA;IACzB,kDAAkD;IAClD,yEAAyB,CAAA;IAEzB,2BAA2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KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAE7D,wCAAwC;IACxC,CAAC,cAAc,EAAE,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;CACnE,CAAC,CAAC;AAEH,uFAAuF;AACvF,MAAM,CAAC,MAAM,qBAAqB,GAAgC,IAAI,GAAG,CAAC;IACxE,CAAC,OAAO,EAAE,YAAY,CAAC;IACvB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,MAAM,EAAE,WAAW,CAAC;CACtB,CAAC,CAAC;AAEH,MAAM,UAAU,qBAAqB,CAAC,IAAY;IAChD,OAAO,sBAAsB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,40 @@
1
+ /** Tagged-handle source bindings (top 3 bits of an in_slot / out_slot word). */
2
+ export declare const enum SlotTag {
3
+ /** Constituent slot — a Trafo3d half in df32 storage. Payload = slot index. */
4
+ Constituent = 0,
5
+ /** A host uniform on the same RO — payload = its data byte offset in the main heap. Also used for the output.
6
+ * There is no separate "global" tag: whether a uniform is global is a per-RO fact (the sg can override it
7
+ * anywhere), so anything that isn't a constituent trafo resolves to this; a uniform that's the same on every
8
+ * RO is the same aval ⇒ the UniformPool interns it to one heap slot anyway. */
9
+ HostHeap = 1
10
+ }
11
+ export declare function makeHandle(tag: SlotTag, payload: number): number;
12
+ export declare function handleTag(h: number): SlotTag;
13
+ export declare function handlePayload(h: number): number;
14
+ /** Owner key — typically the RenderObject (or any stable object). */
15
+ export type RecordOwner = object;
16
+ export declare class RecordsBuffer {
17
+ private buf;
18
+ private owners;
19
+ private readonly byOwner;
20
+ private strideU32;
21
+ private count;
22
+ /** Bumps whenever the byte layout changes shape (stride growth) so the dispatcher recompiles. */
23
+ layoutVersion: number;
24
+ /** Bumps on every mutation (add / remove / stride growth) so the dispatcher knows to re-upload. */
25
+ generation: number;
26
+ constructor(initialCapacityRecords?: number);
27
+ get recordCount(): number;
28
+ get strideWords(): number;
29
+ get strideBytes(): number;
30
+ /** The packed record data, exactly `recordCount * strideWords` long. Upload this. */
31
+ get data(): Uint32Array;
32
+ /** Append a record. Returns its index. `inSlots` length may exceed the current stride (triggers growth). */
33
+ add(owner: RecordOwner, ruleId: number, outSlot: number, inSlots: readonly number[]): number;
34
+ /** Remove every record owned by `owner` (swap-remove against the tail). */
35
+ removeAllForOwner(owner: RecordOwner): void;
36
+ private removeAt;
37
+ private ensureCapacity;
38
+ private growStride;
39
+ }
40
+ //# sourceMappingURL=records.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../../src/runtime/derivedUniforms/records.ts"],"names":[],"mappings":"AAcA,gFAAgF;AAChF,0BAAkB,OAAO;IACvB,+EAA+E;IAC/E,WAAW,IAAI;IACf;;;oFAGgF;IAChF,QAAQ,IAAI;CAEb;AAKD,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAKhE;AACD,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAE5C;AACD,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,qEAAqE;AACrE,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAIjC,qBAAa,aAAa;IACxB,OAAO,CAAC,GAAG,CAAc;IACzB,OAAO,CAAC,MAAM,CAAmC;IACjD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuC;IAC/D,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,KAAK,CAAK;IAClB,iGAAiG;IACjG,aAAa,SAAK;IAClB,mGAAmG;IACnG,UAAU,SAAK;gBAEH,sBAAsB,SAAM;IAIxC,IAAI,WAAW,IAAI,MAAM,CAExB;IACD,IAAI,WAAW,IAAI,MAAM,CAExB;IACD,IAAI,WAAW,IAAI,MAAM,CAExB;IACD,qFAAqF;IACrF,IAAI,IAAI,IAAI,WAAW,CAEtB;IAED,4GAA4G;IAC5G,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM;IAqB5F,2EAA2E;IAC3E,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAc3C,OAAO,CAAC,QAAQ;IAoBhB,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,UAAU;CAcnB"}
@@ -0,0 +1,151 @@
1
+ // §7 v2 — derived-uniform records buffer (CPU-side authoring; uploaded to a GPU storage buffer).
2
+ //
3
+ // One record per derived-uniform instance (one per (RenderObject, derived name)):
4
+ // [ rule_id, out_slot, in_slot[0], in_slot[1], … ]
5
+ // `out_slot` / each `in_slot` is a tagged 32-bit handle (see resolveSource):
6
+ // top 3 bits = source binding, low 29 = payload (constituent slot index / drawHeader
7
+ // byte offset).
8
+ //
9
+ // Records are flattened (chains substituted away) ⇒ every record is independent ⇒ the
10
+ // uber-kernel runs one thread per record, no levels. Layout is fixed-stride: STRIDE_U32 =
11
+ // 2 + maxArity. If a higher-arity rule shows up the stride grows and `data` is re-packed
12
+ // (rare; the kernel recompiles on that registry-version bump anyway). Fixed stride ⇒ no
13
+ // separate offsets array, trivial swap-remove. See docs/derived-uniforms-extensible.md.
14
+ /** Tagged-handle source bindings (top 3 bits of an in_slot / out_slot word). */
15
+ export var SlotTag;
16
+ (function (SlotTag) {
17
+ /** Constituent slot — a Trafo3d half in df32 storage. Payload = slot index. */
18
+ SlotTag[SlotTag["Constituent"] = 0] = "Constituent";
19
+ /** A host uniform on the same RO — payload = its data byte offset in the main heap. Also used for the output.
20
+ * There is no separate "global" tag: whether a uniform is global is a per-RO fact (the sg can override it
21
+ * anywhere), so anything that isn't a constituent trafo resolves to this; a uniform that's the same on every
22
+ * RO is the same aval ⇒ the UniformPool interns it to one heap slot anyway. */
23
+ SlotTag[SlotTag["HostHeap"] = 1] = "HostHeap";
24
+ // 2..7 reserved (per-instance attribute arena, indirect df32 pair, …)
25
+ })(SlotTag || (SlotTag = {}));
26
+ const TAG_SHIFT = 29;
27
+ const PAYLOAD_MASK = (1 << TAG_SHIFT) - 1; // 0x1FFFFFFF
28
+ export function makeHandle(tag, payload) {
29
+ if (payload < 0 || payload > PAYLOAD_MASK) {
30
+ throw new Error(`derived records: slot payload ${payload} out of range (max ${PAYLOAD_MASK})`);
31
+ }
32
+ return ((tag << TAG_SHIFT) | payload) >>> 0;
33
+ }
34
+ export function handleTag(h) {
35
+ return (h >>> TAG_SHIFT);
36
+ }
37
+ export function handlePayload(h) {
38
+ return h & PAYLOAD_MASK;
39
+ }
40
+ const MIN_STRIDE_U32 = 5; // rule_id, out_slot, in0, in1, in2 — covers the 13 standard recipes
41
+ export class RecordsBuffer {
42
+ buf;
43
+ owners = [];
44
+ byOwner = new Map();
45
+ strideU32 = MIN_STRIDE_U32;
46
+ count = 0;
47
+ /** Bumps whenever the byte layout changes shape (stride growth) so the dispatcher recompiles. */
48
+ layoutVersion = 0;
49
+ /** Bumps on every mutation (add / remove / stride growth) so the dispatcher knows to re-upload. */
50
+ generation = 0;
51
+ constructor(initialCapacityRecords = 256) {
52
+ this.buf = new Uint32Array(Math.max(1, initialCapacityRecords) * this.strideU32);
53
+ }
54
+ get recordCount() {
55
+ return this.count;
56
+ }
57
+ get strideWords() {
58
+ return this.strideU32;
59
+ }
60
+ get strideBytes() {
61
+ return this.strideU32 * 4;
62
+ }
63
+ /** The packed record data, exactly `recordCount * strideWords` long. Upload this. */
64
+ get data() {
65
+ return this.buf.subarray(0, this.count * this.strideU32);
66
+ }
67
+ /** Append a record. Returns its index. `inSlots` length may exceed the current stride (triggers growth). */
68
+ add(owner, ruleId, outSlot, inSlots) {
69
+ const need = 2 + inSlots.length;
70
+ if (need > this.strideU32)
71
+ this.growStride(need);
72
+ this.ensureCapacity(this.count + 1);
73
+ const idx = this.count++;
74
+ const base = idx * this.strideU32;
75
+ this.buf[base] = ruleId >>> 0;
76
+ this.buf[base + 1] = outSlot >>> 0;
77
+ for (let i = 0; i < inSlots.length; i++)
78
+ this.buf[base + 2 + i] = inSlots[i] >>> 0;
79
+ for (let i = base + 2 + inSlots.length; i < base + this.strideU32; i++)
80
+ this.buf[i] = 0;
81
+ this.owners[idx] = owner;
82
+ let set = this.byOwner.get(owner);
83
+ if (set === undefined) {
84
+ set = new Set();
85
+ this.byOwner.set(owner, set);
86
+ }
87
+ set.add(idx);
88
+ this.generation++;
89
+ return idx;
90
+ }
91
+ /** Remove every record owned by `owner` (swap-remove against the tail). */
92
+ removeAllForOwner(owner) {
93
+ const set = this.byOwner.get(owner);
94
+ if (set === undefined || set.size === 0) {
95
+ this.byOwner.delete(owner);
96
+ return;
97
+ }
98
+ // Process highest indices first so a swap can never move a not-yet-removed
99
+ // record of this owner that we still hold a stale index for.
100
+ const indices = [...set].sort((a, b) => b - a);
101
+ for (const idx of indices)
102
+ this.removeAt(idx);
103
+ this.byOwner.delete(owner);
104
+ this.generation++;
105
+ }
106
+ removeAt(idx) {
107
+ const last = this.count - 1;
108
+ // The record currently at `idx` is the one being removed.
109
+ this.byOwner.get(this.owners[idx])?.delete(idx);
110
+ if (idx !== last) {
111
+ // Move the tail record's words into the hole, and re-home it.
112
+ const dst = idx * this.strideU32;
113
+ const src = last * this.strideU32;
114
+ this.buf.copyWithin(dst, src, src + this.strideU32);
115
+ const lastOwner = this.owners[last];
116
+ const lset = this.byOwner.get(lastOwner);
117
+ lset.delete(last);
118
+ lset.add(idx);
119
+ this.owners[idx] = lastOwner;
120
+ }
121
+ this.owners[last] = undefined;
122
+ this.owners.length = last;
123
+ this.count = last;
124
+ }
125
+ ensureCapacity(records) {
126
+ const needWords = records * this.strideU32;
127
+ if (needWords <= this.buf.length)
128
+ return;
129
+ let cap = Math.max(1, this.buf.length);
130
+ while (cap < needWords)
131
+ cap *= 2;
132
+ const next = new Uint32Array(cap);
133
+ next.set(this.buf);
134
+ this.buf = next;
135
+ }
136
+ growStride(newStride) {
137
+ const old = this.strideU32;
138
+ const next = new Uint32Array(Math.max(this.buf.length, this.count * newStride));
139
+ for (let i = 0; i < this.count; i++) {
140
+ const o = i * old;
141
+ const n = i * newStride;
142
+ next.set(this.buf.subarray(o, o + old), n);
143
+ // remaining words already zero
144
+ }
145
+ this.buf = next;
146
+ this.strideU32 = newStride;
147
+ this.layoutVersion++;
148
+ this.generation++;
149
+ }
150
+ }
151
+ //# sourceMappingURL=records.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"records.js","sourceRoot":"","sources":["../../../src/runtime/derivedUniforms/records.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,EAAE;AACF,kFAAkF;AAClF,qDAAqD;AACrD,6EAA6E;AAC7E,uFAAuF;AACvF,kBAAkB;AAClB,EAAE;AACF,sFAAsF;AACtF,0FAA0F;AAC1F,yFAAyF;AACzF,wFAAwF;AACxF,wFAAwF;AAExF,gFAAgF;AAChF,MAAM,CAAN,IAAkB,OASjB;AATD,WAAkB,OAAO;IACvB,+EAA+E;IAC/E,mDAAe,CAAA;IACf;;;oFAGgF;IAChF,6CAAY,CAAA;IACZ,sEAAsE;AACxE,CAAC,EATiB,OAAO,KAAP,OAAO,QASxB;AAED,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,aAAa;AAExD,MAAM,UAAU,UAAU,CAAC,GAAY,EAAE,OAAe;IACtD,IAAI,OAAO,GAAG,CAAC,IAAI,OAAO,GAAG,YAAY,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,iCAAiC,OAAO,sBAAsB,YAAY,GAAG,CAAC,CAAC;IACjG,CAAC;IACD,OAAO,CAAC,CAAC,GAAG,IAAI,SAAS,CAAC,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,EAAE,EAAE,CAAC;YACpC,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;YAClB,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;YACxB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;YAC3C,+BAA+B;QACjC,CAAC;QACD,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAChB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;CACF"}
@@ -0,0 +1,33 @@
1
+ import type { Expr, Type } from "@aardworx/wombat.shader/ir";
2
+ import type { DerivedRule } from "./rule.js";
3
+ import { type RuleInput } from "./flatten.js";
4
+ export interface RuleEntry {
5
+ /** Monotonic id — the value the uber-kernel `switch`es on. Never reused. */
6
+ readonly id: number;
7
+ /** Flattened IR (reads only non-derived inputs). */
8
+ readonly ir: Expr;
9
+ readonly outputType: Type;
10
+ /** Distinct inputs of `ir`, sorted by name — defines the switch-arm argument order. */
11
+ readonly inputs: readonly RuleInput[];
12
+ refcount: number;
13
+ }
14
+ export declare class DerivedUniformRegistry {
15
+ private readonly byHash;
16
+ private readonly byId;
17
+ private nextId;
18
+ /** Bumps on every `register` that finds a NEW hash. */
19
+ version: number;
20
+ /**
21
+ * Register a flattened rule. Returns its stable id. Idempotent per hash
22
+ * (just bumps the refcount); a new hash allocates an id and bumps `version`.
23
+ */
24
+ register(rule: DerivedRule): number;
25
+ /** Drop one reference. v0: never sweeps — kept for forward-compat with v1 GC. */
26
+ release(hash: string): void;
27
+ get(id: number): RuleEntry | undefined;
28
+ getByHash(hash: string): RuleEntry | undefined;
29
+ /** All entries in id order — the codegen's switch-arm list. */
30
+ entries(): RuleEntry[];
31
+ get size(): number;
32
+ }
33
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/runtime/derivedUniforms/registry.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAExD,MAAM,WAAW,SAAS;IACxB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAClB,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC;IAC1B,uFAAuF;IACvF,QAAQ,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgC;IACvD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAgC;IACrD,OAAO,CAAC,MAAM,CAAK;IACnB,uDAAuD;IACvD,OAAO,SAAK;IAEZ;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM;IAmBnC,iFAAiF;IACjF,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAK3B,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAItC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAI9C,+DAA+D;IAC/D,OAAO,IAAI,SAAS,EAAE;IAItB,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF"}
@@ -0,0 +1,58 @@
1
+ // §7 v2 — derived-uniform rule registry.
2
+ //
3
+ // Content-hash–keyed table of FLATTENED rules. `register` dedups on the
4
+ // flattened IR's hash, assigns a monotonic id (never reused), and bumps
5
+ // `version` whenever a new unique rule appears so the dispatcher knows to
6
+ // recompile its uber-kernel. v0 never sweeps dead entries (a stale rule's
7
+ // switch arm just goes unused — bytes per rule). See
8
+ // docs/derived-uniforms-extensible.md § "Registry" / "Lifecycle".
9
+ import { inputsOf } from "./flatten.js";
10
+ export class DerivedUniformRegistry {
11
+ byHash = new Map();
12
+ byId = new Map();
13
+ nextId = 0;
14
+ /** Bumps on every `register` that finds a NEW hash. */
15
+ version = 0;
16
+ /**
17
+ * Register a flattened rule. Returns its stable id. Idempotent per hash
18
+ * (just bumps the refcount); a new hash allocates an id and bumps `version`.
19
+ */
20
+ register(rule) {
21
+ const cached = this.byHash.get(rule.hash);
22
+ if (cached !== undefined) {
23
+ cached.refcount++;
24
+ return cached.id;
25
+ }
26
+ const entry = {
27
+ id: this.nextId++,
28
+ ir: rule.ir,
29
+ outputType: rule.outputType,
30
+ inputs: inputsOf(rule.ir),
31
+ refcount: 1,
32
+ };
33
+ this.byHash.set(rule.hash, entry);
34
+ this.byId.set(entry.id, entry);
35
+ this.version++;
36
+ return entry.id;
37
+ }
38
+ /** Drop one reference. v0: never sweeps — kept for forward-compat with v1 GC. */
39
+ release(hash) {
40
+ const entry = this.byHash.get(hash);
41
+ if (entry !== undefined && entry.refcount > 0)
42
+ entry.refcount--;
43
+ }
44
+ get(id) {
45
+ return this.byId.get(id);
46
+ }
47
+ getByHash(hash) {
48
+ return this.byHash.get(hash);
49
+ }
50
+ /** All entries in id order — the codegen's switch-arm list. */
51
+ entries() {
52
+ return [...this.byId.values()].sort((a, b) => a.id - b.id);
53
+ }
54
+ get size() {
55
+ return this.byId.size;
56
+ }
57
+ }
58
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/runtime/derivedUniforms/registry.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,EAAE;AACF,wEAAwE;AACxE,wEAAwE;AACxE,0EAA0E;AAC1E,0E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,CAAC;IAClE,CAAC;IAED,GAAG,CAAC,EAAU;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;IAED,SAAS,CAAC,IAAY;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,+DAA+D;IAC/D,OAAO;QACL,OAAO,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;IACxB,CAAC;CACF"}
@@ -0,0 +1,26 @@
1
+ import type { Expr, Type } from "@aardworx/wombat.shader/ir";
2
+ /** A rule's IR fragment: the result expression, over `ReadInput("Uniform", …)` leaves. */
3
+ export type IRFragment = Expr;
4
+ export interface DerivedRule<T = unknown> {
5
+ /** Brand — lets `isDerivedRule` recognise a rule among uniform binding values. */
6
+ readonly __derivedRule: true;
7
+ /** Output WGSL type (`=== ir.type`). Drives the storer codegen and the drawHeader byte budget. */
8
+ readonly outputType: Type;
9
+ /** Pure IR computing the output; every leaf input is a `ReadInput("Uniform", name)`. */
10
+ readonly ir: IRFragment;
11
+ /** Stable structural content hash of `ir` — the registry dedup key. */
12
+ readonly hash: string;
13
+ /** Phantom — carries the TS result type through `derivedUniform<T>`. Never read. */
14
+ readonly __t?: T;
15
+ }
16
+ /** True iff `x` is a derived-uniform rule (vs. an `aval` / constant value). */
17
+ export declare function isDerivedRule(x: unknown): x is DerivedRule;
18
+ /** True iff two IR `Type`s are structurally identical. */
19
+ export declare function sameType(a: Type, b: Type): boolean;
20
+ /** Stable content hash of an IR expression. */
21
+ export declare function hashIR(ir: Expr): string;
22
+ /** Build a `DerivedRule` from a hand-constructed IR expression. */
23
+ export declare function ruleFromIR<T = unknown>(ir: Expr, outputType?: Type): DerivedRule<T>;
24
+ /** A `ReadInput("Uniform", name)` leaf of the given type — the only leaf kind a rule may use. */
25
+ export declare function uniformRef(name: string, type: Type): Expr;
26
+ //# sourceMappingURL=rule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule.d.ts","sourceRoot":"","sources":["../../../src/runtime/derivedUniforms/rule.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAG7D,0FAA0F;AAC1F,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC;AAE9B,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,OAAO;IACtC,kFAAkF;IAClF,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC;IAC7B,kGAAkG;IAClG,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC;IAC1B,wFAAwF;IACxF,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC;IACxB,uEAAuE;IACvE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oFAAoF;IACpF,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;CAClB;AAED,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,WAAW,CAE1D;AAED,0DAA0D;AAC1D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,OAAO,CAElD;AAED,+CAA+C;AAC/C,wBAAgB,MAAM,CAAC,EAAE,EAAE,IAAI,GAAG,MAAM,CAEvC;AAED,mEAAmE;AACnE,wBAAgB,UAAU,CAAC,CAAC,GAAG,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,GAAE,IAAc,GAAG,WAAW,CAAC,CAAC,CAAC,CAO5F;AAED,iGAAiG;AACjG,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAEzD"}
@@ -0,0 +1,35 @@
1
+ // §7 v2 — derived-uniform rule: a content-hashed pure IR fragment.
2
+ //
3
+ // A DerivedRule is a closure-shaped value: an output WGSL type plus an IR
4
+ // expression ("ir") that computes it from `ReadInput("Uniform", name)` leaves.
5
+ // The names are resolved per-RenderObject at registration time (constituent
6
+ // slot / host uniform). See docs/derived-uniforms-extensible.md.
7
+ //
8
+ // This is the pre-plugin surface: rules are hand-built from IR exprs. The
9
+ // inline `derivedUniform(u => …)` marker (lowered by the wombat-shader-vite
10
+ // plugin) lands later and produces exactly this shape.
11
+ import { hashValue, stableStringify } from "@aardworx/wombat.shader/ir";
12
+ /** True iff `x` is a derived-uniform rule (vs. an `aval` / constant value). */
13
+ export function isDerivedRule(x) {
14
+ return typeof x === "object" && x !== null && x.__derivedRule === true;
15
+ }
16
+ /** True iff two IR `Type`s are structurally identical. */
17
+ export function sameType(a, b) {
18
+ return a === b || stableStringify(a) === stableStringify(b);
19
+ }
20
+ /** Stable content hash of an IR expression. */
21
+ export function hashIR(ir) {
22
+ return hashValue(ir);
23
+ }
24
+ /** Build a `DerivedRule` from a hand-constructed IR expression. */
25
+ export function ruleFromIR(ir, outputType = ir.type) {
26
+ if (!sameType(outputType, ir.type)) {
27
+ throw new Error(`derived rule: declared outputType ${stableStringify(outputType)} != ir type ${stableStringify(ir.type)}`);
28
+ }
29
+ return { __derivedRule: true, outputType, ir, hash: hashIR(ir) };
30
+ }
31
+ /** A `ReadInput("Uniform", name)` leaf of the given type — the only leaf kind a rule may use. */
32
+ export function uniformRef(name, type) {
33
+ return { kind: "ReadInput", scope: "Uniform", name, type };
34
+ }
35
+ //# sourceMappingURL=rule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule.js","sourceRoot":"","sources":["../../../src/runtime/derivedUniforms/rule.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,EAAE;AACF,0EAA0E;AA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1
- import type { aval, IAdaptiveObject } from "@aardworx/wombat.adaptive";
1
+ import type { aval, IAdaptiveObject, AdaptiveToken } from "@aardworx/wombat.adaptive";
2
2
  import type { Trafo3d } from "@aardworx/wombat.base";
3
3
  import { ConstituentSlots, type SlotIndex } from "./slots.js";
4
- import { RecipeId } from "./recipes.js";
5
- import { DerivedUniformsDispatcher, DerivedUniformsPipeline } from "./dispatch.js";
6
- /** Scene-wide §7 state. One per heap scene. Owns the single records
7
- * buffer + dispatcher all buckets share constituents, dirty mask,
8
- * AND main heap (arena.attrs.buffer), so per-bucket records would
9
- * just multiply dispatch overhead for no reason. */
4
+ import { DerivedUniformRegistry } from "./registry.js";
5
+ import { RecordsBuffer } from "./records.js";
6
+ import { DerivedUniformsDispatcher } from "./dispatch.js";
7
+ import { type DerivedRule } from "./rule.js";
8
+ export interface DerivedUniformsSceneOptions {
9
+ readonly initialConstituentSlots?: number;
10
+ }
10
11
  export declare class DerivedUniformsScene {
11
12
  readonly device: GPUDevice;
12
13
  readonly constituents: ConstituentSlots;
13
- readonly pipeline: DerivedUniformsPipeline;
14
+ readonly registry: DerivedUniformRegistry;
15
+ /** Single scene-wide records buffer — all buckets share constituents AND the main heap, so per-bucket records would just multiply dispatch overhead. */
16
+ readonly records: RecordsBuffer;
14
17
  readonly dispatcher: DerivedUniformsDispatcher;
15
- /** Constituents storage GPU buffer (df32 mat4 array). */
18
+ /** Constituents storage GPU buffer (`array<vec2<f32>>` — df32 mat4 halves). */
16
19
  constituentsBuf: GPUBuffer;
17
- /** Caller-owned main heap (arena.attrs.buffer). Updated via
18
- * `rebindMainHeap` on arena resize. */
19
- private mainHeapRef;
20
+ private readonly mainHeapRef;
20
21
  /** Bumped each time a shared GPU buffer is replaced. */
21
22
  bufferEpoch: number;
22
- constructor(device: GPUDevice, mainHeapBuf: GPUBuffer, opts?: {
23
- initialConstituentSlots?: number;
24
- initialRecordCapacity?: number;
25
- });
23
+ constructor(device: GPUDevice, mainHeapBuf: GPUBuffer, opts?: DerivedUniformsSceneOptions);
26
24
  rebindMainHeap(mainHeapBuf: GPUBuffer): void;
27
25
  ensureConstituentsCapacity(requiredBytes: number): void;
28
- /** Routed from heap scene's `inputChanged(t, o)`. Returns true iff
29
- * `o` matched a known constituent aval. */
26
+ /** Routed from the heap scene's `inputChanged(t, o)`. True iff `o` is a tracked trafo aval. */
30
27
  routeInputChanged(o: IAdaptiveObject): boolean;
31
- /** Apply the dirty set: upload changed constituent values. O(changed). */
28
+ /** Drain changed trafo avals (re-subscribes via `getValue`). Call inside the scene's evaluate scope. */
29
+ pullDirty(token: AdaptiveToken): ReadonlySet<SlotIndex>;
30
+ /** Upload the changed constituent value range. O(changed). */
32
31
  uploadDirty(dirty: ReadonlySet<SlotIndex>): void;
32
+ /** Run the uber-kernel. No-op if there are no records. */
33
+ encode(enc: GPUCommandEncoder): boolean;
33
34
  dispose(): void;
34
35
  }
35
- export interface RoTrafoInputs {
36
- readonly modelTrafo?: aval<Trafo3d> | undefined;
37
- readonly viewTrafo?: aval<Trafo3d> | undefined;
38
- readonly projTrafo?: aval<Trafo3d> | undefined;
39
- }
40
36
  export interface RoDerivedRequest {
41
- readonly trafos: RoTrafoInputs;
42
- readonly requiredNames: readonly string[];
43
- readonly byteOffsetByName: ReadonlyMap<string, number>;
37
+ /** Derived rules to install, keyed by the uniform name each produces. */
38
+ readonly rules: ReadonlyMap<string, DerivedRule>;
39
+ /** Trafo avals available on this RO, keyed by the uniform name a rule leaf may reference (e.g. "ModelTrafo"). */
40
+ readonly trafoAvals: ReadonlyMap<string, aval<Trafo3d>>;
41
+ /** drawHeader byte offset (relative to `drawHeaderBaseByte`) of a host-supplied uniform on this RO; undefined if not present. */
42
+ readonly hostUniformOffset: (name: string) => number | undefined;
43
+ /** drawHeader byte offset (relative to `drawHeaderBaseByte`) where each derived output is written; undefined if absent. */
44
+ readonly outputOffset: (name: string) => number | undefined;
45
+ /** Absolute byte offset of this RO's drawHeader within the main heap. */
44
46
  readonly drawHeaderBaseByte: number;
45
47
  }
46
48
  export interface RoRegistration {
47
- /** Per-record handles (RecordsBuffer ids) — passed back to deregister. */
48
- readonly recordIds: readonly number[];
49
+ /** The records-buffer owner key (the RenderObject). */
50
+ readonly owner: object;
49
51
  readonly constituentAvals: readonly aval<Trafo3d>[];
52
+ /** Flattened-rule hashes — for `registry.release` on teardown. */
53
+ readonly ruleHashes: readonly string[];
50
54
  }
51
- /** Register all derived-uniform records for one RO. */
52
- export declare function registerRoDerivations(scene: DerivedUniformsScene, req: RoDerivedRequest): RoRegistration;
55
+ export declare function registerRoDerivations(scene: DerivedUniformsScene, owner: object, req: RoDerivedRequest): RoRegistration;
53
56
  export declare function deregisterRoDerivations(scene: DerivedUniformsScene, reg: RoRegistration): void;
54
- export declare function isDerivedUniformName(name: string): boolean;
55
- export { RecipeId };
56
57
  //# sourceMappingURL=sceneIntegration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sceneIntegration.d.ts","sourceRoot":"","sources":["../../../src/runtime/derivedUniforms/sceneIntegration.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EACL,gBAAgB,EAEyB,KAAK,SAAS,EAExD,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,QAAQ,EAGT,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,yBAAyB,EAAE,uBAAuB,EAEnD,MAAM,eAAe,CAAC;AAEvB;;;qDAGqD;AACrD,qBAAa,oBAAoB;IAC/B,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,gBAAgB,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAM,uBAAuB,CAAC;IAC/C,QAAQ,CAAC,UAAU,EAAI,yBAAyB,CAAC;IACjD,yDAAyD;IACzD,eAAe,EAAE,SAAS,CAAC;I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