adding spirv-std anywhere in the worskspace, slows down the CPU code due to libm feature
cybersoulK opened this issue · comments
cybersoulK commented
rust-gpu/crates/spirv-std/Cargo.toml
Lines 14 to 15 in 1a9c8b8
it was slowing down my cpu code by 3x, specifically the glam Vec3::distance.
it's really bad because new users might enable it in the shaders crate within the workspace early in development, without realizing the impact in performance.
Possible solution:
spirv-std crate should only enable libm for spirv target in Cargo.toml