gpu-parity: FXC/D3D11 check of cultmath snoise and snoise_grad #1
Loading…
Reference in a new issue
No description provided.
Delete branch "nibu/gpu-snoise-parity"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes follow-up
asura:follow_up:gpu-snoise-parity.tools/gpu-parity/: a console project that compiles CultLib's ownCultMath.hlsl(included throughfxc /I, not copied) with fxc.exe under default flags and/Gis, runscultmath_snoise(float2),cultmath_snoise(float3)andcultmath_snoise_grad(xyz = gradient, w = value) as a D3D11 compute shader with structured-buffer readback, and compares with C#math.snoise/snoise_grad. CultLib is pinned tocultmath-unity-v0.5.0by a runtime check. Dependencies: Vortice.Direct3D11 only; fxc.exe is shelled out.Run on Starfire (GTX 1070), 163928 points (43928 tie-constructed with 0 to 2 ulp neighbours, 120000 seeded random at scales 4/64/1024). Stated tolerance, absolute, by input magnitude (<=8, <=128, <=1024): value 4.2e-6 / 7.2e-5 / 1.65e-3, gradient 3.3e-5 / 4.2e-4 / 6.8e-3. Default and
/Gishave the same maxima, so the error is ulp-of-input scaled GPU/CPU rounding in x0, not FMA contraction. Max measured: value 3.1e-6 / 5.3e-5 / 1.2e-3, gradient 2.4e-5 / 3.1e-4 / 5.0e-3. GPU/CPU simplex-ordering branch differs at 190/35814 float3 and 39 float2 tie points (|p|<=8), all within tolerance; reported, not failed. Details and run instructions intools/gpu-parity/README.md.Not covered: other drivers or GPUs; snoise_hessian; the HLSL under Unity's own fxc invocation (flags may differ); the branch probe is a separate expression tree.
🤖 Generated with Claude Code