Added benchmarks and fixed a parallelism bug
This commit is contained in:
1 parent
d61552c33c
commit
d08bc33e8d
19 files changed
+758
-27
No files matched your search
@@ -18,6 +18,30 @@ Rendering goes through wgpu. On a machine without a GPU, the same shaders run
|
||||
on the CPU through Mesa's lavapipe (`vulkan-swrast` on Arch,
|
||||
`mesa-vulkan-drivers` on Debian and Ubuntu).
|
||||
|
||||
## Performance and fidelity
|
||||
|
||||
Lighting and camera fidelity are chosen separately: lighting tiers L0 to L3,
|
||||
camera tiers C0 to C3. A row is added here as each tier lands, with its
|
||||
measured cost and a sample image from the same scene, so the cost of each step
|
||||
up is visible at a glance.
|
||||
|
||||
| Tier | Lighting | Camera | RTX 3060 | lavapipe (CPU) | Sample |
|
||||
|---|---|---|---|---|---|
|
||||
| L0 / C0 | Lambertian surfaces, Earth's and the Moon's limbs exact, eclipse by Earth and the Moon, no shadows on the target, no light from Earth | Pinhole, absolute radiometry to 12-bit DN, no noise or blur | 1.8–2.1 ms | 8–65 ms | [](docs/images/l0-c0.png) |
|
||||
|
||||
Times are one 1920 x 1080 RGB frame end to end (`submit` to `wait`, readback
|
||||
of the DN image included), median of criterion runs, over models from 12 to
|
||||
752,000 triangles: the box-wing, Landsat 8 and ICESat-2. The GPU's own work is
|
||||
0.3 to 0.6 ms of that; reading 12 MB back and copying it out is most of the
|
||||
rest. lavapipe ran on the Intel Core Ultra 9 285K's 24 cores. The run-to-run
|
||||
noise is about 3 %. The sample is the Landsat 8 example scene
|
||||
(`examples/scenes/landsat8.toml`). `cargo bench -p resolved` reproduces the
|
||||
numbers, and `resolved render --timings N` shows the per-pass split.
|
||||
|
||||
Planned tiers: L1 adds self-shadowing, Earthshine and albedo maps (M2); C1
|
||||
and C2 add lens distortion, blur and detector noise (M3); L2 adds measured
|
||||
materials and the atmosphere (M4); L3 is path traced (M5).
|
||||
|
||||
## Usage
|
||||
|
||||
```rust
|
||||
@@ -149,6 +173,17 @@ them needs a Vulkan driver for the GPU and lavapipe installed. Set
|
||||
`WGPU_BACKEND`, `WGPU_ADAPTER_NAME` and the other standard wgpu environment
|
||||
variables to steer adapter discovery.
|
||||
|
||||
Benchmarks are end-to-end frame times (`submit` then `wait`, readback
|
||||
included) on the GPU and on lavapipe, at two resolutions, for the box-wing and,
|
||||
once fetched, Landsat 8 and ICESat-2:
|
||||
|
||||
```sh
|
||||
cargo bench -p resolved
|
||||
```
|
||||
|
||||
For where a frame's time goes, `resolved render --timings N` adds GPU
|
||||
timestamps around each pass (`RendererOptions::profile` in the library).
|
||||
|
||||
To see what the GPU tests render, set `RESOLVED_TEST_IMAGES=1`. Each test then
|
||||
writes a PNG per device to `target/tmp/test-images/`, scaled so a white
|
||||
surface facing the Sun is full white:
|
||||
|
||||
Reference in new issue
Block a user