From af5355c69de81f7505bfc09336d67b226abb1292 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sat, 25 Mar 2017 06:14:19 +0100 Subject: [PATCH] - fix SSE intrinsics being used on arm --- src/polyrenderer/drawers/screen_triangle.cpp | 6 +++--- src/polyrenderer/drawers/screen_triangle.h | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/polyrenderer/drawers/screen_triangle.cpp b/src/polyrenderer/drawers/screen_triangle.cpp index 640dd0fda..37a14c062 100644 --- a/src/polyrenderer/drawers/screen_triangle.cpp +++ b/src/polyrenderer/drawers/screen_triangle.cpp @@ -58,7 +58,7 @@ void ScreenTriangle::SetupNormal(const TriDrawTriangleArgs *args, WorkerThreadDa TriPartialBlock * RESTRICT partial = thread->PartialBlocks; // 28.4 fixed-point coordinates -#if NO_SSE +#ifdef NO_SSE const int Y1 = (int)round(16.0f * v1.y); const int Y2 = (int)round(16.0f * v2.y); const int Y3 = (int)round(16.0f * v3.y); @@ -227,7 +227,7 @@ void ScreenTriangle::SetupNormal(const TriDrawTriangleArgs *args, WorkerThreadDa uint32_t mask0 = 0; uint32_t mask1 = 0; -#if NO_SSE +#ifdef NO_SSE for (int iy = 0; iy < 4; iy++) { int CX1 = CY1; @@ -399,7 +399,7 @@ void ScreenTriangle::SetupSubsector(const TriDrawTriangleArgs *args, WorkerThrea TriPartialBlock * RESTRICT partial = thread->PartialBlocks; // 28.4 fixed-point coordinates -#if NO_SSE +#ifdef NO_SSE const int Y1 = (int)round(16.0f * v1.y); const int Y2 = (int)round(16.0f * v2.y); const int Y3 = (int)round(16.0f * v3.y); diff --git a/src/polyrenderer/drawers/screen_triangle.h b/src/polyrenderer/drawers/screen_triangle.h index 470029c84..40f786a4a 100644 --- a/src/polyrenderer/drawers/screen_triangle.h +++ b/src/polyrenderer/drawers/screen_triangle.h @@ -25,6 +25,10 @@ #include #include +#if defined(__arm__) && !defined(NO_SSE) +#define NO_SSE +#endif + class FString; struct TriFullSpan