Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
cybersoulK opened this issue Jan 28, 2024 · 0 comments · Fixed by #1122
Closed
Labels
t: bug Something isn't working

Comments

@cybersoulK
Copy link

num-traits = { version = "0.2.15", default-features = false, features = ["libm"] }
glam = { version = ">=0.22, <=0.24", default-features = false, features = ["libm"] }

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant