Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

diag(verify-render): say what the retried run actually failed on

esengine263339b7c13f
diff --git a/desktop b/desktop
index 2d0fefe19..9dde2a5a4 160000
--- a/desktop
+++ b/desktop
@@ -1 +1 @@
-Subproject commit 2d0fefe199e57299528c58a06e52a4fae271f45b
+Subproject commit 9dde2a5a4e99ee93835665efea6dcbea61914187
diff --git a/tools/render-host/host.ts b/tools/render-host/host.ts
index 3bffcf25c..508fab98e 100644
--- a/tools/render-host/host.ts
+++ b/tools/render-host/host.ts
@@ -87,8 +87,10 @@ async function boot(): Promise<void> {
canvas.style.top = '0';
canvas.style.width = `${width}px`;
canvas.style.height = `${height}px`;
+ document.body.appendChild(canvas);
}
- document.body.appendChild(canvas);
+ // WebGL2 leaves the canvas OUT of the document: the readback comes from the
+ // engine, not the page, so attaching it only gives the compositor work.
module = await createModule(moduleArg);
diff --git a/tools/render-host/index.html b/tools/render-host/index.html
index 7585edce9..50d8d3847 100644
--- a/tools/render-host/index.html
+++ b/tools/render-host/index.html
@@ -10,7 +10,9 @@
/>
<title>Estella Render Host</title>
<style>
- html, body { margin: 0; padding: 0; background: #000; }
+ /* No background: nothing should give the compositor work to do. The WebGPU
+ capture takes the page, so margins have to be zero for it to line up. */
+ html, body { margin: 0; padding: 0; }
</style>
</head>
<body>
diff --git a/tools/render-host/run.mjs b/tools/render-host/run.mjs
index fa0432d47..2e8cdb1dd 100644
--- a/tools/render-host/run.mjs
+++ b/tools/render-host/run.mjs
@@ -78,6 +78,10 @@ const DEPTH_LAYERS = process.env.ESTELLA_VERIFY_DEPTH_LAYERS ?? '';
// Headless / GPU-less (CI) WebGL2 falls back to SwiftShader; harmless with a GPU.
app.commandLine.appendSwitch('enable-unsafe-swiftshader');
+// CI's Linux runner has no GPU and rasterises in software, which is a different
+// machine from any developer's. Reproducing a CI-only failure needs that
+// machine, so ask for it explicitly rather than guessing from a log.
+if (process.env.ESTELLA_VERIFY_SOFTWARE_GPU) app.commandLine.appendSwitch('disable-gpu');
// The GPU process runs its own sandbox, which ELECTRON_DISABLE_SANDBOX does not
// reach: on a runner with no device it died before any scene drew, on every
// retry. Harmless with a GPU — this is a headless verifier, not a shipped app.
diff --git a/tools/verify-render.mjs b/tools/verify-render.mjs
index ec70bf375..f4de7f7ad 100644
--- a/tools/verify-render.mjs
+++ b/tools/verify-render.mjs
@@ -197,6 +197,10 @@ for (const [index, scene] of scenes.entries()) {
if (scene.env.ESTELLA_VERIFY_DEVICE_LOSS) {
run = runScene(scene);
} else {
+ // `gpuNeverCameUp` matches a message this runner prints on success too, so
+ // every failure reads as "the GPU died" and the real reason never reaches the
+ // log — a host failing half its launches looks exactly like a flaky runner.
+ let firstFailure = null;
const attempt = retryOnDeadGpu(
() => { const r = runScene(scene); return { ...r, output: r.out }; },
(died) => {
@@ -206,6 +210,14 @@ for (const [index, scene] of scenes.entries()) {
: 'a blank frame on the run after a GPU death'}; measuring again`);
},
);
+ if (attempt.retried && !firstFailure) {
+ firstFailure = (attempt.out || '').split('\n')
+ .filter((l) => /error|fail|refus|throw|undefined|cannot|timeout|watchdog/i.test(l))
+ .slice(-3);
+ if (firstFailure.length) {
+ console.log(` └ what the retried run(s) said: ${firstFailure.join(' | ').slice(0, 400)}`);
+ }
+ }
run = attempt;
}
if (run.ok) drewSomething = true; else failed.push(scene.id);