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
https://github.com/EmbarkStudios/rust-gpu/blob/1a9c8b8ba1dfb4b7dbe26d0fd55265de6b36d00f/crates/spirv-std/Cargo.toml#L14-L15
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