1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! GPU compute infrastructure for `indicatrix` (behind the `gpu` feature).
//!
//! Adapter/device acquisition, a minimal compute-pipeline harness, buffer
//! upload/readback helpers, and the struct-layout/RNG/self-determinism
//! self-tests any physics port must pass before its output can be trusted.
//! No real GPU raytracer exists yet
//! (`renderer::pipeline::IndicatrixRaytracerPipeline` still panics
//! unconditionally); this module is plumbing and verification for a future
//! port of `optics::raytracer::trace_spectral_ray`.
//!
//! # Modules
//!
//! - [`context`]: adapter/device acquisition ([`GpuContext`]).
//! - [`compute`]: generic compute-pipeline/buffer helpers.
//! - [`layout_check`]: struct-layout GPU echo test.
//! - [`rng_check`]: RNG/integer bit-exactness test against the CPU.
//! - [`determinism_check`]: GPU self-determinism test.
//!
//! `examples/gpu_equivalence_harness.rs` (gated on `gpu`, needs a real adapter
//! so it isn't a `cargo test` target) runs all three self-tests together.
// Geometry/environment self-tests against analytic truth: camera rays, the
// `intersect_polyhedron` slab test, studio environment sampling, CIE 1931 CMF
// integration, von Kries white balance. No transport physics.
pub
// Full isotropic spectral estimator self-test (Fresnel/TIR, Stokes-Mueller
// transport, pleochroic Beer-Lambert absorption, Russian roulette, spectral
// MIS) -- cubic materials only; birefringence not covered here.
// Self-test for `shading_normal_near_edge`; kept separate (own `planes`
// binding) from `transport_check`/`transport_functions.wgsl`.
// Not a self-test: renders an arbitrary scene with the megakernel every
// module above verifies, via the dispatch routine `estimator_check` uses.
// CPU+GPU hybrid rendering: GPU and every CPU core trace disjoint sample
// ranges of one frame concurrently, merging into one image.
//
// Excluded on wasm32: `std::thread::scope` needs real OS threads, and the
// `webgpu` backend's `wgpu::Device` holds `Rc`-based handles that aren't
// `Send` -- a hard compile error there regardless. `apps/indicatrix-web`
// never calls this module.
pub use ;
pub use ;