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

Optimize casts in softgpu #17618

Merged
merged 3 commits into from
Jun 25, 2023
Merged

Conversation

unknownbrackets
Copy link
Collaborator

Just from the notes in #17613, thanks @fp64. I'm sometimes seeing about 2% improvement from this (mainly the cast, somewhere - maybe texture coords), which is pretty good.

-[Unknown]

A number of these were falling back to some pretty terrible code.
Thanks to fp64 for noticing.
Seems like a small benefit, but not seeing any issues from this.
Noticed by fp64.
@unknownbrackets unknownbrackets added this to the v1.16.0 milestone Jun 24, 2023
@unknownbrackets unknownbrackets changed the title Softgpu opt cast Optimize casts in softgpu Jun 24, 2023
@fp64
Copy link
Contributor

fp64 commented Jun 24, 2023

Regarding _mm_loadu_ps workaround: it is present here and in, say, Vec4<float>::ToRGBA(), but not in e.g. Vec4<float>::operator+. Is that one immune somehow, or just missing it?

@unknownbrackets
Copy link
Collaborator Author

Probably + and * were just never used in a way that resulted in a crash so no one noticed (i.e. variables that weren't spilled or something.) Probably a bit dangerous... made a quick change. But I don't really want to burn too much time on x86_32, tbh, I have low hopes mainly due to core counts.

-[Unknown]

@hrydgard hrydgard merged commit 08d578d into hrydgard:master Jun 25, 2023
@unknownbrackets unknownbrackets deleted the softgpu-opt-cast branch June 25, 2023 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants