@motion-core/motion-gpu 0.4.1 → 0.5.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/README.md +99 -0
- package/dist/advanced.d.ts +1 -0
- package/dist/advanced.d.ts.map +1 -0
- package/dist/advanced.js +14 -6
- package/dist/core/advanced.d.ts +1 -0
- package/dist/core/advanced.d.ts.map +1 -0
- package/dist/core/advanced.js +14 -5
- package/dist/core/compute-shader.d.ts +87 -0
- package/dist/core/compute-shader.d.ts.map +1 -0
- package/dist/core/compute-shader.js +205 -0
- package/dist/core/compute-shader.js.map +1 -0
- package/dist/core/current-value.d.ts +1 -0
- package/dist/core/current-value.d.ts.map +1 -0
- package/dist/core/current-value.js +35 -34
- package/dist/core/current-value.js.map +1 -0
- package/dist/core/error-diagnostics.d.ts +1 -0
- package/dist/core/error-diagnostics.d.ts.map +1 -0
- package/dist/core/error-diagnostics.js +70 -137
- package/dist/core/error-diagnostics.js.map +1 -0
- package/dist/core/error-report.d.ts +2 -1
- package/dist/core/error-report.d.ts.map +1 -0
- package/dist/core/error-report.js +247 -233
- package/dist/core/error-report.js.map +1 -0
- package/dist/core/frame-registry.d.ts +1 -0
- package/dist/core/frame-registry.d.ts.map +1 -0
- package/dist/core/frame-registry.js +546 -662
- package/dist/core/frame-registry.js.map +1 -0
- package/dist/core/index.d.ts +6 -2
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +13 -12
- package/dist/core/material-preprocess.d.ts +1 -0
- package/dist/core/material-preprocess.d.ts.map +1 -0
- package/dist/core/material-preprocess.js +131 -152
- package/dist/core/material-preprocess.js.map +1 -0
- package/dist/core/material.d.ts +23 -6
- package/dist/core/material.d.ts.map +1 -0
- package/dist/core/material.js +290 -317
- package/dist/core/material.js.map +1 -0
- package/dist/core/recompile-policy.d.ts +1 -0
- package/dist/core/recompile-policy.d.ts.map +1 -0
- package/dist/core/recompile-policy.js +18 -13
- package/dist/core/recompile-policy.js.map +1 -0
- package/dist/core/render-graph.d.ts +8 -3
- package/dist/core/render-graph.d.ts.map +1 -0
- package/dist/core/render-graph.js +77 -68
- package/dist/core/render-graph.js.map +1 -0
- package/dist/core/render-targets.d.ts +1 -0
- package/dist/core/render-targets.d.ts.map +1 -0
- package/dist/core/render-targets.js +52 -53
- package/dist/core/render-targets.js.map +1 -0
- package/dist/core/renderer.d.ts +1 -0
- package/dist/core/renderer.d.ts.map +1 -0
- package/dist/core/renderer.js +1337 -1081
- package/dist/core/renderer.js.map +1 -0
- package/dist/core/runtime-loop.d.ts +3 -2
- package/dist/core/runtime-loop.d.ts.map +1 -0
- package/dist/core/runtime-loop.js +353 -362
- package/dist/core/runtime-loop.js.map +1 -0
- package/dist/core/scheduler-helpers.d.ts +1 -0
- package/dist/core/scheduler-helpers.d.ts.map +1 -0
- package/dist/core/scheduler-helpers.js +52 -51
- package/dist/core/scheduler-helpers.js.map +1 -0
- package/dist/core/shader.d.ts +10 -1
- package/dist/core/shader.d.ts.map +1 -0
- package/dist/core/shader.js +109 -115
- package/dist/core/shader.js.map +1 -0
- package/dist/core/storage-buffers.d.ts +37 -0
- package/dist/core/storage-buffers.d.ts.map +1 -0
- package/dist/core/storage-buffers.js +95 -0
- package/dist/core/storage-buffers.js.map +1 -0
- package/dist/core/texture-loader.d.ts +1 -0
- package/dist/core/texture-loader.d.ts.map +1 -0
- package/dist/core/texture-loader.js +209 -273
- package/dist/core/texture-loader.js.map +1 -0
- package/dist/core/textures.d.ts +13 -0
- package/dist/core/textures.d.ts.map +1 -0
- package/dist/core/textures.js +111 -116
- package/dist/core/textures.js.map +1 -0
- package/dist/core/types.d.ts +147 -4
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +0 -4
- package/dist/core/uniforms.d.ts +1 -0
- package/dist/core/uniforms.d.ts.map +1 -0
- package/dist/core/uniforms.js +170 -191
- package/dist/core/uniforms.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -6
- package/dist/passes/BlitPass.d.ts +1 -0
- package/dist/passes/BlitPass.d.ts.map +1 -0
- package/dist/passes/BlitPass.js +23 -18
- package/dist/passes/BlitPass.js.map +1 -0
- package/dist/passes/ComputePass.d.ts +83 -0
- package/dist/passes/ComputePass.d.ts.map +1 -0
- package/dist/passes/ComputePass.js +92 -0
- package/dist/passes/ComputePass.js.map +1 -0
- package/dist/passes/CopyPass.d.ts +1 -0
- package/dist/passes/CopyPass.d.ts.map +1 -0
- package/dist/passes/CopyPass.js +58 -52
- package/dist/passes/CopyPass.js.map +1 -0
- package/dist/passes/FullscreenPass.d.ts +1 -0
- package/dist/passes/FullscreenPass.d.ts.map +1 -0
- package/dist/passes/FullscreenPass.js +127 -130
- package/dist/passes/FullscreenPass.js.map +1 -0
- package/dist/passes/PingPongComputePass.d.ts +104 -0
- package/dist/passes/PingPongComputePass.d.ts.map +1 -0
- package/dist/passes/PingPongComputePass.js +132 -0
- package/dist/passes/PingPongComputePass.js.map +1 -0
- package/dist/passes/ShaderPass.d.ts +1 -0
- package/dist/passes/ShaderPass.d.ts.map +1 -0
- package/dist/passes/ShaderPass.js +41 -37
- package/dist/passes/ShaderPass.js.map +1 -0
- package/dist/passes/index.d.ts +3 -0
- package/dist/passes/index.d.ts.map +1 -0
- package/dist/passes/index.js +6 -3
- package/dist/react/FragCanvas.d.ts +3 -2
- package/dist/react/FragCanvas.d.ts.map +1 -0
- package/dist/react/FragCanvas.js +234 -211
- package/dist/react/FragCanvas.js.map +1 -0
- package/dist/react/MotionGPUErrorOverlay.d.ts +1 -0
- package/dist/react/MotionGPUErrorOverlay.d.ts.map +1 -0
- package/dist/react/MotionGPUErrorOverlay.js +200 -14
- package/dist/react/MotionGPUErrorOverlay.js.map +1 -0
- package/dist/react/Portal.d.ts +1 -0
- package/dist/react/Portal.d.ts.map +1 -0
- package/dist/react/Portal.js +18 -21
- package/dist/react/Portal.js.map +1 -0
- package/dist/react/advanced.d.ts +1 -0
- package/dist/react/advanced.d.ts.map +1 -0
- package/dist/react/advanced.js +14 -6
- package/dist/react/frame-context.d.ts +1 -0
- package/dist/react/frame-context.d.ts.map +1 -0
- package/dist/react/frame-context.js +88 -94
- package/dist/react/frame-context.js.map +1 -0
- package/dist/react/index.d.ts +6 -2
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +12 -9
- package/dist/react/motiongpu-context.d.ts +1 -0
- package/dist/react/motiongpu-context.d.ts.map +1 -0
- package/dist/react/motiongpu-context.js +18 -15
- package/dist/react/motiongpu-context.js.map +1 -0
- package/dist/react/use-motiongpu-user-context.d.ts +1 -0
- package/dist/react/use-motiongpu-user-context.d.ts.map +1 -0
- package/dist/react/use-motiongpu-user-context.js +83 -82
- package/dist/react/use-motiongpu-user-context.js.map +1 -0
- package/dist/react/use-texture.d.ts +1 -0
- package/dist/react/use-texture.d.ts.map +1 -0
- package/dist/react/use-texture.js +132 -152
- package/dist/react/use-texture.js.map +1 -0
- package/dist/svelte/FragCanvas.svelte +2 -2
- package/dist/svelte/FragCanvas.svelte.d.ts +3 -2
- package/dist/svelte/FragCanvas.svelte.d.ts.map +1 -0
- package/dist/svelte/MotionGPUErrorOverlay.svelte +137 -7
- package/dist/svelte/MotionGPUErrorOverlay.svelte.d.ts +1 -0
- package/dist/svelte/MotionGPUErrorOverlay.svelte.d.ts.map +1 -0
- package/dist/svelte/Portal.svelte.d.ts +1 -0
- package/dist/svelte/Portal.svelte.d.ts.map +1 -0
- package/dist/svelte/advanced.d.ts +1 -0
- package/dist/svelte/advanced.d.ts.map +1 -0
- package/dist/svelte/advanced.js +13 -6
- package/dist/svelte/frame-context.d.ts +1 -0
- package/dist/svelte/frame-context.d.ts.map +1 -0
- package/dist/svelte/frame-context.js +27 -27
- package/dist/svelte/frame-context.js.map +1 -0
- package/dist/svelte/index.d.ts +6 -2
- package/dist/svelte/index.d.ts.map +1 -0
- package/dist/svelte/index.js +12 -9
- package/dist/svelte/motiongpu-context.d.ts +1 -0
- package/dist/svelte/motiongpu-context.d.ts.map +1 -0
- package/dist/svelte/motiongpu-context.js +24 -21
- package/dist/svelte/motiongpu-context.js.map +1 -0
- package/dist/svelte/use-motiongpu-user-context.d.ts +1 -0
- package/dist/svelte/use-motiongpu-user-context.d.ts.map +1 -0
- package/dist/svelte/use-motiongpu-user-context.js +69 -70
- package/dist/svelte/use-motiongpu-user-context.js.map +1 -0
- package/dist/svelte/use-texture.d.ts +1 -0
- package/dist/svelte/use-texture.d.ts.map +1 -0
- package/dist/svelte/use-texture.js +125 -147
- package/dist/svelte/use-texture.js.map +1 -0
- package/package.json +12 -7
- package/src/lib/advanced.ts +6 -0
- package/src/lib/core/advanced.ts +12 -0
- package/src/lib/core/compute-shader.ts +326 -0
- package/src/lib/core/current-value.ts +64 -0
- package/src/lib/core/error-diagnostics.ts +236 -0
- package/src/lib/core/error-report.ts +535 -0
- package/src/lib/core/frame-registry.ts +1190 -0
- package/src/lib/core/index.ts +94 -0
- package/src/lib/core/material-preprocess.ts +295 -0
- package/src/lib/core/material.ts +748 -0
- package/src/lib/core/recompile-policy.ts +31 -0
- package/src/lib/core/render-graph.ts +173 -0
- package/src/lib/core/render-targets.ts +107 -0
- package/src/lib/core/renderer.ts +2161 -0
- package/src/lib/core/runtime-loop.ts +537 -0
- package/src/lib/core/scheduler-helpers.ts +136 -0
- package/src/lib/core/shader.ts +301 -0
- package/src/lib/core/storage-buffers.ts +142 -0
- package/src/lib/core/texture-loader.ts +482 -0
- package/src/lib/core/textures.ts +257 -0
- package/src/lib/core/types.ts +743 -0
- package/src/lib/core/uniforms.ts +282 -0
- package/src/lib/index.ts +6 -0
- package/src/lib/passes/BlitPass.ts +54 -0
- package/src/lib/passes/ComputePass.ts +136 -0
- package/src/lib/passes/CopyPass.ts +80 -0
- package/src/lib/passes/FullscreenPass.ts +173 -0
- package/src/lib/passes/PingPongComputePass.ts +180 -0
- package/src/lib/passes/ShaderPass.ts +89 -0
- package/src/lib/passes/index.ts +9 -0
- package/src/lib/react/FragCanvas.tsx +345 -0
- package/src/lib/react/MotionGPUErrorOverlay.tsx +524 -0
- package/src/lib/react/Portal.tsx +34 -0
- package/src/lib/react/advanced.ts +36 -0
- package/src/lib/react/frame-context.ts +169 -0
- package/src/lib/react/index.ts +68 -0
- package/src/lib/react/motiongpu-context.ts +88 -0
- package/src/lib/react/use-motiongpu-user-context.ts +186 -0
- package/src/lib/react/use-texture.ts +233 -0
- package/src/lib/svelte/FragCanvas.svelte +249 -0
- package/src/lib/svelte/MotionGPUErrorOverlay.svelte +512 -0
- package/src/lib/svelte/Portal.svelte +31 -0
- package/src/lib/svelte/advanced.ts +32 -0
- package/src/lib/svelte/frame-context.ts +87 -0
- package/src/lib/svelte/index.ts +68 -0
- package/src/lib/svelte/motiongpu-context.ts +97 -0
- package/src/lib/svelte/use-motiongpu-user-context.ts +145 -0
- package/src/lib/svelte/use-texture.ts +232 -0
|
@@ -1,249 +1,263 @@
|
|
|
1
|
-
import { getShaderCompilationDiagnostics } from
|
|
2
|
-
import { formatShaderSourceLocation } from
|
|
1
|
+
import { getShaderCompilationDiagnostics } from "./error-diagnostics.js";
|
|
2
|
+
import { formatShaderSourceLocation } from "./shader.js";
|
|
3
|
+
//#region src/lib/core/error-report.ts
|
|
3
4
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
* Splits multi-line values into trimmed non-empty lines.
|
|
6
|
+
*/
|
|
6
7
|
function splitLines(value) {
|
|
7
|
-
|
|
8
|
-
.split('\n')
|
|
9
|
-
.map((line) => line.trim())
|
|
10
|
-
.filter((line) => line.length > 0);
|
|
8
|
+
return value.split("\n").map((line) => line.trim()).filter((line) => line.length > 0);
|
|
11
9
|
}
|
|
12
10
|
function toDisplayName(path) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return last && last.length > 0 ? last : path;
|
|
11
|
+
const chunks = (path.split(/[?#]/)[0] ?? path).split(/[\\/]/);
|
|
12
|
+
const last = chunks[chunks.length - 1];
|
|
13
|
+
return last && last.length > 0 ? last : path;
|
|
17
14
|
}
|
|
18
15
|
function toSnippet(source, line, radius = 3) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
highlight: index === targetLine
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
return snippet;
|
|
16
|
+
const lines = source.replace(/\r\n?/g, "\n").split("\n");
|
|
17
|
+
if (lines.length === 0) return [];
|
|
18
|
+
const targetLine = Math.min(Math.max(1, line), lines.length);
|
|
19
|
+
const start = Math.max(1, targetLine - radius);
|
|
20
|
+
const end = Math.min(lines.length, targetLine + radius);
|
|
21
|
+
const snippet = [];
|
|
22
|
+
for (let index = start; index <= end; index += 1) snippet.push({
|
|
23
|
+
number: index,
|
|
24
|
+
code: lines[index - 1] ?? "",
|
|
25
|
+
highlight: index === targetLine
|
|
26
|
+
});
|
|
27
|
+
return snippet;
|
|
35
28
|
}
|
|
36
29
|
function buildSourceFromDiagnostics(error) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const defineLine = Math.max(1, location.line);
|
|
76
|
-
const component = `#define ${defineName}`;
|
|
77
|
-
const locationLabel = formatShaderSourceLocation(location) ?? `define "${defineName}" line ${defineLine}`;
|
|
78
|
-
return {
|
|
79
|
-
component,
|
|
80
|
-
location: `${component} (${locationLabel})`,
|
|
81
|
-
line: defineLine,
|
|
82
|
-
...(column !== undefined ? { column } : {}),
|
|
83
|
-
snippet: toSnippet(diagnostics.defineBlockSource ?? '', defineLine, 2)
|
|
84
|
-
};
|
|
30
|
+
const diagnostics = getShaderCompilationDiagnostics(error);
|
|
31
|
+
if (!diagnostics || diagnostics.diagnostics.length === 0) return null;
|
|
32
|
+
const primary = diagnostics.diagnostics.find((entry) => entry.sourceLocation !== null);
|
|
33
|
+
if (!primary?.sourceLocation) return null;
|
|
34
|
+
const location = primary.sourceLocation;
|
|
35
|
+
const column = primary.linePos && primary.linePos > 0 ? primary.linePos : void 0;
|
|
36
|
+
if (location.kind === "fragment") {
|
|
37
|
+
const component = diagnostics.materialSource?.component ?? (diagnostics.materialSource?.file ? toDisplayName(diagnostics.materialSource.file) : "User shader fragment");
|
|
38
|
+
return {
|
|
39
|
+
component,
|
|
40
|
+
location: `${component} (${formatShaderSourceLocation(location) ?? `fragment line ${location.line}`})`,
|
|
41
|
+
line: location.line,
|
|
42
|
+
...column !== void 0 ? { column } : {},
|
|
43
|
+
snippet: toSnippet(diagnostics.fragmentSource, location.line)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
if (location.kind === "include") {
|
|
47
|
+
const includeName = location.include ?? "unknown";
|
|
48
|
+
const includeSource = diagnostics.includeSources[includeName] ?? "";
|
|
49
|
+
const component = `#include <${includeName}>`;
|
|
50
|
+
return {
|
|
51
|
+
component,
|
|
52
|
+
location: `${component} (${formatShaderSourceLocation(location) ?? `include <${includeName}>`})`,
|
|
53
|
+
line: location.line,
|
|
54
|
+
...column !== void 0 ? { column } : {},
|
|
55
|
+
snippet: toSnippet(includeSource, location.line)
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
const defineName = location.define ?? "unknown";
|
|
59
|
+
const defineLine = Math.max(1, location.line);
|
|
60
|
+
const component = `#define ${defineName}`;
|
|
61
|
+
return {
|
|
62
|
+
component,
|
|
63
|
+
location: `${component} (${formatShaderSourceLocation(location) ?? `define "${defineName}" line ${defineLine}`})`,
|
|
64
|
+
line: defineLine,
|
|
65
|
+
...column !== void 0 ? { column } : {},
|
|
66
|
+
snippet: toSnippet(diagnostics.defineBlockSource ?? "", defineLine, 2)
|
|
67
|
+
};
|
|
85
68
|
}
|
|
86
69
|
function formatDiagnosticMessage(entry) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
if (labels.length === 0) {
|
|
91
|
-
return entry.message;
|
|
92
|
-
}
|
|
93
|
-
return `[${labels.join(' | ')}] ${entry.message}`;
|
|
70
|
+
const labels = [formatShaderSourceLocation(entry.sourceLocation), entry.generatedLine > 0 ? `generated WGSL line ${entry.generatedLine}` : null].filter((value) => Boolean(value));
|
|
71
|
+
if (labels.length === 0) return entry.message;
|
|
72
|
+
return `[${labels.join(" | ")}] ${entry.message}`;
|
|
94
73
|
}
|
|
95
74
|
/**
|
|
96
|
-
|
|
97
|
-
|
|
75
|
+
* Maps known WebGPU/WGSL error patterns to a user-facing title and hint.
|
|
76
|
+
*/
|
|
98
77
|
function classifyErrorMessage(message) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
78
|
+
if (message.includes("WebGPU is not available in this browser")) return {
|
|
79
|
+
code: "WEBGPU_UNAVAILABLE",
|
|
80
|
+
severity: "fatal",
|
|
81
|
+
recoverable: false,
|
|
82
|
+
title: "WebGPU unavailable",
|
|
83
|
+
hint: "Use a browser with WebGPU enabled (latest Chrome/Edge/Safari TP) and secure context."
|
|
84
|
+
};
|
|
85
|
+
if (message.includes("Unable to acquire WebGPU adapter")) return {
|
|
86
|
+
code: "WEBGPU_ADAPTER_UNAVAILABLE",
|
|
87
|
+
severity: "fatal",
|
|
88
|
+
recoverable: false,
|
|
89
|
+
title: "WebGPU adapter unavailable",
|
|
90
|
+
hint: "GPU adapter request failed. Check browser permissions, flags and device support."
|
|
91
|
+
};
|
|
92
|
+
if (message.includes("Canvas does not support webgpu context")) return {
|
|
93
|
+
code: "WEBGPU_CONTEXT_UNAVAILABLE",
|
|
94
|
+
severity: "error",
|
|
95
|
+
recoverable: true,
|
|
96
|
+
title: "Canvas cannot create WebGPU context",
|
|
97
|
+
hint: "Make sure this canvas is attached to DOM and not using an unsupported context option."
|
|
98
|
+
};
|
|
99
|
+
if (message.includes("WGSL compilation failed")) return {
|
|
100
|
+
code: "WGSL_COMPILATION_FAILED",
|
|
101
|
+
severity: "error",
|
|
102
|
+
recoverable: true,
|
|
103
|
+
title: "WGSL compilation failed",
|
|
104
|
+
hint: "Check WGSL line numbers below and verify struct/binding/function signatures."
|
|
105
|
+
};
|
|
106
|
+
if (message.includes("Invalid include directive in fragment shader.") || message.includes("Unknown include \"") || message.includes("Circular include detected for \"") || message.includes("Invalid define value for \"") || message.includes("Invalid include \"")) return {
|
|
107
|
+
code: "MATERIAL_PREPROCESS_FAILED",
|
|
108
|
+
severity: "error",
|
|
109
|
+
recoverable: true,
|
|
110
|
+
title: "Material preprocess failed",
|
|
111
|
+
hint: "Validate #include keys, define values and include expansion order before retrying."
|
|
112
|
+
};
|
|
113
|
+
if (message.includes("Compute shader compilation failed")) return {
|
|
114
|
+
code: "COMPUTE_COMPILATION_FAILED",
|
|
115
|
+
severity: "error",
|
|
116
|
+
recoverable: true,
|
|
117
|
+
title: "Compute shader compilation failed",
|
|
118
|
+
hint: "Check WGSL compute shader sources below and verify storage bindings."
|
|
119
|
+
};
|
|
120
|
+
if (message.includes("Compute shader must declare `@compute @workgroup_size(...) fn compute(...)`.") || message.includes("Compute shader must include a `@builtin(global_invocation_id)` parameter.") || message.includes("Could not extract @workgroup_size from compute shader source.") || message.includes("@workgroup_size dimensions must be integers in range") || message.includes("Unsupported storage buffer access mode \"")) return {
|
|
121
|
+
code: "COMPUTE_CONTRACT_INVALID",
|
|
122
|
+
severity: "error",
|
|
123
|
+
recoverable: true,
|
|
124
|
+
title: "Compute contract is invalid",
|
|
125
|
+
hint: "Ensure compute shader contract (@compute, @workgroup_size, global_invocation_id, storage access) is valid."
|
|
126
|
+
};
|
|
127
|
+
if (message.includes("WebGPU device lost") || message.includes("Device Lost")) return {
|
|
128
|
+
code: "WEBGPU_DEVICE_LOST",
|
|
129
|
+
severity: "fatal",
|
|
130
|
+
recoverable: false,
|
|
131
|
+
title: "WebGPU device lost",
|
|
132
|
+
hint: "GPU device/context was lost. Recreate the renderer and check OS/GPU stability."
|
|
133
|
+
};
|
|
134
|
+
if (message.includes("WebGPU uncaptured error")) return {
|
|
135
|
+
code: "WEBGPU_UNCAPTURED_ERROR",
|
|
136
|
+
severity: "error",
|
|
137
|
+
recoverable: true,
|
|
138
|
+
title: "WebGPU uncaptured error",
|
|
139
|
+
hint: "A GPU command failed asynchronously. Review details and validate resource/state usage."
|
|
140
|
+
};
|
|
141
|
+
if (message.includes("CreateBindGroup") || message.includes("bind group layout")) return {
|
|
142
|
+
code: "BIND_GROUP_MISMATCH",
|
|
143
|
+
severity: "error",
|
|
144
|
+
recoverable: true,
|
|
145
|
+
title: "Bind group mismatch",
|
|
146
|
+
hint: "Bindings in shader and runtime resources are out of sync. Verify uniforms/textures layout."
|
|
147
|
+
};
|
|
148
|
+
if (message.includes("Storage buffer \"") && message.includes("write out of bounds:")) return {
|
|
149
|
+
code: "STORAGE_BUFFER_OUT_OF_BOUNDS",
|
|
150
|
+
severity: "error",
|
|
151
|
+
recoverable: true,
|
|
152
|
+
title: "Storage buffer write out of bounds",
|
|
153
|
+
hint: "Ensure offset + write byte length does not exceed declared storage buffer size."
|
|
154
|
+
};
|
|
155
|
+
if (message.includes("Cannot read storage buffer \"") || message.includes("Cannot read storage buffer: GPU device unavailable.") || message.includes("not allocated on GPU.")) return {
|
|
156
|
+
code: "STORAGE_BUFFER_READ_FAILED",
|
|
157
|
+
severity: "error",
|
|
158
|
+
recoverable: true,
|
|
159
|
+
title: "Storage buffer read failed",
|
|
160
|
+
hint: "Readbacks require an initialized renderer, allocated GPU buffer and active device."
|
|
161
|
+
};
|
|
162
|
+
if (message.includes("Unknown uniform \"") || message.includes("Unknown uniform type for \"") || message.includes("Unknown texture \"") || message.includes("Unknown storage buffer \"") || message.includes("Missing definition for storage buffer \"") || message.includes("Missing texture definition for \"") || message.includes("Storage buffer \"") && message.includes("\" not allocated.") || message.includes("Storage texture \"") && message.includes("\" not allocated.")) return {
|
|
163
|
+
code: "RUNTIME_RESOURCE_MISSING",
|
|
164
|
+
severity: "error",
|
|
165
|
+
recoverable: true,
|
|
166
|
+
title: "Runtime resource binding failed",
|
|
167
|
+
hint: "Check material declarations and runtime keys for uniforms, textures and storage resources."
|
|
168
|
+
};
|
|
169
|
+
if (message.includes("Uniform ") && message.includes(" value must")) return {
|
|
170
|
+
code: "UNIFORM_VALUE_INVALID",
|
|
171
|
+
severity: "error",
|
|
172
|
+
recoverable: true,
|
|
173
|
+
title: "Uniform value is invalid",
|
|
174
|
+
hint: "Provide finite values with tuple/matrix sizes matching the uniform type."
|
|
175
|
+
};
|
|
176
|
+
if (message.includes("Render pass #") || message.includes("Render graph references unknown runtime target")) return {
|
|
177
|
+
code: "RENDER_GRAPH_INVALID",
|
|
178
|
+
severity: "error",
|
|
179
|
+
recoverable: true,
|
|
180
|
+
title: "Render graph configuration is invalid",
|
|
181
|
+
hint: "Verify pass inputs/outputs, declared render targets and execution order."
|
|
182
|
+
};
|
|
183
|
+
if (message.includes("PingPongComputePass must provide a target texture key.")) return {
|
|
184
|
+
code: "PINGPONG_CONFIGURATION_INVALID",
|
|
185
|
+
severity: "error",
|
|
186
|
+
recoverable: true,
|
|
187
|
+
title: "Ping-pong compute pass is misconfigured",
|
|
188
|
+
hint: "Configure a valid target texture key for PingPongComputePass."
|
|
189
|
+
};
|
|
190
|
+
if (message.includes("Destination texture needs to have CopyDst")) return {
|
|
191
|
+
code: "TEXTURE_USAGE_INVALID",
|
|
192
|
+
severity: "error",
|
|
193
|
+
recoverable: true,
|
|
194
|
+
title: "Invalid texture usage flags",
|
|
195
|
+
hint: "Texture used as upload destination must include CopyDst (and often RenderAttachment)."
|
|
196
|
+
};
|
|
197
|
+
if (message.includes("Texture request failed")) return {
|
|
198
|
+
code: "TEXTURE_REQUEST_FAILED",
|
|
199
|
+
severity: "error",
|
|
200
|
+
recoverable: true,
|
|
201
|
+
title: "Texture request failed",
|
|
202
|
+
hint: "Verify texture URL, CORS policy and response status before retrying."
|
|
203
|
+
};
|
|
204
|
+
if (message.includes("createImageBitmap is not available in this runtime")) return {
|
|
205
|
+
code: "TEXTURE_DECODE_UNAVAILABLE",
|
|
206
|
+
severity: "fatal",
|
|
207
|
+
recoverable: false,
|
|
208
|
+
title: "Texture decode unavailable",
|
|
209
|
+
hint: "Runtime lacks createImageBitmap support. Use a browser/runtime with image bitmap decoding."
|
|
210
|
+
};
|
|
211
|
+
if (message.toLowerCase().includes("texture request was aborted")) return {
|
|
212
|
+
code: "TEXTURE_REQUEST_ABORTED",
|
|
213
|
+
severity: "error",
|
|
214
|
+
recoverable: true,
|
|
215
|
+
title: "Texture request aborted",
|
|
216
|
+
hint: "Texture load was cancelled. Retry the request when source inputs stabilize."
|
|
217
|
+
};
|
|
218
|
+
return {
|
|
219
|
+
code: "MOTIONGPU_RUNTIME_ERROR",
|
|
220
|
+
severity: "error",
|
|
221
|
+
recoverable: true,
|
|
222
|
+
title: "MotionGPU render error",
|
|
223
|
+
hint: "Review technical details below. If issue persists, isolate shader/uniform/texture changes."
|
|
224
|
+
};
|
|
205
225
|
}
|
|
206
226
|
/**
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
title: classification.title,
|
|
240
|
-
message,
|
|
241
|
-
hint: classification.hint,
|
|
242
|
-
details,
|
|
243
|
-
stack,
|
|
244
|
-
rawMessage,
|
|
245
|
-
phase,
|
|
246
|
-
source,
|
|
247
|
-
context
|
|
248
|
-
};
|
|
227
|
+
* Converts unknown errors to a consistent, display-ready error report.
|
|
228
|
+
*
|
|
229
|
+
* @param error - Unknown thrown value.
|
|
230
|
+
* @param phase - Phase during which error occurred.
|
|
231
|
+
* @returns Normalized error report.
|
|
232
|
+
*/
|
|
233
|
+
function toMotionGPUErrorReport(error, phase) {
|
|
234
|
+
const shaderDiagnostics = getShaderCompilationDiagnostics(error);
|
|
235
|
+
const rawMessage = error instanceof Error ? error.message : typeof error === "string" ? error : "Unknown FragCanvas error";
|
|
236
|
+
const rawLines = splitLines(rawMessage);
|
|
237
|
+
const defaultMessage = rawLines[0] ?? rawMessage;
|
|
238
|
+
const defaultDetails = rawLines.slice(1);
|
|
239
|
+
const source = buildSourceFromDiagnostics(error);
|
|
240
|
+
const context = shaderDiagnostics?.runtimeContext ?? null;
|
|
241
|
+
const message = shaderDiagnostics && shaderDiagnostics.diagnostics[0] ? formatDiagnosticMessage(shaderDiagnostics.diagnostics[0]) : defaultMessage;
|
|
242
|
+
const details = shaderDiagnostics ? shaderDiagnostics.diagnostics.slice(1).map((entry) => formatDiagnosticMessage(entry)) : defaultDetails;
|
|
243
|
+
const stack = error instanceof Error && error.stack ? splitLines(error.stack).filter((line) => line !== message) : [];
|
|
244
|
+
const classification = classifyErrorMessage(rawMessage);
|
|
245
|
+
return {
|
|
246
|
+
code: classification.code,
|
|
247
|
+
severity: classification.severity,
|
|
248
|
+
recoverable: classification.recoverable,
|
|
249
|
+
title: classification.title,
|
|
250
|
+
message,
|
|
251
|
+
hint: classification.hint,
|
|
252
|
+
details,
|
|
253
|
+
stack,
|
|
254
|
+
rawMessage,
|
|
255
|
+
phase,
|
|
256
|
+
source,
|
|
257
|
+
context
|
|
258
|
+
};
|
|
249
259
|
}
|
|
260
|
+
//#endregion
|
|
261
|
+
export { toMotionGPUErrorReport };
|
|
262
|
+
|
|
263
|
+
//# sourceMappingURL=error-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-report.js","names":[],"sources":["../../src/lib/core/error-report.ts"],"sourcesContent":["import {\n\tgetShaderCompilationDiagnostics,\n\ttype ShaderCompilationDiagnostic\n} from './error-diagnostics.js';\nimport { formatShaderSourceLocation } from './shader.js';\n\n/**\n * Runtime phase in which an error occurred.\n */\nexport type MotionGPUErrorPhase = 'initialization' | 'render';\n\n/**\n * Stable machine-readable error category code.\n */\nexport type MotionGPUErrorCode =\n\t| 'WEBGPU_UNAVAILABLE'\n\t| 'WEBGPU_ADAPTER_UNAVAILABLE'\n\t| 'WEBGPU_CONTEXT_UNAVAILABLE'\n\t| 'WGSL_COMPILATION_FAILED'\n\t| 'MATERIAL_PREPROCESS_FAILED'\n\t| 'WEBGPU_DEVICE_LOST'\n\t| 'WEBGPU_UNCAPTURED_ERROR'\n\t| 'BIND_GROUP_MISMATCH'\n\t| 'RUNTIME_RESOURCE_MISSING'\n\t| 'UNIFORM_VALUE_INVALID'\n\t| 'STORAGE_BUFFER_OUT_OF_BOUNDS'\n\t| 'STORAGE_BUFFER_READ_FAILED'\n\t| 'RENDER_GRAPH_INVALID'\n\t| 'PINGPONG_CONFIGURATION_INVALID'\n\t| 'TEXTURE_USAGE_INVALID'\n\t| 'TEXTURE_REQUEST_FAILED'\n\t| 'TEXTURE_DECODE_UNAVAILABLE'\n\t| 'TEXTURE_REQUEST_ABORTED'\n\t| 'COMPUTE_COMPILATION_FAILED'\n\t| 'COMPUTE_CONTRACT_INVALID'\n\t| 'MOTIONGPU_RUNTIME_ERROR';\n\n/**\n * Severity level for user-facing diagnostics.\n */\nexport type MotionGPUErrorSeverity = 'error' | 'fatal';\n\n/**\n * One source-code line displayed in diagnostics snippet.\n */\nexport interface MotionGPUErrorSourceLine {\n\tnumber: number;\n\tcode: string;\n\thighlight: boolean;\n}\n\n/**\n * Structured source context displayed for shader compilation errors.\n */\nexport interface MotionGPUErrorSource {\n\tcomponent: string;\n\tlocation: string;\n\tline: number;\n\tcolumn?: number;\n\tsnippet: MotionGPUErrorSourceLine[];\n}\n\n/**\n * Optional runtime context captured with diagnostics payload.\n */\nexport interface MotionGPUErrorContext {\n\tmaterialSignature?: string;\n\tpassGraph?: {\n\t\tpassCount: number;\n\t\tenabledPassCount: number;\n\t\tinputs: string[];\n\t\toutputs: string[];\n\t};\n\tactiveRenderTargets: string[];\n}\n\n/**\n * Structured error payload used by UI diagnostics.\n */\nexport interface MotionGPUErrorReport {\n\t/**\n\t * Stable machine-readable category code.\n\t */\n\tcode: MotionGPUErrorCode;\n\t/**\n\t * Severity level used by diagnostics UIs and telemetry.\n\t */\n\tseverity: MotionGPUErrorSeverity;\n\t/**\n\t * Whether runtime may recover without full renderer re-creation.\n\t */\n\trecoverable: boolean;\n\t/**\n\t * Short category title.\n\t */\n\ttitle: string;\n\t/**\n\t * Primary human-readable message.\n\t */\n\tmessage: string;\n\t/**\n\t * Suggested remediation hint.\n\t */\n\thint: string;\n\t/**\n\t * Additional parsed details (for example WGSL line errors).\n\t */\n\tdetails: string[];\n\t/**\n\t * Stack trace lines when available.\n\t */\n\tstack: string[];\n\t/**\n\t * Original unmodified message.\n\t */\n\trawMessage: string;\n\t/**\n\t * Runtime phase where the error occurred.\n\t */\n\tphase: MotionGPUErrorPhase;\n\t/**\n\t * Optional source context for shader-related diagnostics.\n\t */\n\tsource: MotionGPUErrorSource | null;\n\t/**\n\t * Optional runtime context snapshot (material/pass graph/render targets).\n\t */\n\tcontext: MotionGPUErrorContext | null;\n}\n\n/**\n * Splits multi-line values into trimmed non-empty lines.\n */\nfunction splitLines(value: string): string[] {\n\treturn value\n\t\t.split('\\n')\n\t\t.map((line) => line.trim())\n\t\t.filter((line) => line.length > 0);\n}\n\nfunction toDisplayName(path: string): string {\n\tconst normalized = path.split(/[?#]/)[0] ?? path;\n\tconst chunks = normalized.split(/[\\\\/]/);\n\tconst last = chunks[chunks.length - 1];\n\treturn last && last.length > 0 ? last : path;\n}\n\nfunction toSnippet(source: string, line: number, radius = 3): MotionGPUErrorSourceLine[] {\n\tconst lines = source.replace(/\\r\\n?/g, '\\n').split('\\n');\n\tif (lines.length === 0) {\n\t\treturn [];\n\t}\n\n\tconst targetLine = Math.min(Math.max(1, line), lines.length);\n\tconst start = Math.max(1, targetLine - radius);\n\tconst end = Math.min(lines.length, targetLine + radius);\n\tconst snippet: MotionGPUErrorSourceLine[] = [];\n\n\tfor (let index = start; index <= end; index += 1) {\n\t\tsnippet.push({\n\t\t\tnumber: index,\n\t\t\tcode: lines[index - 1] ?? '',\n\t\t\thighlight: index === targetLine\n\t\t});\n\t}\n\n\treturn snippet;\n}\n\nfunction buildSourceFromDiagnostics(error: unknown): MotionGPUErrorSource | null {\n\tconst diagnostics = getShaderCompilationDiagnostics(error);\n\tif (!diagnostics || diagnostics.diagnostics.length === 0) {\n\t\treturn null;\n\t}\n\n\tconst primary = diagnostics.diagnostics.find((entry) => entry.sourceLocation !== null);\n\tif (!primary?.sourceLocation) {\n\t\treturn null;\n\t}\n\n\tconst location = primary.sourceLocation;\n\tconst column = primary.linePos && primary.linePos > 0 ? primary.linePos : undefined;\n\n\tif (location.kind === 'fragment') {\n\t\tconst component =\n\t\t\tdiagnostics.materialSource?.component ??\n\t\t\t(diagnostics.materialSource?.file\n\t\t\t\t? toDisplayName(diagnostics.materialSource.file)\n\t\t\t\t: 'User shader fragment');\n\t\tconst locationLabel = formatShaderSourceLocation(location) ?? `fragment line ${location.line}`;\n\t\treturn {\n\t\t\tcomponent,\n\t\t\tlocation: `${component} (${locationLabel})`,\n\t\t\tline: location.line,\n\t\t\t...(column !== undefined ? { column } : {}),\n\t\t\tsnippet: toSnippet(diagnostics.fragmentSource, location.line)\n\t\t};\n\t}\n\n\tif (location.kind === 'include') {\n\t\tconst includeName = location.include ?? 'unknown';\n\t\tconst includeSource = diagnostics.includeSources[includeName] ?? '';\n\t\tconst component = `#include <${includeName}>`;\n\t\tconst locationLabel = formatShaderSourceLocation(location) ?? `include <${includeName}>`;\n\t\treturn {\n\t\t\tcomponent,\n\t\t\tlocation: `${component} (${locationLabel})`,\n\t\t\tline: location.line,\n\t\t\t...(column !== undefined ? { column } : {}),\n\t\t\tsnippet: toSnippet(includeSource, location.line)\n\t\t};\n\t}\n\n\tconst defineName = location.define ?? 'unknown';\n\tconst defineLine = Math.max(1, location.line);\n\tconst component = `#define ${defineName}`;\n\tconst locationLabel =\n\t\tformatShaderSourceLocation(location) ?? `define \"${defineName}\" line ${defineLine}`;\n\treturn {\n\t\tcomponent,\n\t\tlocation: `${component} (${locationLabel})`,\n\t\tline: defineLine,\n\t\t...(column !== undefined ? { column } : {}),\n\t\tsnippet: toSnippet(diagnostics.defineBlockSource ?? '', defineLine, 2)\n\t};\n}\n\nfunction formatDiagnosticMessage(entry: ShaderCompilationDiagnostic): string {\n\tconst sourceLabel = formatShaderSourceLocation(entry.sourceLocation);\n\tconst generatedLineLabel =\n\t\tentry.generatedLine > 0 ? `generated WGSL line ${entry.generatedLine}` : null;\n\tconst labels = [sourceLabel, generatedLineLabel].filter((value) => Boolean(value));\n\tif (labels.length === 0) {\n\t\treturn entry.message;\n\t}\n\n\treturn `[${labels.join(' | ')}] ${entry.message}`;\n}\n\n/**\n * Maps known WebGPU/WGSL error patterns to a user-facing title and hint.\n */\nfunction classifyErrorMessage(\n\tmessage: string\n): Pick<MotionGPUErrorReport, 'code' | 'severity' | 'recoverable' | 'title' | 'hint'> {\n\tif (message.includes('WebGPU is not available in this browser')) {\n\t\treturn {\n\t\t\tcode: 'WEBGPU_UNAVAILABLE',\n\t\t\tseverity: 'fatal',\n\t\t\trecoverable: false,\n\t\t\ttitle: 'WebGPU unavailable',\n\t\t\thint: 'Use a browser with WebGPU enabled (latest Chrome/Edge/Safari TP) and secure context.'\n\t\t};\n\t}\n\n\tif (message.includes('Unable to acquire WebGPU adapter')) {\n\t\treturn {\n\t\t\tcode: 'WEBGPU_ADAPTER_UNAVAILABLE',\n\t\t\tseverity: 'fatal',\n\t\t\trecoverable: false,\n\t\t\ttitle: 'WebGPU adapter unavailable',\n\t\t\thint: 'GPU adapter request failed. Check browser permissions, flags and device support.'\n\t\t};\n\t}\n\n\tif (message.includes('Canvas does not support webgpu context')) {\n\t\treturn {\n\t\t\tcode: 'WEBGPU_CONTEXT_UNAVAILABLE',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Canvas cannot create WebGPU context',\n\t\t\thint: 'Make sure this canvas is attached to DOM and not using an unsupported context option.'\n\t\t};\n\t}\n\n\tif (message.includes('WGSL compilation failed')) {\n\t\treturn {\n\t\t\tcode: 'WGSL_COMPILATION_FAILED',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'WGSL compilation failed',\n\t\t\thint: 'Check WGSL line numbers below and verify struct/binding/function signatures.'\n\t\t};\n\t}\n\n\tif (\n\t\tmessage.includes('Invalid include directive in fragment shader.') ||\n\t\tmessage.includes('Unknown include \"') ||\n\t\tmessage.includes('Circular include detected for \"') ||\n\t\tmessage.includes('Invalid define value for \"') ||\n\t\tmessage.includes('Invalid include \"')\n\t) {\n\t\treturn {\n\t\t\tcode: 'MATERIAL_PREPROCESS_FAILED',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Material preprocess failed',\n\t\t\thint: 'Validate #include keys, define values and include expansion order before retrying.'\n\t\t};\n\t}\n\n\tif (message.includes('Compute shader compilation failed')) {\n\t\treturn {\n\t\t\tcode: 'COMPUTE_COMPILATION_FAILED',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Compute shader compilation failed',\n\t\t\thint: 'Check WGSL compute shader sources below and verify storage bindings.'\n\t\t};\n\t}\n\n\tif (\n\t\tmessage.includes(\n\t\t\t'Compute shader must declare `@compute @workgroup_size(...) fn compute(...)`.'\n\t\t) ||\n\t\tmessage.includes('Compute shader must include a `@builtin(global_invocation_id)` parameter.') ||\n\t\tmessage.includes('Could not extract @workgroup_size from compute shader source.') ||\n\t\tmessage.includes('@workgroup_size dimensions must be integers in range') ||\n\t\tmessage.includes('Unsupported storage buffer access mode \"')\n\t) {\n\t\treturn {\n\t\t\tcode: 'COMPUTE_CONTRACT_INVALID',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Compute contract is invalid',\n\t\t\thint: 'Ensure compute shader contract (@compute, @workgroup_size, global_invocation_id, storage access) is valid.'\n\t\t};\n\t}\n\n\tif (message.includes('WebGPU device lost') || message.includes('Device Lost')) {\n\t\treturn {\n\t\t\tcode: 'WEBGPU_DEVICE_LOST',\n\t\t\tseverity: 'fatal',\n\t\t\trecoverable: false,\n\t\t\ttitle: 'WebGPU device lost',\n\t\t\thint: 'GPU device/context was lost. Recreate the renderer and check OS/GPU stability.'\n\t\t};\n\t}\n\n\tif (message.includes('WebGPU uncaptured error')) {\n\t\treturn {\n\t\t\tcode: 'WEBGPU_UNCAPTURED_ERROR',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'WebGPU uncaptured error',\n\t\t\thint: 'A GPU command failed asynchronously. Review details and validate resource/state usage.'\n\t\t};\n\t}\n\n\tif (message.includes('CreateBindGroup') || message.includes('bind group layout')) {\n\t\treturn {\n\t\t\tcode: 'BIND_GROUP_MISMATCH',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Bind group mismatch',\n\t\t\thint: 'Bindings in shader and runtime resources are out of sync. Verify uniforms/textures layout.'\n\t\t};\n\t}\n\n\tif (message.includes('Storage buffer \"') && message.includes('write out of bounds:')) {\n\t\treturn {\n\t\t\tcode: 'STORAGE_BUFFER_OUT_OF_BOUNDS',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Storage buffer write out of bounds',\n\t\t\thint: 'Ensure offset + write byte length does not exceed declared storage buffer size.'\n\t\t};\n\t}\n\n\tif (\n\t\tmessage.includes('Cannot read storage buffer \"') ||\n\t\tmessage.includes('Cannot read storage buffer: GPU device unavailable.') ||\n\t\tmessage.includes('not allocated on GPU.')\n\t) {\n\t\treturn {\n\t\t\tcode: 'STORAGE_BUFFER_READ_FAILED',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Storage buffer read failed',\n\t\t\thint: 'Readbacks require an initialized renderer, allocated GPU buffer and active device.'\n\t\t};\n\t}\n\n\tif (\n\t\tmessage.includes('Unknown uniform \"') ||\n\t\tmessage.includes('Unknown uniform type for \"') ||\n\t\tmessage.includes('Unknown texture \"') ||\n\t\tmessage.includes('Unknown storage buffer \"') ||\n\t\tmessage.includes('Missing definition for storage buffer \"') ||\n\t\tmessage.includes('Missing texture definition for \"') ||\n\t\t(message.includes('Storage buffer \"') && message.includes('\" not allocated.')) ||\n\t\t(message.includes('Storage texture \"') && message.includes('\" not allocated.'))\n\t) {\n\t\treturn {\n\t\t\tcode: 'RUNTIME_RESOURCE_MISSING',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Runtime resource binding failed',\n\t\t\thint: 'Check material declarations and runtime keys for uniforms, textures and storage resources.'\n\t\t};\n\t}\n\n\tif (message.includes('Uniform ') && message.includes(' value must')) {\n\t\treturn {\n\t\t\tcode: 'UNIFORM_VALUE_INVALID',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Uniform value is invalid',\n\t\t\thint: 'Provide finite values with tuple/matrix sizes matching the uniform type.'\n\t\t};\n\t}\n\n\tif (\n\t\tmessage.includes('Render pass #') ||\n\t\tmessage.includes('Render graph references unknown runtime target')\n\t) {\n\t\treturn {\n\t\t\tcode: 'RENDER_GRAPH_INVALID',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Render graph configuration is invalid',\n\t\t\thint: 'Verify pass inputs/outputs, declared render targets and execution order.'\n\t\t};\n\t}\n\n\tif (message.includes('PingPongComputePass must provide a target texture key.')) {\n\t\treturn {\n\t\t\tcode: 'PINGPONG_CONFIGURATION_INVALID',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Ping-pong compute pass is misconfigured',\n\t\t\thint: 'Configure a valid target texture key for PingPongComputePass.'\n\t\t};\n\t}\n\n\tif (message.includes('Destination texture needs to have CopyDst')) {\n\t\treturn {\n\t\t\tcode: 'TEXTURE_USAGE_INVALID',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Invalid texture usage flags',\n\t\t\thint: 'Texture used as upload destination must include CopyDst (and often RenderAttachment).'\n\t\t};\n\t}\n\n\tif (message.includes('Texture request failed')) {\n\t\treturn {\n\t\t\tcode: 'TEXTURE_REQUEST_FAILED',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Texture request failed',\n\t\t\thint: 'Verify texture URL, CORS policy and response status before retrying.'\n\t\t};\n\t}\n\n\tif (message.includes('createImageBitmap is not available in this runtime')) {\n\t\treturn {\n\t\t\tcode: 'TEXTURE_DECODE_UNAVAILABLE',\n\t\t\tseverity: 'fatal',\n\t\t\trecoverable: false,\n\t\t\ttitle: 'Texture decode unavailable',\n\t\t\thint: 'Runtime lacks createImageBitmap support. Use a browser/runtime with image bitmap decoding.'\n\t\t};\n\t}\n\n\tif (message.toLowerCase().includes('texture request was aborted')) {\n\t\treturn {\n\t\t\tcode: 'TEXTURE_REQUEST_ABORTED',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Texture request aborted',\n\t\t\thint: 'Texture load was cancelled. Retry the request when source inputs stabilize.'\n\t\t};\n\t}\n\n\treturn {\n\t\tcode: 'MOTIONGPU_RUNTIME_ERROR',\n\t\tseverity: 'error',\n\t\trecoverable: true,\n\t\ttitle: 'MotionGPU render error',\n\t\thint: 'Review technical details below. If issue persists, isolate shader/uniform/texture changes.'\n\t};\n}\n\n/**\n * Converts unknown errors to a consistent, display-ready error report.\n *\n * @param error - Unknown thrown value.\n * @param phase - Phase during which error occurred.\n * @returns Normalized error report.\n */\nexport function toMotionGPUErrorReport(\n\terror: unknown,\n\tphase: MotionGPUErrorPhase\n): MotionGPUErrorReport {\n\tconst shaderDiagnostics = getShaderCompilationDiagnostics(error);\n\tconst rawMessage =\n\t\terror instanceof Error\n\t\t\t? error.message\n\t\t\t: typeof error === 'string'\n\t\t\t\t? error\n\t\t\t\t: 'Unknown FragCanvas error';\n\tconst rawLines = splitLines(rawMessage);\n\tconst defaultMessage = rawLines[0] ?? rawMessage;\n\tconst defaultDetails = rawLines.slice(1);\n\tconst source = buildSourceFromDiagnostics(error);\n\tconst context = shaderDiagnostics?.runtimeContext ?? null;\n\tconst message =\n\t\tshaderDiagnostics && shaderDiagnostics.diagnostics[0]\n\t\t\t? formatDiagnosticMessage(shaderDiagnostics.diagnostics[0])\n\t\t\t: defaultMessage;\n\tconst details = shaderDiagnostics\n\t\t? shaderDiagnostics.diagnostics.slice(1).map((entry) => formatDiagnosticMessage(entry))\n\t\t: defaultDetails;\n\tconst stack =\n\t\terror instanceof Error && error.stack\n\t\t\t? splitLines(error.stack).filter((line) => line !== message)\n\t\t\t: [];\n\tconst classification = classifyErrorMessage(rawMessage);\n\n\treturn {\n\t\tcode: classification.code,\n\t\tseverity: classification.severity,\n\t\trecoverable: classification.recoverable,\n\t\ttitle: classification.title,\n\t\tmessage,\n\t\thint: classification.hint,\n\t\tdetails,\n\t\tstack,\n\t\trawMessage,\n\t\tphase,\n\t\tsource,\n\t\tcontext\n\t};\n}\n"],"mappings":";;;;;;AAqIA,SAAS,W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N;AAGF,KAAI,QAAQ,SAAS,qDAAqD,CACzE,QAAO;EACN,MAAM;EACN,UAAU;EACV,aAAa;EACb,OAAO;EACP,MAAM;EACN;AAGF,KAAI,QAAQ,aAAa,CAAC,SAAS,8BAA8B,CAChE,QAAO;EACN,MAAM;EACN,UAAU;EACV,aAAa;EACb,OAAO;EACP,MAAM;EACN;AAGF,QAAO;EACN,MAAM;EACN,UAAU;EACV,aAAa;EACb,OAAO;EACP,MAAM;EACN;;;;;;;;;AAUF,SAAgB,uBACf,OACA,OACuB;CACvB,MAAM,oBAAoB,gCAAgC,MAAM;CAChE,MAAM,aACL,iBAAiB,QACd,MAAM,UACN,OAAO,UAAU,WAChB,QACA;CACL,MAAM,WAAW,WAAW,WAAW;CACvC,MAAM,iBAAiB,SAAS,MAAM;CACtC,MAAM,iBAAiB,SAAS,MAAM,EAAE;CACxC,MAAM,SAAS,2BAA2B,MAAM;CAChD,MAAM,UAAU,mBAAmB,kBAAkB;CACrD,MAAM,UACL,qBAAqB,kBAAkB,YAAY,KAChD,wBAAwB,kBAAkB,YAAY,GAAG,GACzD;CACJ,MAAM,UAAU,oBACb,kBAAkB,YAAY,MAAM,EAAE,CAAC,KAAK,UAAU,wBAAwB,MAAM,CAAC,GACrF;CACH,MAAM,QACL,iBAAiB,SAAS,MAAM,QAC7B,WAAW,MAAM,MAAM,CAAC,QAAQ,SAAS,SAAS,QAAQ,GAC1D,EAAE;CACN,MAAM,iBAAiB,qBAAqB,WAAW;AAEvD,QAAO;EACN,MAAM,eAAe;EACrB,UAAU,eAAe;EACzB,aAAa,eAAe;EAC5B,OAAO,eAAe;EACtB;EACA,MAAM,eAAe;EACrB;EACA;EACA;EACA;EACA;EACA;EACA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frame-registry.d.ts","sourceRoot":"","sources":["../../src/lib/core/frame-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC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