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

Add hardware accelerated floating point square root #40

Closed
wants to merge 8 commits into from

Conversation

Kuratius
Copy link

@Kuratius Kuratius commented Apr 29, 2024

Related to #39, #37 Can be disabled with a linker option if it causes issues. I removed the fdiv and fmul implementations again because they weren't that much faster than gcc's own in my tests, but there was a large difference for sqrtf, and I was able to match it the default implementation bit-for-bit just by adding rounding.

@Kuratius
Copy link
Author

Kuratius commented Apr 29, 2024

I apparently also replace a float->u16 function that uses float adds, sorry forgot about this. There's also some changes to the makefile in this.

@Kuratius
Copy link
Author

The define in math.h is probably also unnecessary, I'll remove it.

@Kuratius
Copy link
Author

Kuratius commented May 5, 2024

image
Don't merge this until I get rid of this issue, one of the changes (not the sqrtf) causes a frame to be misrendered at the start of the game. I may open a new PR for just the square root function once it has been retested and added to blocksds.

@Kuratius Kuratius closed this May 5, 2024
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.

1 participant