-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
basis_universal: Unbundle jpgd to fix symbol conflict, use our newer copy with SSE2 support #88508
Conversation
75ba36d
to
48ed047
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I don't think Godot even uses BasisU's file loading feature, so nothing should break.
This seems to make the binary slightly larger for some reason (Linux x86_64 editor build with
I'd have expected the binary to be slightly smaller instead. |
@Calinou it's probably because this version has more changes and thus has probably some new code additions which translate into the binary size. |
That's pretty weird, but I can reproduce the size difference too with
It's a bit counterintuitive... |
So I think the size difference can be explained by the SSE2 support code present in I made a test build of this PR + the SSE2 support disabled, and the size exactly the same as
So this means this LTO warning wasn't benign, but actually a sign that the basisu copy of jpgd was taking precedence over the copy in jpeg-compressor, and thus we were losing the (enabled by default) SSE2 support. So this should fix a bug for regular JPEG decompression, which may become faster? The size increase comes from the added SSE2 code. |
Ran a test import 500 JPGs with Running on a Linux laptop with balanced CPU profile, on AC. The results aren't exactly clear.
Same benchmark with performance CPU profile:
So there seems to be a significant JPG import performance gain between this PR (with or without SSE2) and |
Cherry-picked for 4.2.2. |
Should fix the basis_universal LTO warning from #88504:
Our
thirdparty/jpeg-compressor
copy is the latest from https://github.com/richgel999/jpeg-compressor, which has some additional commits not present in the basisu version. I'll see if Rich is interested in updating this dep upstream too.CC @BlueCube3310