From 67a1487e54b378aeaf3bd8a5e232bc690adb607a Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 28 Sep 2024 19:18:00 +1000 Subject: [PATCH] Common: Build fix when compiling with AVX2 march --- src/common/gsvector_sse.h | 4 ++-- src/core/gpu_sw_rasterizer.cpp | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/common/gsvector_sse.h b/src/common/gsvector_sse.h index 77462d88b..e62246ace 100644 --- a/src/common/gsvector_sse.h +++ b/src/common/gsvector_sse.h @@ -2640,7 +2640,7 @@ public: template ALWAYS_INLINE GSVector8i srl() const { - return GSVector8i(_mm256_srli_si128(m, i)); + return GSVector8i(_mm256_srli_si256(m, i)); } template @@ -2652,7 +2652,7 @@ public: template ALWAYS_INLINE GSVector8i sll() const { - return GSVector8i(_mm256_slli_si128(m, i)); + return GSVector8i(_mm256_slli_si256(m, i)); } template diff --git a/src/core/gpu_sw_rasterizer.cpp b/src/core/gpu_sw_rasterizer.cpp index 87fd65134..f2648dcd0 100644 --- a/src/core/gpu_sw_rasterizer.cpp +++ b/src/core/gpu_sw_rasterizer.cpp @@ -6,11 +6,19 @@ #include "cpuinfo.h" +#include "common/gsvector.h" #include "common/log.h" #include "common/string_util.h" LOG_CHANNEL(GPU_SW_Rasterizer); +// Disable 256-bit. We emit that path in a separate file. +// TODO: For those who are compiling with -march=native, probably only want to compile the 256-bit renderer. +// Once it's done, anyway.... +#ifdef GSVECTOR_HAS_256 +#undef GSVECTOR_HAS_256 +#endif + namespace GPU_SW_Rasterizer { constinit const DitherLUT g_dither_lut = []() constexpr { DitherLUT lut = {};