core: manual buffer sync with sync-rows, reuse unchanged buffers and pipelines across activations

Also lets the screenshot suite point at another reference directory and settle longer.

Amp-Thread-ID: https://ampcode.com/threads/T-01a0b2dd-db32-712d-99ce-12ce4a86d979
Co-authored-by: Heaust Azure <heaust.azure@gmail.com>
This commit is contained in:
Amp
2026-09-18 05:53:44 +00:00
co-authored by heaust
parent 49c80a209e
commit 31d3ae21ff
15 changed files with 185 additions and 48 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ export type GraphBuffer = {
id: string;
array: string;
usage?: string[];
sync?: "frame" | "loadout";
sync?: "frame" | "manual";
};
export type GraphTexture = {
+4 -3
View File
@@ -990,6 +990,7 @@ export class Scene {
this.#geometry.get(geometry) ??
this.#geometry.set(geometry, new Map()).get(geometry)!
).set(kind, data);
await this.core.syncRows(name, 0, rowCount);
if (updateGraph) await this.updateRenderGraph();
}
@@ -1248,7 +1249,7 @@ export class Scene {
id: vertex,
array: `geometry.${mesh.geometryId}.positions`,
usage: ["vertex"],
sync: "loadout",
sync: "manual",
});
const normal = `geometry-${mesh.geometryId}-normals`;
const uv = `geometry-${mesh.geometryId}-uvs`;
@@ -1272,7 +1273,7 @@ export class Scene {
id,
array: `geometry.${mesh.geometryId}.${kind}`,
usage: ["vertex"],
sync: "loadout",
sync: "manual",
});
const indexed = mesh.indexCount > 0;
if (indexed)
@@ -1280,7 +1281,7 @@ export class Scene {
id: `geometry-${mesh.geometryId}-indices`,
array: `geometry.${mesh.geometryId}.indices`,
usage: ["index"],
sync: "loadout",
sync: "manual",
});
const draws =
indexed && mesh.faceMaterials.size