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

Remove global -ffast-math flag, instead apply fast math to just color_helpers.cpp #1494

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sharkautarch
Copy link

@sharkautarch sharkautarch commented Aug 29, 2024

Should fix #1493

@misyltoad
Copy link
Collaborator

I'd rather just have the pragma thing, rather than the denorms thing... We can come back to it if we want it.

@sharkautarch sharkautarch force-pushed the fix-the-mathz branch 3 times, most recently from 442eb4b to 3e0552e Compare August 29, 2024 21:46
@sharkautarch
Copy link
Author

sharkautarch commented Aug 29, 2024

@Joshua-Ashton
instead of turning on ftz/daz globally, I ended up using some intrinsics for x86 and aarch64 to just turn on ftz/daz inside calcColorTransform create_color_mgmt_luts, w/ the msrs being restored after returning from the function
Let me know if this is ok, or just too complicated

@Exotic0015
Copy link

Can confirm this fixes #1493.

@sharkautarch sharkautarch force-pushed the fix-the-mathz branch 10 times, most recently from 6545090 to 43e87da Compare August 30, 2024 01:18
@sharkautarch sharkautarch reopened this Aug 30, 2024
@sharkautarch sharkautarch force-pushed the fix-the-mathz branch 10 times, most recently from 51539cf to f8051ff Compare September 1, 2024 14:27
@sharkautarch
Copy link
Author

Edited to remove the msr things as per misyl’s feedback

@bandithedoge
Copy link

This should also fix #1622.

@sharkautarch
Copy link
Author

Slight edit to PR:
reduced the scope of FAST_MATH_ON so that it no longer is applied to glm headers (except for the matrix headers, bc it's unlikely to be used outside of color_helpers.cpp), in case they are ever used outside of the color helpers stuff in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiling with O3 on Clang causes blurriness on Wayland
4 participants