3D engine that AI agents drive
Tier benchmark: Glaze vs EEVEE 5.3, Cook vs Cycles 5.3 (Part of #904)
Nguyen Xuan Anded73a63974d
diff --git a/bench/reference/harness.js b/bench/reference/harness.jsindex 24d433d0..7fe4a8e9 100644--- a/bench/reference/harness.js+++ b/bench/reference/harness.js@@ -359,6 +359,8 @@ async function compareBakeBackends(id, variants) {}window.measureReferenceFrameTime = measureReferenceFrameTime;+// The scene preparation the suite uses, for bench/tiers/page.js, which draws the same scenes with other renderer options.+window.referenceInternals = { SCENES, Renderer67, applyLightLinks, withDerivedGroundBounce, withFloorSky, skyOpenness, fogSkyVisibility };window.compareBakeBackends = compareBakeBackends;async function renderReferencePathTraced(id, options) {diff --git a/bench/tiers/README.md b/bench/tiers/README.mdnew file mode 100644index 00000000..34995a8f--- /dev/null+++ b/bench/tiers/README.md@@ -0,0 +1,59 @@+# Tier benchmark (issue #904)++Each row says what ran. The tier names are working names from the render roadmap (#890): `draft`, `realtime`, `realtime-high`, `final`. The `quality` setting that picks a tier is planned (#904), so none of these names is an API today. `realtime-high` is planned (#901, #902) and cannot be measured.++Depends on #921 (`bench/cycles-parity`, [`docs/cycles-parity.md`](../../docs/cycles-parity.md)): the Cycles script, the native trace script, `compare.py` and `measure-gpu-run.py` are reused. The Cook against Cycles numbers on one scene are in that document; this suite repeats them with the other Cook backends beside them.++## Result (lit-interior, 960 by 540, 2026-11-11)++One scene, as the first step. The other five scenes of `bench/reference/scenes.js` export and render, but were not run (see "Not done"). The card was shared the whole time (see "Conditions").++| Tier | For | What runs it today | 67js time | Blender equivalent and its time | Quality (FLIP vs Cycles 4096 spp, lower is better) | VRAM (card wide, shared) |+| --- | --- | --- | --- | --- | --- | --- |+| draft (planned name) | A quick look while editing | Glaze, 0.5 render scale, 1 sample, light shading | 1.20 ms a frame (0.88 to 2.43), first frame 11.9 ms | EEVEE 5.3, 1 sample: 99 ms a render call (76 to 157) | Glaze 0.188, EEVEE 0.562 | Glaze +62 MiB (render targets 39 MB), EEVEE +2,218 MiB |+| realtime | Interactive use | Glaze, default settings | 1.11 ms a frame (1.05 to 1.24), first frame 9.7 ms | EEVEE 5.3 defaults, 64 samples: 1,127 ms a render call (716 to 1,891) | Glaze 0.197, EEVEE 0.562 | Glaze +119 MiB (render targets 65.7 MB), EEVEE +2,503 MiB |+| realtime-high | Interactive, higher quality | Planned (#902), not measurable yet | none | none | none | none |+| (not realtime-high) experimental real-time path tracer, WebGPU | Research | `src/path-tracer-realtime*.js`, not reachable from MCP | 5.6 ms a frame; FLIP under 0.20 after 16 frames (0.15 s), under 0.10 after 64 frames (0.41 s) | none | 0.056 after 256 frames | +243 MiB |+| (not realtime-high) same tracer, WebGL2 fallback | Research | same | 6.7 ms a frame, first frame 6.1 s (shader compile); under 0.10 after 64 frames (6.6 s with the compile) | none | 0.056 after 256 frames | +67 MiB |+| final | Offline images | Cook native (`packages/render-native`, Vulkan ray queries) | 6.05 ms a sample (4.7 to 6.4), total 1.9 s at 256 samples | Cycles 5.3 OptiX: 36.2 ms a sample (28.7 to 220); 12.6 s at 256 samples (8.9 to 58.6) | at 256 samples 0.080 (Cycles 0.039); at equal error about equal (below) | +622 MiB (Cycles +733 MiB) |+| final | Offline images | Cook webgpu (WGSL compute, software BVH) | 34.4 ms a sample (22.6 to 60.6) | same Cycles | same error at the same samples as native | +456 MiB |+| final | Offline images | Cook gpu (WebGL2) | 74.4 ms a sample (57.3 to 79.2) plus 4.8 to 7.9 s compile | same Cycles | same | +496 MiB |+| final | Offline images | Cook cpu (JS, 8 threads) | 786 ms a sample (561 to 1,022) | same Cycles | same | not a card job |++Footnote. RTX 3060 12 GB (driver 621.14), Intel i7-14700KF, Windows 11, Chrome 157.0.8103.50 headless on D3D11 (ANGLE), Node 24.19.0, Blender 5.3.0, three.js not run. 960 by 540, measured 2026-11-11. The card was shared with other sessions' jobs in every run (utilisation 17 to 100 percent before and during runs), so ranges are wide; medians of three runs, interleaved. The Cook numbers will change when the new kernel lands: [`docs/cycles-parity.md`](../../docs/cycles-parity.md) holds the Cook against Cycles comparison and its conditions.++### Cook against Cycles at equal error and at equal time++Conditions: lit-interior only, 960 by 540, 8 bounces, no denoiser on either side, Box filter of width 1.0, Cycles clamps off (Cook `fireflyClamp` is capped at 1,000 in the JS API and 1e9 for native), seed 1, RTX 3060 shared. Target: the Cycles 256 sample relMSE, 0.0031 against the 4096 sample Cycles reference. All Cook engines have the same relMSE at the same sample count (0.0198 at 256 samples), so they need about the same samples, 1,750 (1,746 on webgpu, 1,762 native, found from the measured relMSE by log interpolation). Times are samples at equal error times the per-sample time measured at 256 samples, plus setup; they are derived, and the shared card makes the range wide.++| Engine | Samples for equal error | Time at equal error | Against Cycles 256 samples (12.6 s total, 9.3 s sampling only) | relMSE at Cycles' time (12.6 s) |+| --- | --- | --- | --- | --- |+| native | 1,762 | about 11.0 s total (8.5 to 11.7) | 0.87 total; sampling only 10.7 s, which is 1.15, so Cycles wins that cell | about 0.0027 (measured at 2,048 samples: 0.00268) against 0.0031 |+| webgpu | 1,746 (measured with 8 seeds averaged: 0.00267 at 59 s) | about 60 s (40 to 106) | 4.8 times slower | about 0.0144 (extrapolated as 1 over N from 256 samples), 4.6 times Cycles |+| gpu (WebGL2) | not reached in the measured stack of 1,024 samples (0.0051, 64 s); 1,746 inferred from webgpu | about 137 s | 11 times slower | about 0.048, 15 times Cycles |+| cpu | not reached (256 samples measured, 201 s) | about 1,370 s, inferred | 109 times slower | about 0.31, 100 times Cycles |++Native against Cycles repeats #921 (0.91 to 0.95 there): the sign of the difference moves with the load on the card, so read it as about equal. Native draws a sample 6.0 times faster and needs 6.9 times the samples, so the two nearly cancel.++## Method++- `render-references.sh`: Cycles 4096 spp references through `bench/cycles-parity/render-cycles.py`. `run-final-tier.sh`: Cook cpu, gpu and webgpu (`run-cook.mjs`), native (`trace-native.mjs`) and Cycles, interleaved, three repetitions at 256 samples, once at 64 and 1,024, native also at 2,048 and 4,096. One Cook trace is limited to about 256 samples at this size ("too much ray work"), so larger counts are seeds 1 to n averaged (`run-cook-seeds.sh`, `score-tiers.py` stacks). The gpu stack stopped at 1,024 samples, because the seeds above 7 did not finish.+- `run-glaze.mjs` and `page.js`: Glaze tiers from [`tiers.mjs`](tiers.mjs), one comment per setting. First frame is the first render after the renderer is built, until a pixel read returns; this page runs in a browser that has the shader cache from earlier pages, so the first frame is not a cold start. A frame time is the median of 10 further renders, each ending in a pixel read. The draft canvas is 480 by 270 and is enlarged with a bilinear filter to 960 by 540 before scoring. The shadow map stays 2048 by 2048, because there is no setting for a smaller one.+- `render-eevee.py`: the scene is built by the Cycles script, so both see the same objects. A frame is one `bpy.ops.render.render` call, including scene sync, so it is the time to produce a picture in a background render, not EEVEE's viewport rate. The first frame is the first call. `default` keeps 64 samples with ray tracing off; `lowest` is 1 sample, 1 shadow ray, 1 shadow step. The recorded settings are in the JSON.+- `run-settle.mjs`: the experimental tracer at rest, bounces 2, resolution divisor 2; frames 1, 2, 4 to 256 are read back, and FLIP is scored against the reference (the tracer uses 2 bounces, the reference 8, so a floor of bias remains).+- `score-tiers.py`: relMSE from `compare.py`, FLIP (LDR) with the ACES fit and 2.2 gamma of `bench/reference/score.py`, on 8-bit rounded images. Glaze PNGs are display space, so EEVEE and Glaze are compared in display space.+- Results: [`results/`](results). Raw logs and images were written to the session's scratch folder, not committed.++## Conditions and caveats++- The GPU was shared with other sessions' jobs the whole time. The 56 s and 58 s Cycles runs and the 1,891 ms EEVEE frame are contended runs, kept in the ranges.+- Peak card memory is the card's `memory.used` before against its peak, polled at 100 ms (`nvidia-smi`) or 50 ms (`measure-gpu-run.py`). It includes other jobs, so it is an upper bound. `memoryReport()` of the renderer, the exact size of Glaze's render targets, is in `results/glaze-lit-interior-960.json`.+- The FLIP of Glaze here (0.197) is far below the 0.506 in `bench/reference/README.md`, which scores Glaze against a Blender 5.2.2 Cycles render with other settings. These Cycles settings and Blender 5.3 differ from that suite, so the numbers do not line up; they were not reconciled.+- EEVEE has no global illumination with ray tracing off, so on an interior it loses on quality by a wide margin (it is darker, see FLIP). EEVEE with ray tracing on was not measured.+- Glaze at 960 by 540 on this scene takes about a millisecond, which is close to the cost of the browser's pixel read, so the draft against realtime frame time cannot be told apart here. Draft is not faster than realtime in this measurement (1.20 against 1.11 ms; ranges overlap).++## Not done++- The other five scenes (`spot-area`, `light-linking`, `metal`, `glass`, `outdoor-hdri`) are exported (`scenes/`) but have no Cycles references or runs. Run `render-references.sh`, `run-eevee.sh` and `run-glaze.mjs` for them.+- Lit-interior at 1920 by 1080 for the real-time rows, and the settle runs at that size.+- three.js 0.187 against Glaze on `bench/runtime`'s scenes: not run here; `bench/runtime/README.md` has its own results.diff --git a/bench/tiers/fetch-shim.mjs b/bench/tiers/fetch-shim.mjsnew file mode 100644index 00000000..ba2e05dc--- /dev/null+++ b/bench/tiers/fetch-shim.mjs@@ -0,0 +1,15 @@+// Lets the reference scenes load their sky in Node: a fetch of a root-relative URL such as /hdri/sky.hdr reads the file from public/.+import { readFile } from 'node:fs/promises';+import { fileURLToPath } from 'node:url';++const originalFetch = globalThis.fetch;+const publicDirectory = new URL('../../public/', import.meta.url);++globalThis.fetch = async function fetchWithPublicFiles(resource, ...rest) {+ const resourceText = typeof resource === 'string' ? resource : resource?.url;+ if (typeof resourceText === 'string' && resourceText.startsWith('/') && !resourceText.startsWith('//')) {+ const bytes = await readFile(fileURLToPath(new URL(resourceText.slice(1), publicDirectory)));+ return new Response(bytes);+ }+ return originalFetch(resource, ...rest);+};diff --git a/bench/tiers/page.js b/bench/tiers/page.jsnew file mode 100644index 00000000..ca21a8d4--- /dev/null+++ b/bench/tiers/page.js@@ -0,0 +1,119 @@+// Page side of bench/tiers/run-glaze.mjs: loaded into bench/reference/harness.html, which supplies the scenes and the scene preparation.+const median = values => [...values].sort((first, second) => first - second)[Math.floor(values.length / 2)];++function pngOf(canvas) {+ return canvas.toDataURL('image/png').split(',')[1];+}++// Draws one reference scene with the renderer options of a tier.+// setupMilliseconds: scene build plus renderer construction (geometry upload, shadow map and frame targets).+// firstFrameMilliseconds: the first render, with the shader compile and the environment prefilter, until the pixels are back.+// frameMilliseconds: the next `frameCount` renders, each until a pixel read waits for the GPU (finish() returns early on a hardware GPU).+window.renderTierScene = async function renderTierScene(sceneId, tier, frameCount = 10) {+ const { SCENES, Renderer67, applyLightLinks, withDerivedGroundBounce, withFloorSky, skyOpenness, fogSkyVisibility } = window.referenceInternals;+ const setupStarted = performance.now();+ const scene = await SCENES[sceneId]();+ scene.environment = withDerivedGroundBounce(scene, scene.parts);+ const parts = withFloorSky(sceneId, scene.parts, scene);+ const canvas = document.querySelector('canvas');+ const renderer = new Renderer67(canvas, applyLightLinks(parts, scene.environment), {+ ground: false, world: true, memoryBudgetMiB: 1024,+ environment: scene.environment, shadowBounds: scene.shadow, skyOpenness, fogSkyVisibility,+ ...tier.rendererOptions,+ });+ renderer.resize();+ const setupMilliseconds = performance.now() - setupStarted;+ // A still frame: time 0 and no wind, as the reference suite draws, so every frame is the same picture.+ const frame = { ...scene.camera, environment: scene.environment, time: 0, wind: 0, exposure: 1, effects: { ambientOcclusionRadius: 0.5, ...tier.frameEffects } };+ const context = renderer.context;+ const pixel = new Uint8Array(4);+ const finishDrawing = () => context.readPixels(0, 0, 1, 1, context.RGBA, context.UNSIGNED_BYTE, pixel);+ const firstStarted = performance.now();+ renderer.render(frame);+ finishDrawing();+ const firstFrameMilliseconds = performance.now() - firstStarted;+ const frameMilliseconds = [];+ let image = null;+ for (let index = 0; index < frameCount; index++) {+ const started = performance.now();+ renderer.render(frame);+ finishDrawing();+ frameMilliseconds.push(performance.now() - started);+ if (index === frameCount - 1) image = pngOf(canvas);+ }+ const debug = context.getExtension('WEBGL_debug_renderer_info');+ const result = {+ sceneId,+ tier: tier.label,+ canvasWidth: canvas.width,+ canvasHeight: canvas.height,+ setupMilliseconds,+ firstFrameMilliseconds,+ frameMilliseconds,+ medianFrameMilliseconds: median(frameMilliseconds),+ glError: context.getError(),+ capabilities: renderer.capabilities,+ memoryReport: renderer.memoryReport(),+ graphics: context.getParameter(debug ? debug.UNMASKED_RENDERER_WEBGL : context.RENDERER),+ image,+ };+ renderer.dispose();+ return result;+};++function floatsToBase64(values) {+ const bytes = new Uint8Array(values.buffer, values.byteOffset, values.byteLength);+ let binary = '';+ for (let start = 0; start < bytes.length; start += 0x8000) binary += String.fromCharCode(...bytes.subarray(start, start + 0x8000));+ return btoa(binary);+}++// Cook (the path tracer) on one reference scene with matched settings: no denoiser, no clamp, no adaptive sampling, a Box filter of width 1+// (the tracer jitters each sample uniformly inside the pixel). Returns the untouched linear pixels and the tracer's own report.+window.renderCookScene = async function renderCookScene(sceneId, options) {+ const { SCENES, applyLightLinks } = window.referenceInternals;+ const scene = await SCENES[sceneId]();+ const { renderPathTracedImage } = await import('/src/path-tracer.js');+ const started = performance.now();+ const result = await renderPathTracedImage(+ { parts: applyLightLinks(scene.parts, scene.environment), environment: scene.environment, camera: scene.camera },+ { bounces: 8, seed: 1, fireflyClamp: 1000, noiseThreshold: 0, denoise: false, ...options },+ );+ return { linear: floatsToBase64(result.linear), report: result.report, wallSeconds: (performance.now() - started) / 1000 };+};++function pngOfPixels(frame) {+ const canvas = document.createElement('canvas');+ canvas.width = frame.width;+ canvas.height = frame.height;+ canvas.getContext('2d').putImageData(new ImageData(frame.rgba, frame.width, frame.height), 0, 0);+ return canvas.toDataURL('image/png').split(',')[1];+}++// The experimental real-time path tracer at rest: frame times, then checkpoints of the accumulated picture at growing frame counts with+// the time since the first frame, for scoring against a reference offline. Checkpoint reads are not counted in the elapsed time.+window.settleRealtimeTracer = async function settleRealtimeTracer(sceneId, tracerOptions, checkpointFrames) {+ const { createRealtimeTracer } = await import('/src/path-tracer-realtime.js');+ const scene = await window.loadTraceSceneFor(sceneId);+ const createStarted = performance.now();+ const tracer = await createRealtimeTracer(scene, tracerOptions);+ const createSeconds = (performance.now() - createStarted) / 1000;+ const checkpoints = [];+ const frameMilliseconds = [];+ let elapsedMilliseconds = 0;+ const lastFrame = Math.max(...checkpointFrames);+ for (let frameNumber = 1; frameNumber <= lastFrame; frameNumber++) {+ const started = performance.now();+ await tracer.frame(scene.camera, { wait: true }).done;+ const frameTime = performance.now() - started;+ frameMilliseconds.push(frameTime);+ elapsedMilliseconds += frameTime;+ if (checkpointFrames.includes(frameNumber)) {+ const frame = await tracer.readFrame();+ checkpoints.push({ frame: frameNumber, elapsedSeconds: elapsedMilliseconds / 1000, image: pngOfPixels(frame) });+ }+ }+ const summary = { backend: tracer.backend, fallbackReason: tracer.fallbackReason, gpu: tracer.gpu, compileSeconds: tracer.compileSeconds, createSeconds, medianFrameMilliseconds: median(frameMilliseconds.slice(5)), frameMilliseconds, checkpoints };+ tracer.dispose();+ return summary;+};diff --git a/bench/tiers/render-eevee.py b/bench/tiers/render-eevee.pynew file mode 100644index 00000000..395d6425--- /dev/null+++ b/bench/tiers/render-eevee.py@@ -0,0 +1,117 @@+"""Render an exported 67js scene JSON in Blender 5.3 EEVEE and time its frames.++ blender -b --factory-startup --python bench/tiers/render-eevee.py -- <sceneJsonPath> <outputPrefix> [--preset default|lowest] [--width 960] [--height 540] [--frames 10]++The scene is built by the Cycles parity script (bench/cycles-parity/render-cycles.py) so Cycles and EEVEE see the same objects, lights, world and camera.+Timing: the first render (shader compile and scene sync) is reported on its own, then `--frames` more renders of the same scene, each a full+bpy.ops.render.render call (Blender re-syncs the scene on each call), then one render written to an EXR for the scorer.+"""+import importlib.util+import json+import os+import statistics+import sys+import time++import bpy++sys.stdout.reconfigure(encoding="utf-8", errors="replace")++CYCLES_SCRIPT = os.path.join(os.getcwd(), "bench", "cycles-parity", "render-cycles.py")++# The EEVEE settings per preset, applied only where Blender 5.3 has the property. "default" changes nothing from a fresh scene except what the scene needs.+PRESETS = {+ "default": {},+ "lowest": {+ "taa_render_samples": 1,+ "use_raytracing": False,+ "shadow_ray_count": 1,+ "shadow_step_count": 1,+ "use_volumetric_shadows": False,+ },+}+++def load_cycles_builder():+ specification = importlib.util.spec_from_file_location("render_cycles_builder", CYCLES_SCRIPT)+ module = importlib.util.module_from_spec(specification)+ specification.loader.exec_module(module)+ return module+++def read_flag_value(argument_list, flag_name, fallback_value):+ if flag_name not in argument_list:+ return fallback_value+ return argument_list[argument_list.index(flag_name) + 1]+++def apply_eevee_preset(scene, preset_name):+ scene.render.engine = "BLENDER_EEVEE"+ applied = {}+ for property_name, value in PRESETS[preset_name].items():+ if hasattr(scene.eevee, property_name):+ setattr(scene.eevee, property_name, value)+ applied[property_name] = "set" if hasattr(scene.eevee, property_name) else "missing in this Blender"+ effective = {}+ for property_name in ("taa_render_samples", "use_raytracing", "shadow_ray_count", "shadow_step_count", "use_volumetric_shadows", "use_shadows"):+ if hasattr(scene.eevee, property_name):+ effective[property_name] = getattr(scene.eevee, property_name)+ return applied, effective+++def main():+ argument_list = sys.argv[sys.argv.index("--") + 1:]+ scene_json_path = os.path.abspath(argument_list[0])+ output_prefix = os.path.abspath(argument_list[1])+ preset_name = read_flag_value(argument_list, "--preset", "default")+ width = int(read_flag_value(argument_list, "--width", "960"))+ height = int(read_flag_value(argument_list, "--height", "540"))+ frame_count = int(read_flag_value(argument_list, "--frames", "10"))+ builder = load_cycles_builder()+ with open(scene_json_path, encoding="utf-8") as handle:+ description = json.load(handle)+ build_started = time.perf_counter()+ bpy.ops.wm.read_factory_settings(use_empty=True)+ scene = bpy.context.scene+ builder.build_scene_objects(scene, description)+ builder.build_world_shader(scene, description["world"], os.getcwd())+ builder.build_scene_lights(scene, description["environment"])+ builder.build_camera_object(scene, description["camera"])+ builder.configure_linear_exr_output(scene, width, height)+ applied, effective = apply_eevee_preset(scene, preset_name)+ scene_build_seconds = time.perf_counter() - build_started+ first_started = time.perf_counter()+ bpy.ops.render.render()+ first_frame_seconds = time.perf_counter() - first_started+ frame_seconds = []+ for _ in range(frame_count):+ frame_started = time.perf_counter()+ bpy.ops.render.render()+ frame_seconds.append(time.perf_counter() - frame_started)+ exr_path = f"{output_prefix}.exr"+ scene.render.filepath = exr_path+ bpy.ops.render.render(write_still=True)+ builder.load_exr_into_npy(exr_path, f"{output_prefix}.npy", width, height, False)+ report = {+ "engine": "eevee",+ "blenderVersion": bpy.app.version_string,+ "renderEngine": scene.render.engine,+ "sceneId": description["id"],+ "preset": preset_name,+ "presetApplied": applied,+ "effectiveSettings": effective,+ "width": width,+ "height": height,+ "frameCount": frame_count,+ "sceneBuildSeconds": round(scene_build_seconds, 4),+ "firstFrameSeconds": round(first_frame_seconds, 4),+ "frameSeconds": [round(value, 4) for value in frame_seconds],+ "medianFrameSeconds": round(statistics.median(frame_seconds), 4),+ "viewTransform": scene.view_settings.view_transform,+ }+ with open(f"{output_prefix}.json", "w", encoding="utf-8") as handle:+ json.dump(report, handle, indent=2)+ print("EEVEE_TIMING " + json.dumps({key: report[key] for key in ("preset", "firstFrameSeconds", "medianFrameSeconds", "effectiveSettings")}))+++main()diff --git a/bench/tiers/render-references.sh b/bench/tiers/render-references.shnew file mode 100644index 00000000..7a47ca57--- /dev/null+++ b/bench/tiers/render-references.sh@@ -0,0 +1,22 @@+#!/usr/bin/env bash+# Renders the Cycles 5.3 OptiX references the tier benchmark scores against (no denoiser, Box filter 1.0, clamps off, 8 bounces).+# bash bench/tiers/render-references.sh <work directory> [scene,scene,...]+# Needs <work directory>/scenes/<scene>.json from bench/cycles-parity/export-scene.mjs. Each render goes through gpu-lock as a heavy job.+set -u+WORK_DIRECTORY="$1"+SCENE_LIST="${2:-lit-interior,spot-area,light-linking,metal,glass,outdoor-hdri}"+BLENDER_BIN="${BLENDER_BIN:-C:/Program Files/Blender Foundation/Blender 5.3/blender.exe}"+GPU_LOCK="$HOME/.agents/tools/gpu-lock.sh"+REFERENCE_SAMPLES="${REFERENCE_SAMPLES:-4096}"+mkdir -p "$WORK_DIRECTORY/reference"+IFS=',' read -ra SCENES <<< "$SCENE_LIST"+for SCENE in "${SCENES[@]}"; do+ PREFIX="$WORK_DIRECTORY/reference/$SCENE-cycles-$REFERENCE_SAMPLES-seed1"+ if [ -f "$PREFIX.json" ]; then+ echo "skip $SCENE"+ continue+ fi+ GPU_LOCK_WEIGHT=heavy bash "$GPU_LOCK" "$BLENDER_BIN" -b --factory-startup --python bench/cycles-parity/render-cycles.py -- \+ "$WORK_DIRECTORY/scenes/$SCENE.json" "$PREFIX" --samples "$REFERENCE_SAMPLES" --bounces 8 --seed 1 > "$WORK_DIRECTORY/reference/$SCENE.log" 2>&1+ echo "done $SCENE exit $?"+donediff --git a/bench/tiers/results/glaze-lit-interior-960.json b/bench/tiers/results/glaze-lit-interior-960.jsonnew file mode 100644index 00000000..d87fca1e--- /dev/null+++ b/bench/tiers/results/glaze-lit-interior-960.json@@ -0,0 +1,656 @@+{+ "width": 960,+ "height": 540,+ "frameCount": 10,+ "repetitions": 3,+ "runs": [+ {+ "repetition": 1,+ "width": 960,+ "height": 540,+ "tierName": "draft",+ "card": {+ "beforeMebibytes": 3575,+ "peakMebibytes": 3641,+ "deltaMebibytes": 66,+ "utilizationBeforePercent": 55,+ "utilizationPeakPercent": 67+ },+ "sceneId": "lit-interior",+ "tier": "draft (planned name)",+ "canvasWidth": 480,+ "canvasHeight": 270,+ "setupMilliseconds": 239.31999999284744,+ "firstFrameMilliseconds": 23.939999997615814,+ "frameMilliseconds": [+ 2.5149999856948853,+ 3.9649999737739563,+ 1.8050000071525574,+ 1.8100000023841858,+ 2.2850000262260437,+ 1.7149999737739563,+ 1.5300000309944153,+ 3.8949999809265137,+ 2.4299999475479126,+ 2.9200000166893005+ ],+ "medianFrameMilliseconds": 2.4299999475479126,+ "glError": 0,+ "capabilities": {+ "hdr": true,+ "hdrRequested": true,+ "hdrFallbackReason": null,+ "samples": 1,+ "maximumTextureSize": 16384,+ "reversedDepth": true+ },+ "memoryReport": {+ "totalBytes": 40859136,+ "totalMegabytes": 38.97,+ "targets": [+ {+ "name": "localShadowAtlas",+ "width": 2048,+ "height": 2560,+ "layers": 1,+ "format": "DEPTH_COMPONENT24",+ "samples": 1,+ "bytes": 20971520,+ "megabytes": 20+ },+ {+ "name": "shadowMap",+ "width": 2048,+ "height": 2048,+ "layers": 1,+ "format": "DEPTH_COMPONENT24",+ "samples": 1,+ "bytes": 16777216,+ "megabytes": 16+ },+ {+ "name": "multisampleColor",+ "width": 480,+ "height": 270,+ "layers": 1,+ "format": "RGBA16F",+ "samples": 1,+ "bytes": 1036800,+ "megabytes": 0.99+ },+ {+ "name": "frameColor",+ "width": 480,+ "height": 270,+ "layers": 1,+ "format": "RGBA16F",+ "samples": 1,+ "bytes": 1036800,+ "megabytes": 0.99+ },+ {+ "name": "multisampleDepth",+ "width": 480,+ "height": 270,+ "layers": 1,+ "format": "DEPTH_COMPONENT32F",+ "samples": 1,+ "bytes": 518400,+ "megabytes": 0.49+ },+ {+ "name": "sceneDepth",+ "width": 480,+ "height": 270,+ "layers": 1,+ "format": "DEPTH_COMPONENT32F",+ "samples": 1,+ "bytes": 518400,+ "megabytes": 0.49+ }+ ]+ },+ "graphics": "ANGLE (NVIDIA, NVIDIA GeForce RTX 3060 (0x00002487) Direct3D11 vs_5_0 ps_5_0, D3D11)"+ },+ {+ "repetition": 1,+ "width": 960,+ "height": 540,+ "tierName": "realtime",+ "card": {+ "beforeMebibytes": 3602,+ "peakMebibytes": 3719,+ "deltaMebibytes": 117,+ "utilizationBeforePercent": 35,+ "utilizationPeakPercent": 41+ },+ "sceneId": "lit-interior",+ "tier": "realtime",+ "canvasWidth": 960,+ "canvasHeight": 540,+ "setupMilliseconds": 165.2750000357628,+ "firstFrameMilliseconds": 15.964999973773956,+ "frameMilliseconds": [+ 2.1200000047683716,+ 1.2900000214576721,+ 0.7450000047683716,+ 0.75,+ 1.1100000143051147,+ 0.85999995470047,+ 2.325000047683716,+ 1.274999976158142,+ 0.6899999976158142,+ 0.6899999976158142+ ],+ "medianFrameMilliseconds": 1.1100000143051147,+ "glError": 0,+ "capabilities": {+ "hdr": true,+ "hdrRequested": true,+ "hdrFallbackReason": null,+ "samples": 4,+ "maximumTextureSize": 16384,+ "reversedDepth": true+ },+ "memoryReport": {+ "totalBytes": 68852736,+ "totalMegabytes": 65.66,+ "targets": [+ {+ "name": "localShadowAtlas",+ "width": 2048,+ "height": 2560,+ "layers": 1,+ "format": "DEPTH_COMPONENT24",+ "samples": 1,+ "bytes": 20971520,+ "megabytes": 20+ },+ {+ "name": "shadowMap",+ "width": 2048,+ "height": 2048,+ "layers": 1,+ "format": "DEPTH_COMPONENT24",+ "samples": 1,+ "bytes": 16777216,+ "megabytes": 16+ },+ {+ "name": "multisampleColor",+ "width": 960,+ "height": 540,+ "layers": 1,+ "format": "RGBA16F",+ "samples": 4,+ "bytes": 16588800,+ "megabytes": 15.82+ },+ {+ "name": "multisampleDepth",+ "width": 960,+ "height": 540,+ "layers": 1,+ "format": "DEPTH_COMPONENT32F",+ "samples": 4,+ "bytes": 8294400,+ "megabytes": 7.91+ },+ {+ "name": "frameColor",+ "width": 960,+ "height": 540,+ "layers": 1,+ "format": "RGBA16F",+ "samples": 1,+ "bytes": 4147200,+ "megabytes": 3.96+ },+ {+ "name": "sceneDepth",+ "width": 960,+ "height": 540,+ "layers": 1,+ "format": "DEPTH_COMPONENT32F",+ "samples": 1,+ "bytes": 2073600,+ "megabytes": 1.98+ }+ ]+ },+ "graphics": "ANGLE (NVIDIA, NVIDIA GeForce RTX 3060 (0x00002487) Direct3D11 vs_5_0 ps_5_0, D3D11)"+ },+ {+ "repetition": 2,+ "width": 960,+ "height": 540,+ "tierName": "realtime",+ "card": {+ "beforeMebibytes": 3602,+ "peakMebibytes": 3721,+ "deltaMebibytes": 119,+ "utilizationBeforePercent": 37,+ "utilizationPeakPercent": 37+ },+ "sceneId": "lit-interior",+ "tier": "realtime",+ "canvasWidth": 960,+ "canvasHeight": 540,+ "setupMilliseconds": 35.49500000476837,+ "firstFrameMilliseconds": 9.715000033378601,+ "frameMilliseconds": [+ 2.10999995470047,+ 1.125,+ 1.375,+ 1.23499995470047,+ 1.0050000548362732,+ 0.6949999928474426,+ 0.8549999594688416,+ 1.3650000095367432,+ 1.8700000047683716,+ 0.875+ ],+ "medianFrameMilliseconds": 1.23499995470047,+ "glError": 0,+ "capabilities": {+ "hdr": true,+ "hdrRequested": true,+ "hdrFallbackReason": null,+ "samples": 4,+ "maximumTextureSize": 16384,+ "reversedDepth": true+ },+ "memoryReport": {+ "totalBytes": 68852736,+ "totalMegabytes": 65.66,+ "targets": [+ {+ "name": "localShadowAtlas",+ "width": 2048,+ "height": 2560,+ "layers": 1,+ "format": "DEPTH_COMPONENT24",+ "samples": 1,+ "bytes": 20971520,+ "megabytes": 20+ },+ {+ "name": "shadowMap",+ "width": 2048,+ "height": 2048,+ "layers": 1,+ "format": "DEPTH_COMPONENT24",+ "samples": 1,+ "bytes": 16777216,+ "megabytes": 16+ },+ {+ "name": "multisampleColor",+ "width": 960,+ "height": 540,+ "layers": 1,+ "format": "RGBA16F",+ "samples": 4,+ "bytes": 16588800,+ "megabytes": 15.82+ },+ {+ "name": "multisampleDepth",+ "width": 960,+ "height": 540,+ "layers": 1,+ "format": "DEPTH_COMPONENT32F",+ "samples": 4,+ "bytes": 8294400,+ "megabytes": 7.91+ },+ {+ "name": "frameColor",+ "width": 960,+ "height": 540,+ "layers": 1,+ "format": "RGBA16F",+ "samples": 1,+ "bytes": 4147200,+ "megabytes": 3.96+ },+ {+ "name": "sceneDepth",+ "width": 960,+ "height": 540,+ "layers": 1,+ "format": "DEPTH_COMPONENT32F",+ "samples": 1,+ "bytes": 2073600,+ "megabytes": 1.98+ }+ ]+ },+ "graphics": "ANGLE (NVIDIA, NVIDIA GeForce RTX 3060 (0x00002487) Direct3D11 vs_5_0 ps_5_0, D3D11)"+ },+ {+ "repetition": 2,+ "width": 960,+ "height": 540,+ "tierName": "draft",+ "card": {+ "beforeMebibytes": 3602,+ "peakMebibytes": 3664,+ "deltaMebibytes": 62,+ "utilizationBeforePercent": 57,+ "utilizationPeakPercent": 72+ },+ "sceneId": "lit-interior",+ "tier": "draft (planned name)",+ "canvasWidth": 480,+ "canvasHeight": 270,+ "setupMilliseconds": 31.224999964237213,+ "firstFrameMilliseconds": 7.539999961853027,+ "frameMilliseconds": [+ 1.199999988079071,+ 1.1550000309944153,+ 3.435000002384186,+ 1.5350000262260437,+ 0.7749999761581421,+ 4.6549999713897705,+ 1.4649999737739563,+ 1.0199999809265137,+ 0.9950000047683716,+ 1.0550000071525574+ ],+ "medianFrameMilliseconds": 1.199999988079071,+ "glError": 0,+ "capabilities": {+ "hdr": true,+ "hdrRequested": true,+ "hdrFallbackReason": null,+ "samples": 1,+ "maximumTextureSize": 16384,+ "reversedDepth": true+ },+ "memoryReport": {+ "totalBytes": 40859136,+ "totalMegabytes": 38.97,+ "targets": [+ {+ "name": "localShadowAtlas",+ "width": 2048,+ "height": 2560,+ "layers": 1,+ "format": "DEPTH_COMPONENT24",+ "samples": 1,+ "bytes": 20971520,+ "megabytes": 20+ },+ {+ "name": "shadowMap",+ "width": 2048,+ "height": 2048,+ "layers": 1,+ "format": "DEPTH_COMPONENT24",+ "samples": 1,+ "bytes": 16777216,+ "megabytes": 16+ },+ {+ "name": "multisampleColor",+ "width": 480,+ "height": 270,+ "layers": 1,+ "format": "RGBA16F",+ "samples": 1,+ "bytes": 1036800,+ "megabytes": 0.99+ },+ {+ "name": "frameColor",+ "width": 480,+ "height": 270,+ "layers": 1,+ "format": "RGBA16F",+ "samples": 1,+ "bytes": 1036800,+ "megabytes": 0.99+ },+ {+ "name": "multisampleDepth",+ "width": 480,+ "height": 270,+ "layers": 1,+ "format": "DEPTH_COMPONENT32F",+ "samples": 1,+ "bytes": 518400,+ "megabytes": 0.49+ },+ {+ "name": "sceneDepth",+ "width": 480,+ "height": 270,+ "layers": 1,+ "format": "DEPTH_COMPONENT32F",+ "samples": 1,+ "bytes": 518400,+ "megabytes": 0.49+ }+ ]+ },+ "graphics": "ANGLE (NVIDIA, NVIDIA GeForce RTX 3060 (0x00002487) Direct3D11 vs_5_0 ps_5_0, D3D11)"+ },+ {+ "repetition": 3,+ "width": 960,+ "height": 540,+ "tierName": "draft",+ "card": {+ "beforeMebibytes": 3622,+ "peakMebibytes": 3663,+ "deltaMebibytes": 41,+ "utilizationBeforePercent": 25,+ "utilizationPeakPercent": 25+ },+ "sceneId": "lit-interior",+ "tier": "draft (planned name)",+ "canvasWidth": 480,+ "canvasHeight": 270,+ "setupMilliseconds": 32.31999999284744,+ "firstFrameMilliseconds": 11.924999952316284,+ "frameMilliseconds": [+ 1.7050000429153442,+ 1.0649999976158142,+ 0.6850000023841858,+ 0.7450000047683716,+ 1.2699999809265137,+ 1.0250000357627869,+ 0.8349999785423279,+ 0.8799999952316284,+ 0.6899999976158142,+ 0.5699999928474426+ ],+ "medianFrameMilliseconds": 0.8799999952316284,+ "glError": 0,+ "capabilities": {+ "hdr": true,+ "hdrRequested": true,+ "hdrFallbackReason": null,+ "samples": 1,+ "maximumTextureSize": 16384,+ "reversedDepth": true+ },+ "memoryReport": {+ "totalBytes": 40859136,+ "totalMegabytes": 38.97,+ "targets": [+ {+ "name": "localShadowAtlas",+ "width": 2048,+ "height": 2560,+ "layers": 1,+ "format": "DEPTH_COMPONENT24",+ "samples": 1,+ "bytes": 20971520,+ "megabytes": 20+ },+ {+ "name": "shadowMap",+ "width": 2048,+ "height": 2048,+ "layers": 1,+ "format": "DEPTH_COMPONENT24",+ "samples": 1,+ "bytes": 16777216,+ "megabytes": 16+ },+ {+ "name": "multisampleColor",+ "width": 480,+ "height": 270,+ "layers": 1,+ "format": "RGBA16F",+ "samples": 1,+ "bytes": 1036800,+ "megabytes": 0.99+ },+ {+ "name": "frameColor",+ "width": 480,+ "height": 270,+ "layers": 1,+ "format": "RGBA16F",+ "samples": 1,+ "bytes": 1036800,+ "megabytes": 0.99+ },+ {+ "name": "multisampleDepth",+ "width": 480,+ "height": 270,+ "layers": 1,+ "format": "DEPTH_COMPONENT32F",+ "samples": 1,+ "bytes": 518400,+ "megabytes": 0.49+ },+ {+ "name": "sceneDepth",+ "width": 480,+ "height": 270,+ "layers": 1,+ "format": "DEPTH_COMPONENT32F",+ "samples": 1,+ "bytes": 518400,+ "megabytes": 0.49+ }+ ]+ },+ "graphics": "ANGLE (NVIDIA, NVIDIA GeForce RTX 3060 (0x00002487) Direct3D11 vs_5_0 ps_5_0, D3D11)"+ },+ {+ "repetition": 3,+ "width": 960,+ "height": 540,+ "tierName": "realtime",+ "card": {+ "beforeMebibytes": 3622,+ "peakMebibytes": 3742,+ "deltaMebibytes": 120,+ "utilizationBeforePercent": 59,+ "utilizationPeakPercent": 59+ },+ "sceneId": "lit-interior",+ "tier": "realtime",+ "canvasWidth": 960,+ "canvasHeight": 540,+ "setupMilliseconds": 34.25,+ "firstFrameMilliseconds": 8.215000033378601,+ "frameMilliseconds": [+ 3.4950000047683716,+ 1.800000011920929,+ 1.7199999690055847,+ 0.9650000333786011,+ 0.7899999618530273,+ 0.9000000357627869,+ 0.9199999570846558,+ 1.4200000166893005,+ 1.050000011920929,+ 0.824999988079071+ ],+ "medianFrameMilliseconds": 1.050000011920929,+ "glError": 0,+ "capabilities": {+ "hdr": true,+ "hdrRequested": true,+ "hdrFallbackReason": null,+ "samples": 4,+ "maximumTextureSize": 16384,+ "reversedDepth": true+ },+ "memoryReport": {+ "totalBytes": 68852736,+ "totalMegabytes": 65.66,+ "targets": [+ {+ "name": "localShadowAtlas",+ "width": 2048,+ "height": 2560,+ "layers": 1,+ "format": "DEPTH_COMPONENT24",+ "samples": 1,+ "bytes": 20971520,+ "megabytes": 20+ },+ {+ "name": "shadowMap",+ "width": 2048,+ "height": 2048,+ "layers": 1,+ "format": "DEPTH_COMPONENT24",+ "samples": 1,+ "bytes": 16777216,+ "megabytes": 16+ },+ {+ "name": "multisampleColor",+ "width": 960,+ "height": 540,+ "layers": 1,+ "format": "RGBA16F",+ "samples": 4,+ "bytes": 16588800,+ "megabytes": 15.82+ },+ {+ "name": "multisampleDepth",+ "width": 960,+ "height": 540,+ "layers": 1,+ "format": "DEPTH_COMPONENT32F",+ "samples": 4,+ "bytes": 8294400,+ "megabytes": 7.91+ },+ {+ "name": "frameColor",+ "width": 960,+ "height": 540,+ "layers": 1,+ "format": "RGBA16F",+ "samples": 1,+ "bytes": 4147200,+ "megabytes": 3.96+ },+ {+ "name": "sceneDepth",+ "width": 960,+ "height": 540,+ "layers": 1,+ "format": "DEPTH_COMPONENT32F",+ "samples": 1,+ "bytes": 2073600,+ "megabytes": 1.98+ }+ ]+ },+ "graphics": "ANGLE (NVIDIA, NVIDIA GeForce RTX 3060 (0x00002487) Direct3D11 vs_5_0 ps_5_0, D3D11)"+ }+ ]+}\ No newline at end of filediff --git a/bench/tiers/results/scores-final-lit-interior-960.json b/bench/tiers/results/scores-final-lit-interior-960.jsonnew file mode 100644index 00000000..c086a2c4--- /dev/null+++ b/bench/tiers/results/scores-final-lit-interior-960.json@@ -0,0 +1,1078 @@+{+ "scene": "lit-interior",+ "width": 960,+ "rows": [+ {+ "engine": "cook-cpu",+ "samples": 64,+ "runs": 1,+ "relMse": {+ "median": 0.0779,+ "min": 0.0779,+ "max": 0.0779,+ "runs": [+ 0.0779+ ]+ },+ "flip": 0.1271,+ "channelMeanRatio": [+ 1.0099,+ 1.0087,+ 1.0066+ ],+ "samplingSeconds": {+ "median": 38.9,+ "min": 38.9,+ "max": 38.9,+ "runs": [+ 38.9+ ]+ },+ "totalSeconds": {+ "median": 38.9,+ "min": 38.9,+ "max": 38.9,+ "runs": [+ 38.9+ ]+ },+ "processWallSeconds": null,+ "peakRamMegabytes": null,+ "peakCardVramDeltaMegabytes": {+ "median": 3195,+ "min": 3195,+ "max": 3195,+ "runs": [+ 3195+ ]+ },+ "cardWasShared": true+ },+ {+ "engine": "cook-cpu",+ "samples": 256,+ "runs": 3,+ "relMse": {+ "median": 0.0198,+ "min": 0.0198,+ "max": 0.0198,+ "runs": [+ 0.0198,+ 0.0198,+ 0.0198+ ]+ },+ "flip": 0.0803,+ "channelMeanRatio": [+ 1.0105,+ 1.0091,+ 1.0069+ ],+ "samplingSeconds": {+ "median": 201.2169,+ "min": 143.5588,+ "max": 261.581,+ "runs": [+ 261.581,+ 143.5588,+ 201.2169+ ]+ },+ "totalSeconds": {+ "median": 201.2169,+ "min": 143.5588,+ "max": 261.581,+ "runs": [+ 261.581,+ 143.5588,+ 201.2169+ ]+ },+ "processWallSeconds": null,+ "peakRamMegabytes": null,+ "peakCardVramDeltaMegabytes": {+ "median": 2096,+ "min": 1422,+ "max": 2129,+ "runs": [+ 2129,+ 2096,+ 1422+ ]+ },+ "cardWasShared": true+ },+ {+ "engine": "cook-gpu",+ "samples": 64,+ "runs": 1,+ "relMse": {+ "median": 0.0779,+ "min": 0.0779,+ "max": 0.0779,+ "runs": [+ 0.0779+ ]+ },+ "flip": 0.1272,+ "channelMeanRatio": [+ 1.0099,+ 1.0087,+ 1.0065+ ],+ "samplingSeconds": {+ "median": 6.5128,+ "min": 6.5128,+ "max": 6.5128,+ "runs": [+ 6.5128+ ]+ },+ "totalSeconds": {+ "median": 10.7589,+ "min": 10.7589,+ "max": 10.7589,+ "runs": [+ 10.7589+ ]+ },+ "processWallSeconds": null,+ "peakRamMegabytes": null,+ "peakCardVramDeltaMegabytes": {+ "median": 209,+ "min": 209,+ "max": 209,+ "runs": [+ 209+ ]+ },+ "cardWasShared": true+ },+ {+ "engine": "cook-gpu",+ "samples": 256,+ "runs": 3,+ "relMse": {+ "median": 0.0198,+ "min": 0.0198,+ "max": 0.0198,+ "runs": [+ 0.0198,+ 0.0198,+ 0.0198+ ]+ },+ "flip": 0.0803,+ "channelMeanRatio": [+ 1.0104,+ 1.0091,+ 1.0069+ ],+ "samplingSeconds": {+ "median": 19.045,+ "min": 14.6641,+ "max": 20.2678,+ "runs": [+ 20.2678,+ 14.6641,+ 19.045+ ]+ },+ "totalSeconds": {+ "median": 28.161,+ "min": 19.4665,+ "max": 28.4226,+ "runs": [+ 28.161,+ 19.4665,+ 28.4226+ ]+ },+ "processWallSeconds": null,+ "peakRamMegabytes": null,+ "peakCardVramDeltaMegabytes": {+ "median": 496,+ "min": 53,+ "max": 2137,+ "runs": [+ 2137,+ 496,+ 53+ ]+ },+ "cardWasShared": true+ },+ {+ "engine": "cook-webgpu",+ "samples": 64,+ "runs": 1,+ "relMse": {+ "median": 0.0779,+ "min": 0.0779,+ "max": 0.0779,+ "runs": [+ 0.0779+ ]+ },+ "flip": 0.1272,+ "channelMeanRatio": [+ 1.0099,+ 1.0087,+ 1.0065+ ],+ "samplingSeconds": {+ "median": 2.8475,+ "min": 2.8475,+ "max": 2.8475,+ "runs": [+ 2.8475+ ]+ },+ "totalSeconds": {+ "median": 3.3462,+ "min": 3.3462,+ "max": 3.3462,+ "runs": [+ 3.3462+ ]+ },+ "processWallSeconds": null,+ "peakRamMegabytes": null,+ "peakCardVramDeltaMegabytes": {+ "median": 377,+ "min": 377,+ "max": 377,+ "runs": [+ 377+ ]+ },+ "cardWasShared": true+ },+ {+ "engine": "cook-webgpu",+ "samples": 256,+ "runs": 3,+ "relMse": {+ "median": 0.0198,+ "min": 0.0198,+ "max": 0.0198,+ "runs": [+ 0.0198,+ 0.0198,+ 0.0198+ ]+ },+ "flip": 0.0803,+ "channelMeanRatio": [+ 1.0104,+ 1.0091,+ 1.0069+ ],+ "samplingSeconds": {+ "median": 8.8039,+ "min": 5.7971,+ "max": 15.5105,+ "runs": [+ 15.5105,+ 8.8039,+ 5.7971+ ]+ },+ "totalSeconds": {+ "median": 9.3003,+ "min": 6.9498,+ "max": 16.2285,+ "runs": [+ 16.2285,+ 9.3003,+ 6.9498+ ]+ },+ "processWallSeconds": null,+ "peakRamMegabytes": null,+ "peakCardVramDeltaMegabytes": {+ "median": 456,+ "min": 131,+ "max": 497,+ "runs": [+ 497,+ 456,+ 131+ ]+ },+ "cardWasShared": true+ },+ {+ "engine": "cycles",+ "samples": 64,+ "runs": 1,+ "relMse": {+ "median": 0.0148,+ "min": 0.0148,+ "max": 0.0148,+ "runs": [+ 0.0148+ ]+ },+ "flip": 0.0686,+ "channelMeanRatio": [+ 0.9999,+ 0.9999,+ 1.0+ ],+ "samplingSeconds": {+ "median": 3.8778,+ "min": 3.8778,+ "max": 3.8778,+ "runs": [+ 3.8778+ ]+ },+ "totalSeconds": {+ "median": 36.8176,+ "min": 36.8176,+ "max": 36.8176,+ "runs": [+ 36.8176+ ]+ },+ "processWallSeconds": {+ "median": 96.7579,+ "min": 96.7579,+ "max": 96.7579,+ "runs": [+ 96.7579+ ]+ },+ "peakRamMegabytes": {+ "median": 587.73,+ "min": 587.73,+ "max": 587.73,+ "runs": [+ 587.73+ ]+ },+ "peakCardVramDeltaMegabytes": {+ "median": 2365.0,+ "min": 2365.0,+ "max": 2365.0,+ "runs": [+ 2365.0+ ]+ },+ "cardWasShared": true+ },+ {+ "engine": "cycles",+ "samples": 256,+ "runs": 3,+ "relMse": {+ "median": 0.0031,+ "min": 0.0031,+ "max": 0.0031,+ "runs": [+ 0.0031,+ 0.0031,+ 0.0031+ ]+ },+ "flip": 0.0392,+ "channelMeanRatio": [+ 1.0001,+ 1.0001,+ 1.0001+ ],+ "samplingSeconds": {+ "median": 9.2553,+ "min": 7.3412,+ "max": 56.4507,+ "runs": [+ 56.4507,+ 7.3412,+ 9.2553+ ]+ },+ "totalSeconds": {+ "median": 12.5941,+ "min": 8.9042,+ "max": 58.6336,+ "runs": [+ 58.6336,+ 8.9042,+ 12.5941+ ]+ },+ "processWallSeconds": {+ "median": 17.362,+ "min": 10.5501,+ "max": 60.5137,+ "runs": [+ 60.5137,+ 10.5501,+ 17.362+ ]+ },+ "peakRamMegabytes": {+ "median": 582.44,+ "min": 581.05,+ "max": 596.45,+ "runs": [+ 582.44,+ 596.45,+ 581.05+ ]+ },+ "peakCardVramDeltaMegabytes": {+ "median": 733.0,+ "min": 718.0,+ "max": 2472.0,+ "runs": [+ 2472.0,+ 733.0,+ 718.0+ ]+ },+ "cardWasShared": true+ },+ {+ "engine": "cycles",+ "samples": 1024,+ "runs": 1,+ "relMse": {+ "median": 0.0008,+ "min": 0.0008,+ "max": 0.0008,+ "runs": [+ 0.0008+ ]+ },+ "flip": 0.0244,+ "channelMeanRatio": [+ 1.0,+ 1.0,+ 1.0+ ],+ "samplingSeconds": {+ "median": 108.9787,+ "min": 108.9787,+ "max": 108.9787,+ "runs": [+ 108.9787+ ]+ },+ "totalSeconds": {+ "median": 111.9143,+ "min": 111.9143,+ "max": 111.9143,+ "runs": [+ 111.9143+ ]+ },+ "processWallSeconds": {+ "median": 113.6914,+ "min": 113.6914,+ "max": 113.6914,+ "runs": [+ 113.6914+ ]+ },+ "peakRamMegabytes": {+ "median": 599.27,+ "min": 599.27,+ "max": 599.27,+ "runs": [+ 599.27+ ]+ },+ "peakCardVramDeltaMegabytes": {+ "median": 339.0,+ "min": 339.0,+ "max": 339.0,+ "runs": [+ 339.0+ ]+ },+ "cardWasShared": true+ },+ {+ "engine": "native",+ "samples": 64,+ "runs": 1,+ "relMse": {+ "median": 0.0779,+ "min": 0.0779,+ "max": 0.0779,+ "runs": [+ 0.0779+ ]+ },+ "flip": 0.1271,+ "channelMeanRatio": [+ 1.0099,+ 1.0087,+ 1.0065+ ],+ "samplingSeconds": {+ "median": 0.8081,+ "min": 0.8081,+ "max": 0.8081,+ "runs": [+ 0.8081+ ]+ },+ "totalSeconds": {+ "median": 1.0909,+ "min": 1.0909,+ "max": 1.0909,+ "runs": [+ 1.0909+ ]+ },+ "processWallSeconds": {+ "median": 1.2913,+ "min": 1.2913,+ "max": 1.2913,+ "runs": [+ 1.2913+ ]+ },+ "peakRamMegabytes": {+ "median": 275.58,+ "min": 275.58,+ "max": 275.58,+ "runs": [+ 275.58+ ]+ },+ "peakCardVramDeltaMegabytes": {+ "median": 239.0,+ "min": 239.0,+ "max": 239.0,+ "runs": [+ 239.0+ ]+ },+ "cardWasShared": true+ },+ {+ "engine": "native",+ "samples": 256,+ "runs": 3,+ "relMse": {+ "median": 0.0198,+ "min": 0.0198,+ "max": 0.0198,+ "runs": [+ 0.0198,+ 0.0198,+ 0.0198+ ]+ },+ "flip": 0.0803,+ "channelMeanRatio": [+ 1.0104,+ 1.0091,+ 1.0069+ ],+ "samplingSeconds": {+ "median": 1.5478,+ "min": 1.1904,+ "max": 1.6446,+ "runs": [+ 1.1904,+ 1.6446,+ 1.5478+ ]+ },+ "totalSeconds": {+ "median": 1.8852,+ "min": 1.5934,+ "max": 2.1819,+ "runs": [+ 1.5934,+ 1.8852,+ 2.1819+ ]+ },+ "processWallSeconds": {+ "median": 2.0554,+ "min": 1.8441,+ "max": 2.4908,+ "runs": [+ 1.8441,+ 2.0554,+ 2.4908+ ]+ },+ "peakRamMegabytes": {+ "median": 287.28,+ "min": 274.16,+ "max": 303.73,+ "runs": [+ 274.16,+ 303.73,+ 287.28+ ]+ },+ "peakCardVramDeltaMegabytes": {+ "median": 622.0,+ "min": 319.0,+ "max": 1073.0,+ "runs": [+ 1073.0,+ 319.0,+ 622.0+ ]+ },+ "cardWasShared": true+ },+ {+ "engine": "native",+ "samples": 1024,+ "runs": 1,+ "relMse": {+ "median": 0.0051,+ "min": 0.0051,+ "max": 0.0051,+ "runs": [+ 0.0051+ ]+ },+ "flip": 0.0525,+ "channelMeanRatio": [+ 1.0105,+ 1.0091,+ 1.0068+ ],+ "samplingSeconds": {+ "median": 28.5228,+ "min": 28.5228,+ "max": 28.5228,+ "runs": [+ 28.5228+ ]+ },+ "totalSeconds": {+ "median": 28.7835,+ "min": 28.7835,+ "max": 28.7835,+ "runs": [+ 28.7835+ ]+ },+ "processWallSeconds": {+ "median": 28.9363,+ "min": 28.9363,+ "max": 28.9363,+ "runs": [+ 28.9363+ ]+ },+ "peakRamMegabytes": {+ "median": 403.01,+ "min": 403.01,+ "max": 403.01,+ "runs": [+ 403.01+ ]+ },+ "peakCardVramDeltaMegabytes": {+ "median": 2358.0,+ "min": 2358.0,+ "max": 2358.0,+ "runs": [+ 2358.0+ ]+ },+ "cardWasShared": true+ },+ {+ "engine": "native",+ "samples": 2048,+ "runs": 1,+ "relMse": {+ "median": 0.0027,+ "min": 0.0027,+ "max": 0.0027,+ "runs": [+ 0.0027+ ]+ },+ "flip": 0.0441,+ "channelMeanRatio": [+ 1.0105,+ 1.0091,+ 1.0068+ ],+ "samplingSeconds": {+ "median": 11.4062,+ "min": 11.4062,+ "max": 11.4062,+ "runs": [+ 11.4062+ ]+ },+ "totalSeconds": {+ "median": 11.8967,+ "min": 11.8967,+ "max": 11.8967,+ "runs": [+ 11.8967+ ]+ },+ "processWallSeconds": {+ "median": 12.3195,+ "min": 12.3195,+ "max": 12.3195,+ "runs": [+ 12.3195+ ]+ },+ "peakRamMegabytes": {+ "median": 275.12,+ "min": 275.12,+ "max": 275.12,+ "runs": [+ 275.12+ ]+ },+ "peakCardVramDeltaMegabytes": {+ "median": 580.0,+ "min": 580.0,+ "max": 580.0,+ "runs": [+ 580.0+ ]+ },+ "cardWasShared": true+ },+ {+ "engine": "native",+ "samples": 4096,+ "runs": 1,+ "relMse": {+ "median": 0.0015,+ "min": 0.0015,+ "max": 0.0015,+ "runs": [+ 0.0015+ ]+ },+ "flip": 0.0382,+ "channelMeanRatio": [+ 1.0104,+ 1.009,+ 1.0068+ ],+ "samplingSeconds": {+ "median": 32.7556,+ "min": 32.7556,+ "max": 32.7556,+ "runs": [+ 32.7556+ ]+ },+ "totalSeconds": {+ "median": 33.025,+ "min": 33.025,+ "max": 33.025,+ "runs": [+ 33.025+ ]+ },+ "processWallSeconds": {+ "median": 33.2282,+ "min": 33.2282,+ "max": 33.2282,+ "runs": [+ 33.2282+ ]+ },+ "peakRamMegabytes": {+ "median": 318.0,+ "min": 318.0,+ "max": 318.0,+ "runs": [+ 318.0+ ]+ },+ "peakCardVramDeltaMegabytes": {+ "median": 490.0,+ "min": 490.0,+ "max": 490.0,+ "runs": [+ 490.0+ ]+ },+ "cardWasShared": true+ },+ {+ "engine": "cook-gpu",+ "samples": 512,+ "runs": 1,+ "stackOf": 2,+ "relMse": {+ "median": 0.009957,+ "min": 0,+ "max": 0,+ "runs": []+ },+ "flip": 0.0642,+ "channelMeanRatio": [+ 1.0104,+ 1.009,+ 1.0067+ ],+ "samplingSeconds": {+ "median": 34.3315,+ "min": 0,+ "max": 0,+ "runs": []+ },+ "totalSeconds": {+ "median": 42.2247,+ "min": 0,+ "max": 0,+ "runs": []+ },+ "processWallSeconds": null,+ "peakRamMegabytes": null,+ "peakCardVramDeltaMegabytes": null,+ "cardWasShared": null+ },+ {+ "engine": "cook-gpu",+ "samples": 1024,+ "runs": 1,+ "stackOf": 4,+ "relMse": {+ "median": 0.005109,+ "min": 0,+ "max": 0,+ "runs": []+ },+ "flip": 0.0523,+ "channelMeanRatio": [+ 1.0104,+ 1.009,+ 1.0067+ ],+ "samplingSeconds": {+ "median": 63.6358,+ "min": 0,+ "max": 0,+ "runs": []+ },+ "totalSeconds": {+ "median": 71.5289,+ "min": 0,+ "max": 0,+ "runs": []+ },+ "processWallSeconds": null,+ "peakRamMegabytes": null,+ "peakCardVramDeltaMegabytes": null,+ "cardWasShared": null+ },+ {+ "engine": "cook-webgpu",+ "samples": 512,+ "runs": 1,+ "stackOf": 2,+ "relMse": {+ "median": 0.009957,+ "min": 0,+ "max": 0,+ "runs": []+ },+ "flip": 0.0642,+ "channelMeanRatio": [+ 1.0104,+ 1.009,+ 1.0067+ ],+ "samplingSeconds": {+ "median": 19.9028,+ "min": 0,+ "max": 0,+ "runs": []+ },+ "totalSeconds": {+ "median": 20.6208,+ "min": 0,+ "max": 0,+ "runs": []+ },+ "processWallSeconds": null,+ "peakRamMegabytes": null,+ "peakCardVramDeltaMegabytes": null,+ "cardWasShared": null+ },+ {+ "engine": "cook-webgpu",+ "samples": 1024,+ "runs": 1,+ "stackOf": 4,+ "relMse": {+ "median": 0.005109,+ "min": 0,+ "max": 0,+ "runs": []+ },+ "flip": 0.0523,+ "channelMeanRatio": [+ 1.0104,+ 1.009,+ 1.0067+ ],+ "samplingSeconds": {+ "median": 39.2794,+ "min": 0,+ "max": 0,+ "runs": []+ },+ "totalSeconds": {+ "median": 39.9974,+ "min": 0,+ "max": 0,+ "runs": []+ },+ "processWallSeconds": null,+ "peakRamMegabytes": null,+ "peakCardVramDeltaMegabytes": null,+ "cardWasShared": null+ },+ {+ "engine": "cook-webgpu",+ "samples": 2048,+ "runs": 1,+ "stackOf": 8,+ "relMse": {+ "median": 0.002669,+ "min": 0,+ "max": 0,+ "runs": []+ },+ "flip": 0.044,+ "channelMeanRatio": [+ 1.0104,+ 1.0089,+ 1.0067+ ],+ "samplingSeconds": {+ "median": 59.4494,+ "min": 0,+ "max": 0,+ "runs": []+ },+ "totalSeconds": {+ "median": 60.1674,+ "min": 0,+ "max": 0,+ "runs": []+ },+ "processWallSeconds": null,+ "peakRamMegabytes": null,+ "peakCardVramDeltaMegabytes": null,+ "cardWasShared": null+ }+ ],+ "equalError": {+ "target": {+ "cyclesSamples": 256,+ "relMse": 0.0031,+ "samplingSeconds": 9.2553,+ "totalSeconds": 12.5941+ },+ "engines": {+ "cook-cpu": {+ "samplingSeconds": {+ "secondsAtEqualError": null,+ "samplesAtEqualError": null,+ "relMseAtEqualTime": null,+ "measuredRange": {+ "minSamples": 64,+ "maxSamples": 256,+ "bestRelMse": 0.0198+ }+ },+ "totalSeconds": {+ "secondsAtEqualError": null,+ "samplesAtEqualError": null,+ "relMseAtEqualTime": null,+ "measuredRange": {+ "minSamples": 64,+ "maxSamples": 256,+ "bestRelMse": 0.0198+ }+ }+ },+ "cook-gpu": {+ "samplingSeconds": {+ "secondsAtEqualError": null,+ "samplesAtEqualError": null,+ "relMseAtEqualTime": 0.049741,+ "measuredRange": {+ "minSamples": 64,+ "maxSamples": 1024,+ "bestRelMse": 0.005109+ }+ },+ "totalSeconds": {+ "secondsAtEqualError": null,+ "samplesAtEqualError": null,+ "relMseAtEqualTime": 0.062254,+ "measuredRange": {+ "minSamples": 64,+ "maxSamples": 1024,+ "bestRelMse": 0.005109+ }+ }+ },+ "cook-webgpu": {+ "samplingSeconds": {+ "secondsAtEqualError": 54.032,+ "samplesAtEqualError": 1746,+ "relMseAtEqualTime": 0.018983,+ "measuredRange": {+ "minSamples": 64,+ "maxSamples": 2048,+ "bestRelMse": 0.002669+ }+ },+ "totalSeconds": {+ "secondsAtEqualError": 54.762,+ "samplesAtEqualError": 1746,+ "relMseAtEqualTime": 0.01524,+ "measuredRange": {+ "minSamples": 64,+ "maxSamples": 2048,+ "bestRelMse": 0.002669+ }+ }+ },+ "native": {+ "samplingSeconds": {+ "secondsAtEqualError": 13.919,+ "samplesAtEqualError": 1762,+ "relMseAtEqualTime": 0.003326,+ "measuredRange": {+ "minSamples": 64,+ "maxSamples": 4096,+ "bestRelMse": 0.0015+ }+ },+ "totalSeconds": {+ "secondsAtEqualError": 14.414,+ "samplesAtEqualError": 1762,+ "relMseAtEqualTime": 0.002813,+ "measuredRange": {+ "minSamples": 64,+ "maxSamples": 4096,+ "bestRelMse": 0.0015+ }+ }+ }+ }+ }+}diff --git a/bench/tiers/results/scores-raster-lit-interior-960.json b/bench/tiers/results/scores-raster-lit-interior-960.jsonnew file mode 100644index 00000000..1abb5ed2--- /dev/null+++ b/bench/tiers/results/scores-raster-lit-interior-960.json@@ -0,0 +1,331 @@+{+ "width": 960,+ "rows": [+ {+ "scene": "lit-interior",+ "engine": "glaze",+ "tier": "draft",+ "width": 960,+ "canvas": "480x270",+ "firstFrameMilliseconds": {+ "median": 11.925,+ "min": 7.54,+ "max": 23.94,+ "runs": [+ 23.94,+ 7.54,+ 11.925+ ]+ },+ "setupMilliseconds": {+ "median": 32.32,+ "min": 31.225,+ "max": 239.32,+ "runs": [+ 239.32,+ 31.225,+ 32.32+ ]+ },+ "frameMilliseconds": {+ "median": 1.2,+ "min": 0.88,+ "max": 2.43,+ "runs": [+ 2.43,+ 1.2,+ 0.88+ ]+ },+ "flip": {+ "median": 0.1875,+ "min": 0.1875,+ "max": 0.1875,+ "runs": [+ 0.1875,+ 0.1875,+ 0.1875+ ]+ },+ "displayRelMse": {+ "median": 0.0153,+ "min": 0.0153,+ "max": 0.0153,+ "runs": [+ 0.0153,+ 0.0153,+ 0.0153+ ]+ },+ "renderTargetMegabytes": 38.97,+ "peakCardDeltaMebibytes": {+ "median": 62,+ "min": 41,+ "max": 66,+ "runs": [+ 66,+ 62,+ 41+ ]+ },+ "cardUtilizationPeakPercent": {+ "median": 67,+ "min": 25,+ "max": 72,+ "runs": [+ 67,+ 72,+ 25+ ]+ },+ "samples": 1+ },+ {+ "scene": "lit-interior",+ "engine": "glaze",+ "tier": "realtime",+ "width": 960,+ "canvas": "960x540",+ "firstFrameMilliseconds": {+ "median": 9.715,+ "min": 8.215,+ "max": 15.965,+ "runs": [+ 15.965,+ 9.715,+ 8.215+ ]+ },+ "setupMilliseconds": {+ "median": 35.495,+ "min": 34.25,+ "max": 165.275,+ "runs": [+ 165.275,+ 35.495,+ 34.25+ ]+ },+ "frameMilliseconds": {+ "median": 1.11,+ "min": 1.05,+ "max": 1.235,+ "runs": [+ 1.11,+ 1.235,+ 1.05+ ]+ },+ "flip": {+ "median": 0.1969,+ "min": 0.1969,+ "max": 0.1969,+ "runs": [+ 0.1969,+ 0.1969,+ 0.1969+ ]+ },+ "displayRelMse": {+ "median": 0.014,+ "min": 0.014,+ "max": 0.014,+ "runs": [+ 0.014,+ 0.014,+ 0.014+ ]+ },+ "renderTargetMegabytes": 65.66,+ "peakCardDeltaMebibytes": {+ "median": 119,+ "min": 117,+ "max": 120,+ "runs": [+ 117,+ 119,+ 120+ ]+ },+ "cardUtilizationPeakPercent": {+ "median": 41,+ "min": 37,+ "max": 59,+ "runs": [+ 41,+ 37,+ 59+ ]+ },+ "samples": 4+ },+ {+ "scene": "lit-interior",+ "engine": "eevee",+ "tier": "lowest",+ "width": 960,+ "firstFrameMilliseconds": {+ "median": 19176.8,+ "min": 1429.4,+ "max": 25002.0,+ "runs": [+ 19176.8,+ 1429.4,+ 25002.0+ ]+ },+ "frameMilliseconds": {+ "median": 99.1,+ "min": 76.1,+ "max": 157.3,+ "runs": [+ 157.3,+ 99.1,+ 76.1+ ]+ },+ "flip": {+ "median": 0.562,+ "min": 0.562,+ "max": 0.562,+ "runs": [+ 0.562,+ 0.562,+ 0.562+ ]+ },+ "displayRelMse": {+ "median": 0.1612,+ "min": 0.1612,+ "max": 0.1612,+ "runs": [+ 0.1612,+ 0.1612,+ 0.1612+ ]+ },+ "linearRelMse": {+ "median": 0.1757,+ "min": 0.1757,+ "max": 0.1757,+ "runs": [+ 0.1757,+ 0.1757,+ 0.1757+ ]+ },+ "peakCardDeltaMebibytes": {+ "median": 2218.0,+ "min": 2197.0,+ "max": 2380.0,+ "runs": [+ 2380.0,+ 2197.0,+ 2218.0+ ]+ },+ "peakRamMegabytes": {+ "median": 602.0,+ "min": 574.27,+ "max": 680.93,+ "runs": [+ 680.93,+ 602.0,+ 574.27+ ]+ },+ "effectiveSettings": {+ "taa_render_samples": 1,+ "use_raytracing": false,+ "shadow_ray_count": 1,+ "shadow_step_count": 1,+ "use_volumetric_shadows": false,+ "use_shadows": true+ }+ },+ {+ "scene": "lit-interior",+ "engine": "eevee",+ "tier": "default",+ "width": 960,+ "firstFrameMilliseconds": {+ "median": 2072.2,+ "min": 1494.4,+ "max": 4715.0,+ "runs": [+ 1494.4,+ 4715.0,+ 2072.2+ ]+ },+ "frameMilliseconds": {+ "median": 1127.3,+ "min": 716.3,+ "max": 1891.1,+ "runs": [+ 1127.3,+ 1891.1,+ 716.3+ ]+ },+ "flip": {+ "median": 0.5618,+ "min": 0.5618,+ "max": 0.5618,+ "runs": [+ 0.5618,+ 0.5618,+ 0.5618+ ]+ },+ "displayRelMse": {+ "median": 0.1602,+ "min": 0.1602,+ "max": 0.1602,+ "runs": [+ 0.1602,+ 0.1602,+ 0.1602+ ]+ },+ "linearRelMse": {+ "median": 0.1753,+ "min": 0.1753,+ "max": 0.1753,+ "runs": [+ 0.1753,+ 0.1753,+ 0.1753+ ]+ },+ "peakCardDeltaMebibytes": {+ "median": 2503.0,+ "min": 2014.0,+ "max": 3127.0,+ "runs": [+ 3127.0,+ 2503.0,+ 2014.0+ ]+ },+ "peakRamMegabytes": {+ "median": 619.13,+ "min": 612.46,+ "max": 634.73,+ "runs": [+ 634.73,+ 619.13,+ 612.46+ ]+ },+ "effectiveSettings": {+ "taa_render_samples": 64,+ "use_raytracing": false,+ "shadow_ray_count": 1,+ "shadow_step_count": 6,+ "use_volumetric_shadows": false,+ "use_shadows": true+ }+ }+ ]+}diff --git a/bench/tiers/results/scores-settle-lit-interior-960.json b/bench/tiers/results/scores-settle-lit-interior-960.jsonnew file mode 100644index 00000000..e4a80a6d--- /dev/null+++ b/bench/tiers/results/scores-settle-lit-interior-960.json@@ -0,0 +1,159 @@+{+ "scene": "lit-interior",+ "width": 960,+ "bounds": [+ 0.2,+ 0.15,+ 0.1+ ],+ "backends": {+ "gpu": {+ "drawnBackend": "gpu",+ "fallbackReason": null,+ "gpu": "ANGLE (NVIDIA, NVIDIA GeForce RTX 3060 (0x00002487) Direct3D11 vs_5_0 ps_5_0, D3D11)",+ "compileSeconds": 5.676960000038147,+ "medianFrameMilliseconds": 6.735000014305115,+ "checkpoints": [+ {+ "frame": 1,+ "elapsedSeconds": 6.138,+ "flip": 0.3097+ },+ {+ "frame": 2,+ "elapsedSeconds": 6.146,+ "flip": 0.2842+ },+ {+ "frame": 4,+ "elapsedSeconds": 6.163,+ "flip": 0.2632+ },+ {+ "frame": 8,+ "elapsedSeconds": 6.193,+ "flip": 0.2404+ },+ {+ "frame": 16,+ "elapsedSeconds": 6.251,+ "flip": 0.1704+ },+ {+ "frame": 32,+ "elapsedSeconds": 6.366,+ "flip": 0.1194+ },+ {+ "frame": 64,+ "elapsedSeconds": 6.583,+ "flip": 0.0874+ },+ {+ "frame": 128,+ "elapsedSeconds": 7.017,+ "flip": 0.0639+ },+ {+ "frame": 256,+ "elapsedSeconds": 7.894,+ "flip": 0.0558+ }+ ],+ "timeToBound": {+ "0.2": {+ "frame": 16,+ "elapsedSeconds": 6.251+ },+ "0.15": {+ "frame": 32,+ "elapsedSeconds": 6.366+ },+ "0.1": {+ "frame": 64,+ "elapsedSeconds": 6.583+ }+ },+ "card": {+ "beforeMebibytes": 1434,+ "peakMebibytes": 1501,+ "deltaMebibytes": 67,+ "utilizationBeforePercent": 20+ }+ },+ "webgpu": {+ "drawnBackend": "webgpu",+ "fallbackReason": null,+ "gpu": "nvidia ampere",+ "compileSeconds": 1.4466650000214576,+ "medianFrameMilliseconds": 5.555000007152557,+ "checkpoints": [+ {+ "frame": 1,+ "elapsedSeconds": 0.046,+ "flip": 0.3094+ },+ {+ "frame": 2,+ "elapsedSeconds": 0.055,+ "flip": 0.2839+ },+ {+ "frame": 4,+ "elapsedSeconds": 0.072,+ "flip": 0.263+ },+ {+ "frame": 8,+ "elapsedSeconds": 0.1,+ "flip": 0.2403+ },+ {+ "frame": 16,+ "elapsedSeconds": 0.146,+ "flip": 0.1705+ },+ {+ "frame": 32,+ "elapsedSeconds": 0.24,+ "flip": 0.1195+ },+ {+ "frame": 64,+ "elapsedSeconds": 0.414,+ "flip": 0.0875+ },+ {+ "frame": 128,+ "elapsedSeconds": 0.774,+ "flip": 0.064+ },+ {+ "frame": 256,+ "elapsedSeconds": 1.512,+ "flip": 0.0558+ }+ ],+ "timeToBound": {+ "0.2": {+ "frame": 16,+ "elapsedSeconds": 0.146+ },+ "0.15": {+ "frame": 32,+ "elapsedSeconds": 0.24+ },+ "0.1": {+ "frame": 64,+ "elapsedSeconds": 0.414+ }+ },+ "card": {+ "beforeMebibytes": 1321,+ "peakMebibytes": 1564,+ "deltaMebibytes": 243,+ "utilizationBeforePercent": 17+ }+ }+ }+}diff --git a/bench/tiers/run-cook-seeds.sh b/bench/tiers/run-cook-seeds.shnew file mode 100644index 00000000..82ca81ba--- /dev/null+++ b/bench/tiers/run-cook-seeds.sh@@ -0,0 +1,16 @@+#!/usr/bin/env bash+# Cook traces of 256 samples with seeds 2 to 8, for the gpu and webgpu backends, interleaved; score-tiers.py averages them with the seed 1 trace+# into 512 to 2048 samples, because one Cook trace is limited in size.+# bash bench/tiers/run-cook-seeds.sh <work directory> [scene] [last seed]+set -u+WORK_DIRECTORY="$1"+SCENE="${2:-lit-interior}"+LAST_SEED="${3:-8}"+GPU_LOCK="$HOME/.agents/tools/gpu-lock.sh"+for seed in $(seq 2 "$LAST_SEED"); do+ for backend in gpu webgpu; do+ [ -f "$WORK_DIRECTORY/final-$SCENE/$SCENE-cook-$backend-s256-seed$seed.json" ] && continue+ bash "$GPU_LOCK" node bench/tiers/run-cook.mjs "$WORK_DIRECTORY/final-$SCENE" "$SCENE" --backend "$backend" --samples 256 --repetitions 1 --seed "$seed" 2>&1 | tail -1+ done+done+echo "seeds done"diff --git a/bench/tiers/run-cook.mjs b/bench/tiers/run-cook.mjsnew file mode 100644index 00000000..16699fc4--- /dev/null+++ b/bench/tiers/run-cook.mjs@@ -0,0 +1,93 @@+// Cook (the path tracer) with the cpu, gpu (WebGL2) and webgpu backends on a reference scene, at a ladder of sample counts, in headless Chrome.+// [bash ~/.agents/tools/gpu-lock.sh] node bench/tiers/run-cook.mjs <output directory> <scene> --backend cpu|gpu|webgpu --samples 16,64,256 [--repetitions 3] [--width 960] [--height 540] [--threads 8]+// Files: <scene>-cook-<backend>-s<samples>-r<n>.npy (linear RGB float32, rows from the top, as the Cycles script writes) and .json (the tracer's report,+// wall time, and the card memory polled around the trace). Settings: 8 bounces, seed 1, no denoiser, fireflyClamp 1e9, noiseThreshold 0.+import { execFile } from 'node:child_process';+import { mkdir, writeFile } from 'node:fs/promises';+import { constants, setPriority } from 'node:os';+import { resolve } from 'node:path';+import { promisify } from 'node:util';+import { chromium } from 'playwright';+import { createServer } from 'vite';+import { writeFloat32Npy } from '../cycles-parity/npy.mjs';++const runFile = promisify(execFile);+const CHROME = process.env.CHROME_PATH ?? 'C:/Program Files/Google/Chrome/Application/chrome.exe';+const SERVER_PORT = 5350;+const argumentsGiven = process.argv.slice(2);+const valueAfter = (flag, fallback) => (argumentsGiven.includes(flag) ? argumentsGiven[argumentsGiven.indexOf(flag) + 1] : fallback);+const outputDirectory = resolve(argumentsGiven[0]);+const sceneId = argumentsGiven[1];+const backend = valueAfter('--backend', 'gpu');+const sampleLadder = valueAfter('--samples', '16,64,256').split(',').map(Number);+const repetitions = Number(valueAfter('--repetitions', 3));+const width = Number(valueAfter('--width', 960));+const height = Number(valueAfter('--height', 540));+const threads = Number(valueAfter('--threads', 8));+// A driver that interleaves engines calls this once per repetition with --repetitions 1; this sets the number in the file names.+const firstRepetition = Number(valueAfter('--first-repetition', 1));+const seedGiven = argumentsGiven.includes('--seed');+const seed = Number(valueAfter('--seed', 1));++async function cardState() {+ const { stdout } = await runFile('nvidia-smi', ['--query-gpu=memory.used,utilization.gpu', '--format=csv,noheader,nounits']);+ const [memoryMebibytes, utilizationPercent] = stdout.trim().split(',').map(Number);+ return { memoryMebibytes, utilizationPercent };+}++async function withCardPolling(work) {+ const before = await cardState();+ let peakMemory = before.memoryMebibytes;+ let peakUtilization = before.utilizationPercent;+ let polling = true;+ const poller = (async () => {+ while (polling) {+ const state = await cardState();+ peakMemory = Math.max(peakMemory, state.memoryMebibytes);+ peakUtilization = Math.max(peakUtilization, state.utilizationPercent);+ }+ })();+ const result = await work();+ polling = false;+ await poller;+ return { result, card: { beforeMebibytes: before.memoryMebibytes, peakMebibytes: peakMemory, deltaMebibytes: peakMemory - before.memoryMebibytes, utilizationBeforePercent: before.utilizationPercent, utilizationPeakPercent: peakUtilization } };+}++setPriority(0, constants.priority.PRIORITY_BELOW_NORMAL);+await mkdir(outputDirectory, { recursive: true });+const server = await createServer({ server: { host: '127.0.0.1', port: SERVER_PORT, fs: { strict: false } }, logLevel: 'silent' });+await server.listen();+const serverUrl = `http://127.0.0.1:${server.httpServer.address().port}`;+const browser = await chromium.launch({+ executablePath: CHROME,+ headless: true,+ args: ['--use-angle=d3d11', '--enable-gpu', '--ignore-gpu-blocklist', '--enable-webgl', '--disable-renderer-backgrounding', '--enable-unsafe-webgpu', '--enable-features=Vulkan,WebGPU'],+});+try {+ for (let repetition = 1; repetition <= repetitions; repetition++) {+ for (const samples of sampleLadder) {+ const page = await browser.newPage({ viewport: { width: 960, height: 540 } });+ page.setDefaultTimeout(0);+ page.on('pageerror', error => console.log('PAGE ERROR', error.message));+ await page.goto(`${serverUrl}/bench/reference/harness.html`, { timeout: 180000 });+ await page.waitForFunction(() => window.referenceInternals, null, { timeout: 180000 });+ await page.addScriptTag({ type: 'module', url: '/bench/tiers/page.js' });+ await page.waitForFunction(() => window.renderCookScene, null, { timeout: 60000 });+ const options = { width, height, samples, backend, threads, seed };+ const { result, card } = await withCardPolling(() => page.evaluate(([id, tracerOptions]) => window.renderCookScene(id, tracerOptions), [sceneId, options]));+ const label = repetition + firstRepetition - 1;+ // One Cook trace is limited in size ("too much ray work" above about 256 samples at 960 by 540 and 8 bounces), so a larger sample+ // count is several traces with different seeds that score-tiers.py averages; those files carry the seed instead of the repetition.+ const prefix = seedGiven ? `${outputDirectory}/${sceneId}-cook-${backend}-s${samples}-seed${seed}` : `${outputDirectory}/${sceneId}-cook-${backend}-s${samples}-r${label}`;+ const bytes = Buffer.from(result.linear, 'base64');+ const pixels = new Float32Array(bytes.buffer, bytes.byteOffset, bytes.byteLength / 4);+ await writeFloat32Npy(`${prefix}.npy`, new Float32Array(pixels), [height, width, 3]);+ await writeFile(`${prefix}.json`, JSON.stringify({ sceneId, backend, samples, repetition, width, height, threads, wallSeconds: result.wallSeconds, report: result.report, card }, null, 1));+ console.log(backend, `s${samples}`, `r${repetition}`, `traced ${result.report.tracedSeconds.toFixed(2)} s`, `compile ${(result.report.gpuCompileSeconds ?? 0).toFixed(2)} s`, `card +${card.deltaMebibytes} MiB util ${card.utilizationPeakPercent}%`);+ await page.close();+ }+ }+} finally {+ await browser.close();+ await server.close();+}diff --git a/bench/tiers/run-eevee.sh b/bench/tiers/run-eevee.shnew file mode 100644index 00000000..c8cf495c--- /dev/null+++ b/bench/tiers/run-eevee.sh@@ -0,0 +1,27 @@+#!/usr/bin/env bash+# Renders scenes in Blender 5.3 EEVEE (default and lowest presets), timing the first frame and ten more, three repetitions, alternating the preset order.+# bash bench/tiers/run-eevee.sh <work directory> <scene,scene,...> [width] [repetitions]+# Needs <work directory>/scenes/<scene>.json. Output: <work directory>/eevee/<scene>-<preset>-<width>-r<n>.{npy,json,metrics.json}+set -u+WORK_DIRECTORY="$1"+SCENE_LIST="$2"+WIDTH="${3:-960}"+REPETITIONS="${4:-3}"+HEIGHT=$((WIDTH * 9 / 16))+BLENDER_BIN="${BLENDER_BIN:-C:/Program Files/Blender Foundation/Blender 5.3/blender.exe}"+GPU_LOCK="$HOME/.agents/tools/gpu-lock.sh"+mkdir -p "$WORK_DIRECTORY/eevee"+IFS=',' read -ra SCENES <<< "$SCENE_LIST"+for repetition in $(seq 1 "$REPETITIONS"); do+ if [ $((repetition % 2)) -eq 1 ]; then PRESETS="lowest default"; else PRESETS="default lowest"; fi+ for scene in "${SCENES[@]}"; do+ for preset in $PRESETS; do+ prefix="$WORK_DIRECTORY/eevee/$scene-$preset-$WIDTH-r$repetition"+ [ -f "$prefix.metrics.json" ] && continue+ bash "$GPU_LOCK" uv run --no-project --with psutil python bench/cycles-parity/measure-gpu-run.py "$prefix.metrics.json" -- \+ "$BLENDER_BIN" -b --factory-startup --python bench/tiers/render-eevee.py -- "$WORK_DIRECTORY/scenes/$scene.json" "$prefix" \+ --preset "$preset" --width "$WIDTH" --height "$HEIGHT" --frames 10 2>&1 | grep "EEVEE_TIMING" | cut -c1-160+ done+ done+done+echo "eevee done"diff --git a/bench/tiers/run-final-tier.sh b/bench/tiers/run-final-tier.shnew file mode 100644index 00000000..fdbfd80a--- /dev/null+++ b/bench/tiers/run-final-tier.sh@@ -0,0 +1,61 @@+#!/usr/bin/env bash+# The final tier: Cook (cpu, gpu, webgpu, native) against Cycles 5.3 OptiX on one scene, interleaved, three repetitions.+# bash bench/tiers/run-final-tier.sh <work directory> [scene] [repetitions]+# Needs <work directory>/scenes/<scene>.json and the Cycles reference from render-references.sh. Light jobs go through gpu-lock one by one.+# Per repetition and sample count the engines run back to back (cpu, gpu, webgpu, native, cycles), so a drifting load hits all of them.+set -u+WORK_DIRECTORY="$1"+SCENE="${2:-lit-interior}"+REPETITIONS="${3:-3}"+BLENDER_BIN="${BLENDER_BIN:-C:/Program Files/Blender Foundation/Blender 5.3/blender.exe}"+GPU_LOCK="$HOME/.agents/tools/gpu-lock.sh"+SCENE_JSON="$WORK_DIRECTORY/scenes/$SCENE.json"+LADDER_DIRECTORY="$WORK_DIRECTORY/final-$SCENE"+mkdir -p "$LADDER_DIRECTORY"++run_cook() {+ local backend="$1" samples="$2" repetition="$3"+ [ -f "$LADDER_DIRECTORY/$SCENE-cook-$backend-s$samples-r$repetition.json" ] && return+ bash "$GPU_LOCK" node bench/tiers/run-cook.mjs "$LADDER_DIRECTORY" "$SCENE" --backend "$backend" --samples "$samples" --repetitions 1 --first-repetition "$repetition" 2>&1 | grep -v "^$" | tail -2+}++run_measured() {+ local prefix="$1"+ shift+ [ -f "$prefix.metrics.json" ] && return+ bash "$GPU_LOCK" uv run --no-project --with psutil python bench/cycles-parity/measure-gpu-run.py "$prefix.metrics.json" -- "$@" 2>&1 | tail -1 | cut -c1-200+}++run_native() {+ local samples="$1" repetition="$2"+ local prefix="$LADDER_DIRECTORY/$SCENE-native-s$samples-r$repetition"+ run_measured "$prefix" node bench/cycles-parity/trace-native.mjs "$SCENE_JSON" "$prefix" --samples "$samples" --bounces 8 --seed 1 --firefly-clamp 1000000000 --noise-threshold 0+}++run_cycles() {+ local samples="$1" repetition="$2"+ local prefix="$LADDER_DIRECTORY/$SCENE-cycles-s$samples-r$repetition"+ run_measured "$prefix" "$BLENDER_BIN" -b --factory-startup --python bench/cycles-parity/render-cycles.py -- "$SCENE_JSON" "$prefix" --samples "$samples" --bounces 8 --seed 1+}++for repetition in $(seq 1 "$REPETITIONS"); do+ for samples in 64 256 1024; do+ # Three repetitions at 256 samples, where the equal-error reading is taken; the other counts run once.+ [ "$repetition" -gt 1 ] && [ "$samples" -ne 256 ] && continue+ [ "$samples" -le 256 ] && run_cook cpu "$samples" "$repetition"+ run_cook gpu "$samples" "$repetition"+ run_cook webgpu "$samples" "$repetition"+ run_native "$samples" "$repetition"+ [ "$samples" -le 256 ] && run_cycles "$samples" "$repetition"+ [ "$samples" -eq 1024 ] && [ "$repetition" -eq 1 ] && run_cycles 1024 1+ echo "done rep $repetition samples $samples"+ done+done+# Higher sample counts, once: where the error of the GPU backends and the native tracer crosses the Cycles 256 sample error.+for samples in 2048 4096; do+ run_cook gpu "$samples" 1+ run_cook webgpu "$samples" 1+ run_native "$samples" 1+ echo "done extra samples $samples"+done+echo "all done"diff --git a/bench/tiers/run-glaze.mjs b/bench/tiers/run-glaze.mjsnew file mode 100644index 00000000..3a2c404b--- /dev/null+++ b/bench/tiers/run-glaze.mjs@@ -0,0 +1,88 @@+// Draws reference scenes with the Glaze tiers (draft, realtime) in headless Chrome on the GPU and records frame times, memory and PNGs.+// [bash ~/.agents/tools/gpu-lock.sh] node bench/tiers/run-glaze.mjs <output directory> <scene,scene> [--width 960] [--height 540] [--repetitions 3] [--frames 10] [--tiers draft,realtime]+// Each repetition runs every scene and tier once on a fresh page, in an order that alternates between repetitions.+// Files: <scene>-<tier>-r<n>.png and glaze.json. The card's memory is polled with nvidia-smi around each draw (card wide, so it includes other jobs).+import { execFile } from 'node:child_process';+import { mkdir, writeFile } from 'node:fs/promises';+import { constants, setPriority } from 'node:os';+import { resolve } from 'node:path';+import { promisify } from 'node:util';+import { chromium } from 'playwright';+import { createServer } from 'vite';+import { DRAFT_TIER, REALTIME_TIER } from './tiers.mjs';++const runFile = promisify(execFile);+const CHROME = process.env.CHROME_PATH ?? 'C:/Program Files/Google/Chrome/Application/chrome.exe';+const SERVER_PORT = 5340;+const TIERS = { draft: DRAFT_TIER, realtime: REALTIME_TIER };+const argumentsGiven = process.argv.slice(2);+const valueAfter = (flag, fallback) => (argumentsGiven.includes(flag) ? argumentsGiven[argumentsGiven.indexOf(flag) + 1] : fallback);+const outputDirectory = resolve(argumentsGiven[0]);+const sceneIds = argumentsGiven[1].split(',');+const width = Number(valueAfter('--width', 960));+const height = Number(valueAfter('--height', 540));+const repetitions = Number(valueAfter('--repetitions', 3));+const frameCount = Number(valueAfter('--frames', 10));+const tierNames = valueAfter('--tiers', 'draft,realtime').split(',');++async function cardState() {+ const { stdout } = await runFile('nvidia-smi', ['--query-gpu=memory.used,utilization.gpu', '--format=csv,noheader,nounits']);+ const [memoryMebibytes, utilizationPercent] = stdout.trim().split(',').map(Number);+ return { memoryMebibytes, utilizationPercent };+}++// Polls the card every 100 ms while `work` runs; returns the work's result with the card memory before and at the peak.+async function withCardPolling(work) {+ const before = await cardState();+ let peakMemory = before.memoryMebibytes;+ let peakUtilization = before.utilizationPercent;+ let polling = true;+ const poller = (async () => {+ while (polling) {+ const state = await cardState();+ peakMemory = Math.max(peakMemory, state.memoryMebibytes);+ peakUtilization = Math.max(peakUtilization, state.utilizationPercent);+ }+ })();+ const result = await work();+ polling = false;+ await poller;+ return { result, card: { beforeMebibytes: before.memoryMebibytes, peakMebibytes: peakMemory, deltaMebibytes: peakMemory - before.memoryMebibytes, utilizationBeforePercent: before.utilizationPercent, utilizationPeakPercent: peakUtilization } };+}++setPriority(0, constants.priority.PRIORITY_BELOW_NORMAL);+await mkdir(outputDirectory, { recursive: true });+const server = await createServer({ server: { host: '127.0.0.1', port: SERVER_PORT, strictPort: false, fs: { strict: false } }, logLevel: 'silent' });+await server.listen();+const serverUrl = `http://127.0.0.1:${server.httpServer.address().port}`;+const browser = await chromium.launch({+ executablePath: CHROME,+ headless: true,+ args: ['--use-angle=d3d11', '--enable-gpu', '--ignore-gpu-blocklist', '--enable-webgl', '--disable-renderer-backgrounding'],+});+const runs = [];+try {+ for (let repetition = 1; repetition <= repetitions; repetition++) {+ const orderedTiers = repetition % 2 ? tierNames : [...tierNames].reverse();+ for (const sceneId of sceneIds) {+ for (const tierName of orderedTiers) {+ const page = await browser.newPage({ viewport: { width, height } });+ page.on('pageerror', error => console.log('PAGE ERROR', error.message));+ await page.goto(`${serverUrl}/bench/reference/harness.html`, { timeout: 180000 });+ await page.waitForFunction(() => window.referenceInternals, null, { timeout: 180000 });+ await page.addScriptTag({ type: 'module', url: '/bench/tiers/page.js' });+ await page.waitForFunction(() => window.renderTierScene, null, { timeout: 60000 });+ const { result, card } = await withCardPolling(() => page.evaluate(([id, tier, count]) => window.renderTierScene(id, tier, count), [sceneId, TIERS[tierName], frameCount]));+ await writeFile(`${outputDirectory}/${sceneId}-${tierName}-${width}-r${repetition}.png`, Buffer.from(result.image, 'base64'));+ const { image: _image, ...record } = result;+ runs.push({ repetition, width, height, tierName, card, ...record });+ console.log(sceneId, tierName, `r${repetition}`, `first ${result.firstFrameMilliseconds.toFixed(1)} ms`, `median ${result.medianFrameMilliseconds.toFixed(2)} ms`, `canvas ${result.canvasWidth}x${result.canvasHeight}`, `card +${card.deltaMebibytes} MiB`, `util ${card.utilizationPeakPercent}%`);+ await page.close();+ }+ }+ }+} finally {+ await browser.close();+ await server.close();+}+await writeFile(`${outputDirectory}/glaze-${width}.json`, JSON.stringify({ width, height, frameCount, repetitions, runs }, null, 1));diff --git a/bench/tiers/run-settle.mjs b/bench/tiers/run-settle.mjsnew file mode 100644index 00000000..e3fa7c66--- /dev/null+++ b/bench/tiers/run-settle.mjs@@ -0,0 +1,73 @@+// The experimental real-time path tracer (src/path-tracer-realtime*.js, not reachable from MCP) at rest: median frame time and checkpoints of the+// accumulated picture, to find how long it takes to get under a FLIP bound. This is not the realtime-high tier (#902), which does not exist yet.+// [bash ~/.agents/tools/gpu-lock.sh] node bench/tiers/run-settle.mjs <output directory> <scene> --backend gpu|webgpu [--width 1920] [--height 1080] [--bounces 2] [--frames 256]+// Files: <scene>-<backend>-<width>.json and <scene>-<backend>-<width>-f<frame>.png, scored by score-tiers.py settle.+import { execFile } from 'node:child_process';+import { mkdir, writeFile } from 'node:fs/promises';+import { constants, setPriority } from 'node:os';+import { resolve } from 'node:path';+import { promisify } from 'node:util';+import { chromium } from 'playwright';+import { createServer } from 'vite';++const runFile = promisify(execFile);+const CHROME = process.env.CHROME_PATH ?? 'C:/Program Files/Google/Chrome/Application/chrome.exe';+const SERVER_PORT = 5360;+const argumentsGiven = process.argv.slice(2);+const valueAfter = (flag, fallback) => (argumentsGiven.includes(flag) ? argumentsGiven[argumentsGiven.indexOf(flag) + 1] : fallback);+const outputDirectory = resolve(argumentsGiven[0]);+const sceneId = argumentsGiven[1];+const backend = valueAfter('--backend', 'webgpu');+const width = Number(valueAfter('--width', 1920));+const height = Number(valueAfter('--height', 1080));+const bounces = Number(valueAfter('--bounces', 2));+const frames = Number(valueAfter('--frames', 256));+const checkpointFrames = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512].filter(frame => frame <= frames);++async function cardState() {+ const { stdout } = await runFile('nvidia-smi', ['--query-gpu=memory.used,utilization.gpu', '--format=csv,noheader,nounits']);+ const [memoryMebibytes, utilizationPercent] = stdout.trim().split(',').map(Number);+ return { memoryMebibytes, utilizationPercent };+}++setPriority(0, constants.priority.PRIORITY_BELOW_NORMAL);+await mkdir(outputDirectory, { recursive: true });+const server = await createServer({ server: { host: '127.0.0.1', port: SERVER_PORT, fs: { strict: false } }, logLevel: 'silent' });+await server.listen();+const serverUrl = `http://127.0.0.1:${server.httpServer.address().port}`;+const browser = await chromium.launch({+ executablePath: CHROME,+ headless: true,+ args: ['--use-angle=d3d11', '--enable-gpu', '--ignore-gpu-blocklist', '--enable-webgl', '--disable-renderer-backgrounding', '--enable-unsafe-webgpu', '--enable-features=Vulkan,WebGPU'],+});+try {+ const page = await browser.newPage({ viewport: { width: 960, height: 540 } });+ page.setDefaultTimeout(0);+ page.on('pageerror', error => console.log('PAGE ERROR', error.message));+ await page.goto(`${serverUrl}/bench/reference/harness.html`, { timeout: 180000 });+ await page.waitForFunction(() => window.loadTraceSceneFor, null, { timeout: 180000 });+ await page.addScriptTag({ type: 'module', url: '/bench/tiers/page.js' });+ await page.waitForFunction(() => window.settleRealtimeTracer, null, { timeout: 60000 });+ const before = await cardState();+ let peakMemory = before.memoryMebibytes;+ let polling = true;+ const poller = (async () => {+ while (polling) {+ peakMemory = Math.max(peakMemory, (await cardState()).memoryMebibytes);+ }+ })();+ const options = { width, height, bounces, resolutionDivisor: 2, backend };+ const summary = await page.evaluate(([id, tracerOptions, checkpoints]) => window.settleRealtimeTracer(id, tracerOptions, checkpoints), [sceneId, options, checkpointFrames]);+ polling = false;+ await poller;+ const base = `${outputDirectory}/${sceneId}-${backend}-${width}`;+ for (const checkpoint of summary.checkpoints) {+ await writeFile(`${base}-f${checkpoint.frame}.png`, Buffer.from(checkpoint.image, 'base64'));+ }+ const checkpoints = summary.checkpoints.map(({ image: _image, ...rest }) => rest);+ await writeFile(`${base}.json`, JSON.stringify({ ...summary, checkpoints, requestedBackend: backend, options, card: { beforeMebibytes: before.memoryMebibytes, peakMebibytes: peakMemory, deltaMebibytes: peakMemory - before.memoryMebibytes, utilizationBeforePercent: before.utilizationPercent } }, null, 1));+ console.log(backend, `drawn with ${summary.backend}`, summary.fallbackReason ?? '', `median ${summary.medianFrameMilliseconds.toFixed(2)} ms`, checkpoints.map(entry => `f${entry.frame}@${entry.elapsedSeconds.toFixed(2)}s`).join(' '));+} finally {+ await browser.close();+ await server.close();+}diff --git a/bench/tiers/score-tiers.py b/bench/tiers/score-tiers.pynew file mode 100644index 00000000..051f7cf3--- /dev/null+++ b/bench/tiers/score-tiers.py@@ -0,0 +1,325 @@+"""Scores the tier benchmark runs against the Cycles 5.3 reference and writes the numbers as JSON.++ uv run --no-project --python 3.12 --with flip-evaluator --with pillow --with numpy python -I bench/tiers/score-tiers.py final <work directory> <scene> [--width 960]+ uv run --no-project --python 3.12 --with flip-evaluator --with pillow --with numpy python -I bench/tiers/score-tiers.py raster <work directory> <scene>,<scene> [--width 960]+ uv run --no-project --python 3.12 --with flip-evaluator --with pillow --with numpy python -I bench/tiers/score-tiers.py settle <work directory> <scene> --bound 0.15,0.10++final: Cook (cpu, gpu, webgpu), the native tracer and Cycles at each sample count: relMSE, FLIP, time, and the equal-error and equal-time reading.+raster: Glaze draft and realtime against EEVEE default and lowest, all against the Cycles reference: FLIP, display-space relMSE, frame times, memory.+settle: the experimental real-time path tracer's checkpoints against the reference: the time until FLIP is under each bound.+FLIP is the LDR mean error of NVlabs/flip (0 identical). Linear images are put into display space with the ACES fit and 2.2 gamma of src/post.js and+rounded to 8 bits (as a PNG is), the same as bench/reference/score.py does.+"""+import glob+import importlib.util+import json+import math+import os+import statistics+import sys+from pathlib import Path++import flip_evaluator+import numpy as np+from PIL import Image++sys.stdout.reconfigure(encoding="utf-8", errors="replace")++GAMMA = 2.2+COMPARE_SCRIPT = Path(__file__).resolve().parent.parent / "cycles-parity" / "compare.py"+++def load_compare_module():+ specification = importlib.util.spec_from_file_location("cycles_parity_compare", COMPARE_SCRIPT)+ module = importlib.util.module_from_spec(specification)+ specification.loader.exec_module(module)+ return module+++COMPARE = load_compare_module()+++def tone_map_like_67js(linear):+ color = np.maximum(linear, 0)+ mapped = np.clip((color * (2.51 * color + 0.03)) / (color * (2.43 * color + 0.59) + 0.14), 0, 1)+ return mapped ** (1 / GAMMA)+++def quantise_to_8_bit(display):+ return np.round(np.clip(display, 0, 1) * 255).astype(np.float32) / 255+++def display_of_linear(linear):+ return quantise_to_8_bit(tone_map_like_67js(linear))+++def load_png(path, width, height):+ image = Image.open(path).convert("RGB")+ if image.size != (width, height):+ image = image.resize((width, height), Image.BILINEAR)+ return np.asarray(image, dtype=np.float32) / 255+++def flip_score(reference_display, test_display):+ _, mean_error, _ = flip_evaluator.evaluate(reference_display.astype(np.float32), test_display.astype(np.float32), "LDR", inputsRGB=True)+ return round(float(mean_error), 4)+++def display_relative_mse(reference_display, test_display):+ return COMPARE.compute_relative_mse(reference_display.astype(np.float64), test_display.astype(np.float64))["relMse"]+++def read_json(path):+ with open(path, encoding="utf-8") as handle:+ return json.load(handle)+++def spread(values):+ return {"median": round(statistics.median(values), 4), "min": round(min(values), 4), "max": round(max(values), 4), "runs": [round(value, 4) for value in values]}+++def flag_value(arguments, flag, fallback):+ return arguments[arguments.index(flag) + 1] if flag in arguments else fallback+++def reference_paths(work_directory, scene, width):+ suffix = "" if width == 960 else f"-{width}"+ return Path(work_directory) / "reference" / f"{scene}-cycles-4096-seed1{suffix}.npy"+++def log_interpolate(x_value, points):+ """y at x on the log-log line through the two neighbouring (x, y) points, or None outside the measured range."""+ ordered = sorted(points)+ for (x_low, y_low), (x_high, y_high) in zip(ordered, ordered[1:]):+ if min(x_low, x_high) <= x_value <= max(x_low, x_high) and x_low != x_high and y_low > 0 and y_high > 0:+ fraction = (math.log(x_value) - math.log(x_low)) / (math.log(x_high) - math.log(x_low))+ return math.exp(math.log(y_low) + fraction * (math.log(y_high) - math.log(y_low)))+ return None+++def run_times(engine, report, metrics):+ """(sampling seconds, total seconds) of one run, by what each engine reports."""+ if engine.startswith("cook-"):+ compile_seconds = report["report"].get("gpuCompileSeconds", 0.0)+ return report["report"]["tracedSeconds"] - compile_seconds, report["report"]["tracedSeconds"]+ return report["samplingSeconds"], report["totalTraceSeconds"]+++def score_final(work_directory, scene, width):+ directory = Path(work_directory) / f"final-{scene}"+ reference = COMPARE.load_linear_rgb_image(str(reference_paths(work_directory, scene, width)))+ reference_display = display_of_linear(reference)+ groups = {}+ for npy_path in sorted(glob.glob(str(directory / f"{scene}-*-s*-r*.npy"))):+ stem = os.path.basename(npy_path)[: -len(".npy")]+ _, engine_part = stem.split(f"{scene}-", 1)+ engine, sample_part, repetition_part = engine_part.rsplit("-", 2)+ groups.setdefault((engine, int(sample_part[1:])), []).append((int(repetition_part[1:]), npy_path))+ rows = []+ for (engine, samples), runs in sorted(groups.items()):+ relative = []+ sampling = []+ total = []+ wall = []+ ram = []+ vram = []+ shared = []+ flips = []+ mean_ratios = None+ for repetition, npy_path in sorted(runs):+ prefix = npy_path[: -len(".npy")]+ report = read_json(f"{prefix}.json")+ image = COMPARE.load_linear_rgb_image(npy_path)+ comparison = COMPARE.compare_image_pair(reference, image)+ relative.append(comparison["relMse"])+ if mean_ratios is None:+ mean_ratios = comparison["channelMeanRatio"]+ flips.append(flip_score(reference_display, display_of_linear(image.astype(np.float32))))+ sampling_seconds, total_seconds = run_times(engine, report, None)+ sampling.append(sampling_seconds)+ total.append(total_seconds)+ metrics_path = f"{prefix}.metrics.json"+ if os.path.exists(metrics_path):+ metrics = read_json(metrics_path)+ wall.append(metrics["wallSeconds"])+ ram.append(metrics["peakRamMegabytes"])+ vram.append(metrics["peakVramDeltaMegabytes"])+ shared.append(not metrics.get("gpuExclusive", False))+ elif "card" in report:+ vram.append(report["card"]["deltaMebibytes"])+ shared.append(report["card"]["utilizationBeforePercent"] >= 20)+ rows.append({+ "engine": engine, "samples": samples, "runs": len(runs),+ "relMse": spread(relative), "flip": flips[0], "channelMeanRatio": mean_ratios,+ "samplingSeconds": spread(sampling), "totalSeconds": spread(total),+ "processWallSeconds": spread(wall) if wall else None,+ "peakRamMegabytes": spread(ram) if ram else None,+ "peakCardVramDeltaMegabytes": spread(vram) if vram else None,+ "cardWasShared": any(shared) if shared else None,+ })+ rows.extend(score_seed_stacks(directory, scene, reference, reference_display))+ return {"scene": scene, "width": width, "rows": rows, "equalError": equal_error_and_time(rows)}+++def score_seed_stacks(directory, scene, reference, reference_display):+ """Cook traces of 256 samples with seeds 1..n averaged into 256 * n samples, for the counts one trace cannot reach.++ Seed 1 is the repetition-1 trace of the ladder. The time of a stack is the sum of its traces; the kernel compile is counted once.+ """+ rows = []+ for backend in ("gpu", "webgpu"):+ seed_paths = {1: str(directory / f"{scene}-cook-{backend}-s256-r1")}+ for seed_path in glob.glob(str(directory / f"{scene}-cook-{backend}-s256-seed*.npy")):+ seed_number = int(seed_path.rsplit("seed", 1)[1][: -len(".npy")])+ seed_paths[seed_number] = seed_path[: -len(".npy")]+ ordered = [seed_paths[number] for number in sorted(seed_paths)]+ for count in (2, 4, 8, 16):+ if len(ordered) < count:+ continue+ chosen = ordered[:count]+ average = np.mean([COMPARE.load_linear_rgb_image(f"{prefix}.npy") for prefix in chosen], axis=0)+ reports = [read_json(f"{prefix}.json") for prefix in chosen]+ compile_seconds = reports[0]["report"].get("gpuCompileSeconds", 0.0)+ sampling_seconds = sum(report["report"]["tracedSeconds"] - report["report"].get("gpuCompileSeconds", 0.0) for report in reports)+ comparison = COMPARE.compare_image_pair(reference, average)+ single = {"median": 0, "min": 0, "max": 0, "runs": []}+ rows.append({+ "engine": f"cook-{backend}", "samples": 256 * count, "runs": 1, "stackOf": count,+ "relMse": {**single, "median": round(comparison["relMse"], 6)}, "flip": flip_score(reference_display, display_of_linear(average.astype(np.float32))),+ "channelMeanRatio": comparison["channelMeanRatio"],+ "samplingSeconds": {**single, "median": round(sampling_seconds, 4)}, "totalSeconds": {**single, "median": round(sampling_seconds + compile_seconds, 4)},+ "processWallSeconds": None, "peakRamMegabytes": None, "peakCardVramDeltaMegabytes": None, "cardWasShared": None,+ })+ return rows+++def equal_error_and_time(rows):+ cycles_256 = next((row for row in rows if row["engine"] == "cycles" and row["samples"] == 256), None)+ if cycles_256 is None:+ return None+ target_error = cycles_256["relMse"]["median"]+ result = {"target": {"cyclesSamples": 256, "relMse": target_error, "samplingSeconds": cycles_256["samplingSeconds"]["median"], "totalSeconds": cycles_256["totalSeconds"]["median"]}, "engines": {}}+ for engine in sorted({row["engine"] for row in rows if row["engine"] != "cycles"}):+ engine_rows = [row for row in rows if row["engine"] == engine]+ entry = {}+ for time_key in ("samplingSeconds", "totalSeconds"):+ error_points = [(row[time_key]["median"], row["relMse"]["median"]) for row in engine_rows]+ sample_points = [(row["relMse"]["median"], row["samples"]) for row in engine_rows]+ time_points = [(row["relMse"]["median"], row[time_key]["median"]) for row in engine_rows]+ # relMSE falls as time rises, so interpolate time and samples as functions of the error.+ seconds_at_equal_error = log_interpolate(target_error, time_points)+ samples_at_equal_error = log_interpolate(target_error, sample_points)+ error_at_equal_time = log_interpolate(result["target"][time_key], error_points)+ entry[time_key] = {+ "secondsAtEqualError": None if seconds_at_equal_error is None else round(seconds_at_equal_error, 3),+ "samplesAtEqualError": None if samples_at_equal_error is None else round(samples_at_equal_error),+ "relMseAtEqualTime": None if error_at_equal_time is None else round(error_at_equal_time, 6),+ "measuredRange": {"minSamples": min(row["samples"] for row in engine_rows), "maxSamples": max(row["samples"] for row in engine_rows), "bestRelMse": min(row["relMse"]["median"] for row in engine_rows)},+ }+ result["engines"][engine] = entry+ return result+++def score_raster(work_directory, scenes, width):+ height = width * 9 // 16+ glaze = read_json(Path(work_directory) / "glaze" / f"glaze-{width}.json")+ rows = []+ for scene in scenes:+ reference = COMPARE.load_linear_rgb_image(str(reference_paths(work_directory, scene, width)))+ reference_display = display_of_linear(reference)+ for tier in ("draft", "realtime"):+ runs = [run for run in glaze["runs"] if run["sceneId"] == scene and run["tierName"] == tier]+ flips = []+ relatives = []+ for run in runs:+ image = load_png(Path(work_directory) / "glaze" / f"{scene}-{tier}-{width}-r{run['repetition']}.png", width, height)+ flips.append(flip_score(reference_display, image))+ relatives.append(display_relative_mse(reference_display, image))+ rows.append({+ "scene": scene, "engine": "glaze", "tier": tier, "width": width,+ "canvas": f"{runs[0]['canvasWidth']}x{runs[0]['canvasHeight']}",+ "firstFrameMilliseconds": spread([run["firstFrameMilliseconds"] for run in runs]),+ "setupMilliseconds": spread([run["setupMilliseconds"] for run in runs]),+ "frameMilliseconds": spread([run["medianFrameMilliseconds"] for run in runs]),+ "flip": spread(flips), "displayRelMse": spread(relatives),+ "renderTargetMegabytes": runs[0]["memoryReport"]["totalMegabytes"],+ "peakCardDeltaMebibytes": spread([run["card"]["deltaMebibytes"] for run in runs]),+ "cardUtilizationPeakPercent": spread([run["card"]["utilizationPeakPercent"] for run in runs]),+ "samples": runs[0]["capabilities"]["samples"],+ })+ for preset in ("lowest", "default"):+ prefixes = sorted(glob.glob(str(Path(work_directory) / "eevee" / f"{scene}-{preset}-{width}-r*.npy")))+ if not prefixes:+ continue+ flips = []+ relatives = []+ linear_relatives = []+ first_frames = []+ frames = []+ vram = []+ ram = []+ for npy_path in prefixes:+ prefix = npy_path[: -len(".npy")]+ report = read_json(f"{prefix}.json")+ linear = np.load(npy_path)+ display = display_of_linear(linear)+ flips.append(flip_score(reference_display, display))+ relatives.append(display_relative_mse(reference_display, display))+ linear_relatives.append(COMPARE.compute_relative_mse(reference, linear.astype(np.float64))["relMse"])+ first_frames.append(report["firstFrameSeconds"] * 1000)+ frames.append(report["medianFrameSeconds"] * 1000)+ if os.path.exists(f"{prefix}.metrics.json"):+ metrics = read_json(f"{prefix}.metrics.json")+ vram.append(metrics["peakVramDeltaMegabytes"])+ ram.append(metrics["peakRamMegabytes"])+ rows.append({+ "scene": scene, "engine": "eevee", "tier": preset, "width": width,+ "firstFrameMilliseconds": spread(first_frames), "frameMilliseconds": spread(frames),+ "flip": spread(flips), "displayRelMse": spread(relatives), "linearRelMse": spread(linear_relatives),+ "peakCardDeltaMebibytes": spread(vram) if vram else None, "peakRamMegabytes": spread(ram) if ram else None,+ "effectiveSettings": read_json(f"{prefixes[0][:-4]}.json")["effectiveSettings"],+ })+ return {"width": width, "rows": rows}+++def score_settle(work_directory, scene, bounds, width):+ height = width * 9 // 16+ reference = COMPARE.load_linear_rgb_image(str(reference_paths(work_directory, scene, width)))+ reference_display = display_of_linear(reference)+ result = {"scene": scene, "width": width, "bounds": bounds, "backends": {}}+ for summary_path in sorted(glob.glob(str(Path(work_directory) / "settle" / f"{scene}-*-{width}.json"))):+ summary = read_json(summary_path)+ checkpoints = []+ for checkpoint in summary["checkpoints"]:+ image = load_png(Path(summary_path).with_name(f"{Path(summary_path).stem}-f{checkpoint['frame']}.png"), width, height)+ checkpoints.append({"frame": checkpoint["frame"], "elapsedSeconds": round(checkpoint["elapsedSeconds"], 3), "flip": flip_score(reference_display, image)})+ reached = {}+ for bound in bounds:+ hit = next((entry for entry in checkpoints if entry["flip"] <= bound), None)+ reached[str(bound)] = None if hit is None else {"frame": hit["frame"], "elapsedSeconds": hit["elapsedSeconds"]}+ result["backends"][summary["requestedBackend"]] = {+ "drawnBackend": summary["backend"], "fallbackReason": summary["fallbackReason"], "gpu": summary["gpu"], "compileSeconds": summary["compileSeconds"],+ "medianFrameMilliseconds": summary["medianFrameMilliseconds"], "checkpoints": checkpoints, "timeToBound": reached,+ "card": summary.get("card"),+ }+ return result+++def main():+ arguments = sys.argv[1:]+ command, work_directory, scene_text = arguments[0], arguments[1], arguments[2]+ width = int(flag_value(arguments, "--width", "960"))+ if command == "final":+ output = score_final(work_directory, scene_text, width)+ elif command == "raster":+ output = score_raster(work_directory, scene_text.split(","), width)+ elif command == "settle":+ output = score_settle(work_directory, scene_text, [float(bound) for bound in flag_value(arguments, "--bound", "0.15,0.10").split(",")], width)+ else:+ raise SystemExit(f"Unknown command {command}.")+ destination = Path(work_directory) / f"scores-{command}-{scene_text.replace(',', '+')}-{width}.json"+ destination.write_text(json.dumps(output, indent=1) + "\n", encoding="utf-8")+ print(f"wrote {destination}")+++main()diff --git a/bench/tiers/tiers.mjs b/bench/tiers/tiers.mjsnew file mode 100644index 00000000..b533042e--- /dev/null+++ b/bench/tiers/tiers.mjs@@ -0,0 +1,54 @@+// What each tier runs in the tier benchmark. Names are working names from issue #890; `quality` is planned (#904), so none of this is an API.+// A Glaze tier is the set of Renderer67 options plus the frame effects of the reference harness. A setting that is not listed keeps its default.++// The realtime tier is Glaze as the reference suite draws it: every option at the value bench/reference/harness.js passes.+export const REALTIME_TIER = {+ label: 'realtime',+ rendererOptions: {+ // The suite's own choice for an HDR frame with a depth buffer, which the fog and occlusion effects need.+ hdr: true,+ depth: true,+ // 4 samples of multisampling: the renderer's default.+ samples: 4,+ // One canvas pixel per CSS pixel, so the frame is the size of the viewport (the renderer's default is 1.5).+ pixelRatio: 1,+ // Full shading: image based lighting, soft shadows and the specular model of the 'full' mode.+ shading: 'full',+ },+ frameEffects: {+ // Ambient occlusion and bloom are off by default; the suite leaves them off.+ ambientOcclusion: 0,+ },+};++// The draft tier (planned name): the cheapest frame Glaze can draw today, with the settings that exist now.+export const DRAFT_TIER = {+ label: 'draft (planned name)',+ rendererOptions: {+ hdr: true,+ depth: true,+ // Half the render scale: a quarter of the pixels, then shown at the viewport size by the browser or by the scorer.+ pixelRatio: 0.5,+ // The least multisampling the renderer accepts (it rejects 0): 1 sample is no multisampling, so edges alias, which is the+ // first thing a draft gives up. The drawn sample count is recorded as capabilities.samples in glaze.json.+ samples: 1,+ // 'light' shading drops the prefiltered environment lookup and the wide shadow filter and uses a cheaper Fresnel term.+ shading: 'light',+ },+ frameEffects: {+ // No ambient occlusion pass. Bloom is off unless a frame asks for it, and this one does not.+ ambientOcclusion: 0,+ },+ // Not a setting: the shadow map is 2048 by 2048 whenever a part casts (SHADOW_MAP_SIZE in src/renderer.js), so no cheaper shadow exists yet.+ notAvailable: ['smaller shadow map', 'screen space effects off by name'],+};++// The EEVEE 5.3 counterparts, applied by render-eevee.py. EEVEE draws its default of 64 samples for a final frame; the draft row+// uses the least it can: one sample, no shadow soft rays, no raytracing.+export const EEVEE_PRESETS = {+ default: { taaRenderSamples: 64, raytracing: false, description: 'EEVEE 5.3 defaults, as a new scene opens' },+ lowest: { taaRenderSamples: 1, raytracing: false, shadowRayCount: 1, shadowStepCount: 1, description: 'EEVEE 5.3 at one sample with the fewest shadow rays and steps' },+};++export const BASE_RESOLUTION = { width: 960, height: 540 };+export const HIGH_RESOLUTION = { width: 1920, height: 1080 };