From d4a83ff23501559d489d35e42c27e4c6836909f5 Mon Sep 17 00:00:00 2001 From: Falco Girgis Date: Wed, 31 Jan 2024 14:46:49 -0600 Subject: [PATCH] Fixed a double promotion, put back prefetching. --- GL/matrix.c | 6 +++--- GL/platforms/sh4.h | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/GL/matrix.c b/GL/matrix.c index d95cd49..bfa2f12 100644 --- a/GL/matrix.c +++ b/GL/matrix.c @@ -6,7 +6,7 @@ #include "../containers/stack.h" -#define DEG2RAD (0.01745329251994329576923690768489) +#define DEG2RAD (0.01745329251994329576923690768489f) /* Depth range */ @@ -174,8 +174,8 @@ void APIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) { }; float r = DEG2RAD * angle; - float c = cos(r); - float s = sin(r); + float c = fcos(r); + float s = fsin(r); VEC3_NORMALIZE(x, y, z); diff --git a/GL/platforms/sh4.h b/GL/platforms/sh4.h index 9e51f78..46c3513 100644 --- a/GL/platforms/sh4.h +++ b/GL/platforms/sh4.h @@ -24,8 +24,7 @@ #define GL_FORCE_INLINE static GL_INLINE_DEBUG #endif -#define PREFETCH(addr) (void)0 -//((void)addr)//__builtin_prefetch((addr)) +#define PREFETCH(addr) __builtin_prefetch((addr)) GL_FORCE_INLINE void* memcpy_fast(void *dest, const void *src, size_t len) { if(!len) {