rust-gpu icon indicating copy to clipboard operation
rust-gpu copied to clipboard

adding spirv-std anywhere in the worskspace, slows down the CPU code due to libm feature

Open cybersoulK opened this issue 1 year ago • 0 comments

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

cybersoulK avatar Jan 28 '24 02:01 cybersoulK