Skip to content

Optimize casts in softgpu#17618

Merged
hrydgard merged 3 commits into
hrydgard:masterfrom
unknownbrackets:softgpu-opt-cast
Jun 25, 2023
Merged

Optimize casts in softgpu#17618
hrydgard merged 3 commits into
hrydgard:masterfrom
unknownbrackets:softgpu-opt-cast

Conversation

@unknownbrackets

Copy link
Copy Markdown
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

fp64 commented Jun 24, 2023

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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