Skip to content

v0.5.0

Choose a tag to compare

@HarperZ9 HarperZ9 released this 04 Oct 01:20
874032c

raw-native renders a test scene, computes ambient occlusion two ways, and writes a certificate saying whether the fast screen-space estimate held against a ray-traced reference. Version 0.5.0 adds a native D3D12 backend for Windows and a superstack.receipt/1 receipt beside every certificate.

Download and run

File Platform
raw-native-0.5.0-windows-x64.zip Windows 10 or 11, x64. CPU only, static runtime, no installer, loads only KERNEL32.dll.
raw-native-0.5.0-windows-x64-d3d12.zip Windows 10 or 11, x64, with the D3D12 backend. --gpu needs a hardware GPU; software adapters are refused. Adds only d3d12.dll and dxgi.dll.
raw-native-0.5.0-linux-x64.tar.gz Linux x64 with glibc 2.38 or newer.
raw-native-0.5.0-wasm.zip Browser or Node: the CPU build and the WebGPU build. Also published loose.

Every archive carries LICENSE (FSL-1.1-MIT) and LICENSE-superstack.txt, the MIT notice for the vendored superstack header linked into the CLI.

sha256sum -c SHA256SUMS
raw_native_cli --out ./out
raw_native_cli verify ./out

On Windows with a hardware GPU, from the D3D12 archive:

raw_native_cli.exe --gpu --out out-gpu --width 1440 --height 900
raw_native_cli.exe verify out-gpu

What is new

  • Native D3D12. Built with -DRAW_NATIVE_GPU_D3D12=ON, raw_native_cli --gpu renders the whole frame on D3D12 and writes the same raw-gpu-cert/1 certificate against the CPU reference, judged by the bounds committed in raw/gpu_tolerance.hpp before any GPU code existed. The HLSL is generated from the WGSL by scripts/wgsl_to_hlsl.py and compiled by DXC with strict IEEE float; CI regenerates it on every push and fails on any difference, so there is one shader source.
  • Software adapters are refused. The backend takes the first hardware adapter in high-performance order. It skips any adapter flagged as software and the Microsoft Basic Render Driver, which DXGI can list without the software flag. With no hardware adapter, --gpu exits 4 with an unverifiable GPU certificate naming what it skipped. RAW_NATIVE_D3D12_WARP=1 selects WARP on purpose.
  • superstack receipts. Every render writes receipt.json (superstack.receipt/1): canonical JSON with a SHA-256 seal, reporting identity (MATCH or DRIFT) and the tolerance verdict separately. A --gpu run adds gpu_receipt.json, comparing the GPU frame's RGB8 bytes with the CPU frame's. raw_native_cli verify rechecks the seal, every digest, the subject and reference hashes and the verdict.
  • Additive schema changes. certificate.json (raw-cert/2) is unchanged byte for byte apart from the version string. gpu_certificate.json gains identity, both frame hashes and adapter.driver; params.backend now names the build's backend (d3d12, webgpu or none).
  • The default Windows build and the CPU wasm build still contain no GPU code. There, --gpu exits 4 with an unverifiable certificate.

Checked before release

  • D3D12 on an RTX 4090: 16 of 16 GPU certificates verified across three frame sizes and five camera views, with and without the ray-traced pass, plus a moving camera. Coverage agrees on every pixel. The largest channel RMSE is 4.2e-5 against a bound of 0.01; the largest single pixel error is 1/64, one hemisphere ray. The 8-bit GPU frame equals the CPU frame (MATCH) in 13 of 16 renders; the other 3 (DRIFT, still verified) are ray-traced renders where a few pixels differ by one ray.
  • WebGPU in headed Chrome 154: the same 16 of 16, with the same identity split and every channel's RMSE and maximum error equal to the D3D12 run. D3D12 and WebGPU agree on all 104 compared summary values; that is equal summaries, not a per-pixel comparison of the two GPU frames.
  • WARP: 16 of 16 with RMSE exactly 0 on every channel and every frame byte-identical to the CPU's. WARP is software, so this shows the WGSL to HLSL translation is exact. It is not GPU evidence.
  • The released raw-native-gpu.wasm is byte-identical to the build that produced the WebGPU evidence.
  • The default render's certificate.json, frame.ppm, frame_hdr.pfm, channels.json and all AO files are byte-identical from the packaged Windows, Windows D3D12, Linux and CPU wasm builds (certificate.json SHA-256 235ad718...). receipt.json is byte-identical across the three native builds. Every file 0.4.0 also wrote hashes the same as in 0.4.0, apart from the certificate's version string.
  • raw_native_cli verify passes on every packaged build's output, run with the Windows, Windows D3D12 and Linux binaries.
  • 34 of 34 tests pass with MSVC 19.50 and GCC 13.3. The D3D12 build adds a hardware runtime test, which CI reports as skipped with its reason because the runner has no GPU.

Speed on the RTX 4090

Median of 5 renders after one warm-up, milliseconds. "Every channel" reads back all nine buffers; "frame only" reads back the shaded frame.

Frame Mode D3D12, every channel D3D12, frame only WebGPU, every channel WebGPU, frame only CPU, one thread
256 x 256 Full 5.6 3.9 11.7 4.9 258
512 x 512 Full 12.2 5.0 34.5 8.9 1,028
1440 x 900 Full 48.8 16.0 94.9 24.3 4,527
256 x 256 No RT 5.0 3.1 9.0 3.0 29
512 x 512 No RT 11.5 5.3 26.7 4.9 118
1440 x 900 No RT 45.7 13.2 86.3 15.3 527

Raw runs: evidence/bench-d3d12-rtx4090.json, evidence/d3d12-rtx4090-checks.json, evidence/webgpu-rtx4090-chromium.json, evidence/d3d12-warp-checks.json.

Limits

  • One GPU, one driver and one OS measured: an RTX 4090 on NVIDIA 610.88, Windows 11 build 26220. Another adapter or driver may differ in either direction.
  • WebGPU timings vary between sessions. The v0.4.0 run on the same machine measured 6.8, 14.3 and 72.7 ms for the full frame with every channel, against 11.7, 34.5 and 94.9 here. Read the WebGPU columns as a range, not a point.
  • The wasm build writes no superstack receipt. superstack 0.1.0's header does not compile with libc++, which Emscripten uses, so the wasm build prints receipt: not written and verify reports the file as absent. This stays until superstack fixes its Emscripten build upstream. The wasm build's certificate and image files are still byte-identical to native.
  • One built-in scene. Agreement with the CPU is not agreement with ground truth: the CPU reference is itself a 64-sample estimate.

Licensed FSL-1.1-MIT. Version 0.2.0 and earlier stay MIT.