Faster inversion
This commit is contained in:
parent
6be3e6185d
commit
a248f3a50c
|
@ -25,7 +25,7 @@ if(NOT PLATFORM_DREAMCAST)
|
|||
set(FIND_LIBRARY_USE_LIB64_PATHS false)
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 --fast-math -fexpensive-optimizations -funroll-all-loops")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -mfsrra -ffp-contract=fast -mfsca -ffast-math -fexpensive-optimizations -funroll-all-loops")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -g -Wall -Wextra")
|
||||
|
||||
set(
|
||||
|
|
|
@ -49,7 +49,7 @@ void SceneListBegin(GPUList list) {
|
|||
|
||||
GL_FORCE_INLINE float _glFastInvert(float x) {
|
||||
const float sgn = (x > 0) - (x < 0);
|
||||
return sgn * MATH_fsrra(x * x);
|
||||
return sgn * (1.f / __builtin_sqrtf(x * x));
|
||||
}
|
||||
|
||||
GL_FORCE_INLINE void _glPerspectiveDivideVertex(Vertex* vertex, const float h) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user