63 lines
2.2 KiB
Diff
63 lines
2.2 KiB
Diff
From 24f1cc2e69795fb9759a73f7529b9c24ea727701 Mon Sep 17 00:00:00 2001
|
|
From: JohnnyonFlame <johnnyonflame@hotmail.com>
|
|
Date: Thu, 11 Mar 2021 20:46:38 -0300
|
|
Subject: [PATCH 177/233] Added GOA_CLONE definitions. Sets compilation
|
|
definitions for GO Advance clones, such as the RG351p/v, Gameforce Chi, RGB10
|
|
and other such devices.
|
|
|
|
---
|
|
CMakeLists.txt | 7 +++++++
|
|
src/gl/init.c | 4 ++--
|
|
2 files changed, 9 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 9fd1f491..3cc3bfea 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -12,6 +12,7 @@ option(PANDORA "Set to ON if targeting an OpenPandora device" ${PANDORA})
|
|
option(PYRA "Set to ON if targeting an Dragonbox Pyra device" ${PYRA})
|
|
option(BCMHOST "Set to ON if targeting an RPi(2) device" ${BCMHOST})
|
|
option(ODROID "Set to ON if targeting an ODroid device" ${ODROID})
|
|
+option(GOA_CLONE "Set to ON if targeting GO Advance clones, like RG351p/v, Gameforce Chi, RGB10..." ${GOA_CLONE})
|
|
option(ANDROID "Set to ON if targeting an Android device" ${ANDROID})
|
|
option(CHIP "Set to ON if targeting an C.H.I.P. device" ${CHIP})
|
|
option(AMIGAOS4 "Set to ON if targeting an AmigaOS4/Warp3D platform (activate NOEGL and NOX11)" ${AMIGAOS4})
|
|
@@ -88,6 +89,12 @@ if(ODROID)
|
|
add_definitions(-DODROID)
|
|
endif()
|
|
|
|
+# GOA_CLONE
|
|
+if(GOA_CLONE)
|
|
+ add_definitions(-DGOA_CLONE)
|
|
+ add_definitions(-mcpu=cortex-a35 -mfpu=neon-vfpv3 -march=armv8-a+crc+simd+crypto -mfloat-abi=hard -ftree-vectorize -fsingle-precision-constant -ffast-math)
|
|
+endif()
|
|
+
|
|
# Android
|
|
if(ANDROID)
|
|
add_definitions(-DANDROID)
|
|
diff --git a/src/gl/init.c b/src/gl/init.c
|
|
index b182ba9b..e7dc31ae 100644
|
|
--- a/src/gl/init.c
|
|
+++ b/src/gl/init.c
|
|
@@ -33,7 +33,7 @@ void fpe_shader_reset_internals();
|
|
|
|
globals4es_t globals4es = {0};
|
|
|
|
-#if defined(PANDORA) || defined(CHIP)
|
|
+#if defined(PANDORA) || defined(CHIP) || defined(GOA_CLONE)
|
|
static void fast_math() {
|
|
// enable Cortex A8 RunFast
|
|
int v = 0;
|
|
@@ -385,7 +385,7 @@ void initialize_gl4es() {
|
|
}
|
|
|
|
if(IsEnvVarTrue("LIBGL_FASTMATH")) {
|
|
-#if defined(PANDORA) || defined(CHIP)
|
|
+#if defined(PANDORA) || defined(CHIP) || defined(GOA_CLONE)
|
|
SHUT_LOGD("Enable FastMath for cortex-a8\n");
|
|
fast_math();
|
|
#else
|
|
--
|
|
2.11.0
|
|
|