Merge separate NEON functions into the normal functions.

We no longer support non-NEON ARM.

It's nice also to have the NEON and SSE implementations "close" to each
other, easier to port optimizations back and forth etc.
This commit is contained in:
Henrik Rydgård
2022-04-12 22:56:05 +02:00
parent 6de574104c
commit a68ddd0a8d
34 changed files with 437 additions and 855 deletions
-7
View File
@@ -433,7 +433,6 @@ set(CommonARM
Common/ArmCPUDetect.cpp
Common/ArmEmitter.h
Common/ArmEmitter.cpp
Common/Data/Convert/ColorConvNEON.cpp
)
source_group(ARM FILES ${CommonARM})
@@ -1515,9 +1514,6 @@ if(WIN32)
list(APPEND GPU_IMPLS ${GPU_D3D9} ${GPU_D3D11})
endif()
if(ARMV7 OR ARM64)
set(GPU_NEON GPU/Common/TextureDecoderNEON.cpp)
endif()
set(GPU_SOURCES
${GPU_IMPLS}
${GPU_NEON}
@@ -1976,8 +1972,6 @@ add_library(${CoreLibName} ${CoreLinkType}
Core/ThreadPools.h
Core/Util/AudioFormat.cpp
Core/Util/AudioFormat.h
Core/Util/AudioFormatNEON.cpp
Core/Util/AudioFormatNEON.h
Core/Util/GameManager.cpp
Core/Util/GameManager.h
Core/Util/PortManager.cpp
@@ -1986,7 +1980,6 @@ add_library(${CoreLibName} ${CoreLinkType}
Core/Util/BlockAllocator.h
Core/Util/PPGeDraw.cpp
Core/Util/PPGeDraw.h
${CORE_NEON}
${GPU_SOURCES}
ext/disarm.cpp
${CMAKE_CURRENT_BINARY_DIR}/git-version.cpp
-11
View File
@@ -476,7 +476,6 @@
<ClInclude Include="LogReporting.h" />
<ClInclude Include="Serialize\SerializeDeque.h" />
<ClInclude Include="Serialize\SerializeFuncs.h" />
<ClInclude Include="Data\Convert\ColorConvNEON.h" />
<ClInclude Include="Serialize\SerializeList.h" />
<ClInclude Include="Serialize\SerializeMap.h" />
<ClInclude Include="Serialize\Serializer.h" />
@@ -814,16 +813,6 @@
</ClCompile>
<ClCompile Include="ArmEmitter.cpp" />
<ClCompile Include="Buffer.cpp" />
<ClCompile Include="Data\Convert\ColorConvNEON.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="Data\Color\RGBAUtil.cpp" />
<ClCompile Include="Data\Convert\SmallDataConvert.cpp" />
<ClCompile Include="Data\Encoding\Base64.cpp" />
-6
View File
@@ -374,9 +374,6 @@
<ClInclude Include="GPU\ShaderTranslation.h">
<Filter>GPU</Filter>
</ClInclude>
<ClInclude Include="Data\Convert\ColorConvNEON.h">
<Filter>Data\Convert</Filter>
</ClInclude>
<ClInclude Include="Data\Convert\ColorConv.h">
<Filter>Data\Convert</Filter>
</ClInclude>
@@ -768,9 +765,6 @@
<ClCompile Include="GPU\ShaderTranslation.cpp">
<Filter>GPU</Filter>
</ClCompile>
<ClCompile Include="Data\Convert\ColorConvNEON.cpp">
<Filter>Data\Convert</Filter>
</ClCompile>
<ClCompile Include="Data\Convert\ColorConv.cpp">
<Filter>Data\Convert</Filter>
</ClCompile>
+78 -24
View File
@@ -18,8 +18,6 @@
#include "ppsspp_config.h"
#include "Common/Data/Convert/ColorConv.h"
#include "Common/Data/Convert/SmallDataConvert.h"
// NEON is in a separate file so that it can be compiled with a runtime check.
#include "Common/Data/Convert/ColorConvNEON.h"
#include "Common/Common.h"
#include "Common/CPUDetect.h"
@@ -28,6 +26,14 @@
#include <smmintrin.h>
#endif
#if PPSSPP_ARCH(ARM_NEON)
#if defined(_MSC_VER) && PPSSPP_ARCH(ARM64)
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif
#endif
inline u16 RGBA8888toRGB565(u32 px) {
return ((px >> 3) & 0x001F) | ((px >> 5) & 0x07E0) | ((px >> 8) & 0xF800);
}
@@ -134,8 +140,6 @@ void convert5551_dx9(u16* data, u32* out, int width, int l, int u) {
}
}
void ConvertBGRA8888ToRGBA8888(u32 *dst, const u32 *src, u32 numPixels) {
#ifdef _M_SSE
const __m128i maskGA = _mm_set1_epi32(0xFF00FF00);
@@ -540,7 +544,7 @@ void ConvertRGB565ToBGRA8888(u32 *dst, const u16 *src, u32 numPixels) {
}
}
void ConvertRGBA4444ToABGR4444Basic(u16 *dst, const u16 *src, u32 numPixels) {
void ConvertRGBA4444ToABGR4444(u16 *dst, const u16 *src, u32 numPixels) {
#ifdef _M_SSE
const __m128i mask0040 = _mm_set1_epi16(0x00F0);
@@ -560,6 +564,28 @@ void ConvertRGBA4444ToABGR4444Basic(u16 *dst, const u16 *src, u32 numPixels) {
}
// The remainder is done in chunks of 2, SSE was chunks of 8.
u32 i = sseChunks * 8 / 2;
#elif PPSSPP_ARCH(ARM_NEON)
const uint16x8_t mask0040 = vdupq_n_u16(0x00F0);
if (((uintptr_t)dst & 15) == 0 && ((uintptr_t)src & 15) == 0) {
u32 simdable = (numPixels / 8) * 8;
for (u32 i = 0; i < simdable; i += 8) {
uint16x8_t c = vld1q_u16(src);
const uint16x8_t a = vshrq_n_u16(c, 12);
const uint16x8_t b = vandq_u16(vshrq_n_u16(c, 4), mask0040);
const uint16x8_t g = vshlq_n_u16(vandq_u16(c, mask0040), 4);
const uint16x8_t r = vshlq_n_u16(c, 12);
uint16x8_t res = vorrq_u16(vorrq_u16(r, g), vorrq_u16(b, a));
vst1q_u16(dst, res);
src += 8;
dst += 8;
}
numPixels -= simdable;
}
u32 i = 0; // already moved the pointers forward
#else
u32 i = 0;
#endif
@@ -584,7 +610,7 @@ void ConvertRGBA4444ToABGR4444Basic(u16 *dst, const u16 *src, u32 numPixels) {
}
}
void ConvertRGBA5551ToABGR1555Basic(u16 *dst, const u16 *src, u32 numPixels) {
void ConvertRGBA5551ToABGR1555(u16 *dst, const u16 *src, u32 numPixels) {
#ifdef _M_SSE
const __m128i maskB = _mm_set1_epi16(0x003E);
const __m128i maskG = _mm_set1_epi16(0x07C0);
@@ -605,6 +631,29 @@ void ConvertRGBA5551ToABGR1555Basic(u16 *dst, const u16 *src, u32 numPixels) {
}
// The remainder is done in chunks of 2, SSE was chunks of 8.
u32 i = sseChunks * 8 / 2;
#elif PPSSPP_ARCH(ARM_NEON)
const uint16x8_t maskB = vdupq_n_u16(0x003E);
const uint16x8_t maskG = vdupq_n_u16(0x07C0);
if (((uintptr_t)dst & 15) == 0 && ((uintptr_t)src & 15) == 0) {
u32 simdable = (numPixels / 8) * 8;
for (u32 i = 0; i < simdable; i += 8) {
uint16x8_t c = vld1q_u16(src);
const uint16x8_t a = vshrq_n_u16(c, 15);
const uint16x8_t b = vandq_u16(vshrq_n_u16(c, 9), maskB);
const uint16x8_t g = vandq_u16(vshlq_n_u16(c, 1), maskG);
const uint16x8_t r = vshlq_n_u16(c, 11);
uint16x8_t res = vorrq_u16(vorrq_u16(r, g), vorrq_u16(b, a));
vst1q_u16(dst, res);
src += 8;
dst += 8;
}
numPixels -= simdable;
}
u32 i = 0;
#else
u32 i = 0;
#endif
@@ -629,7 +678,7 @@ void ConvertRGBA5551ToABGR1555Basic(u16 *dst, const u16 *src, u32 numPixels) {
}
}
void ConvertRGB565ToBGR565Basic(u16 *dst, const u16 *src, u32 numPixels) {
void ConvertRGB565ToBGR565(u16 *dst, const u16 *src, u32 numPixels) {
#ifdef _M_SSE
const __m128i maskG = _mm_set1_epi16(0x07E0);
@@ -648,6 +697,28 @@ void ConvertRGB565ToBGR565Basic(u16 *dst, const u16 *src, u32 numPixels) {
}
// The remainder is done in chunks of 2, SSE was chunks of 8.
u32 i = sseChunks * 8 / 2;
#elif PPSSPP_ARCH(ARM_NEON)
const uint16x8_t maskG = vdupq_n_u16(0x07E0);
if (((uintptr_t)dst & 15) == 0 && ((uintptr_t)src & 15) == 0) {
u32 simdable = (numPixels / 8) * 8;
for (u32 i = 0; i < simdable; i += 8) {
uint16x8_t c = vld1q_u16(src);
const uint16x8_t b = vshrq_n_u16(c, 11);
const uint16x8_t g = vandq_u16(c, maskG);
const uint16x8_t r = vshlq_n_u16(c, 11);
uint16x8_t res = vorrq_u16(vorrq_u16(r, g), b);
vst1q_u16(dst, res);
src += 8;
dst += 8;
}
numPixels -= simdable;
}
u32 i = 0;
#else
u32 i = 0;
#endif
@@ -684,20 +755,3 @@ void ConvertBGRA5551ToABGR1555(u16 *dst, const u16 *src, u32 numPixels) {
dst[i] = (c >> 15) | (c << 1);
}
}
// Reuse the logic from the header - if these aren't defined, we need externs.
#ifndef ConvertRGBA4444ToABGR4444
Convert16bppTo16bppFunc ConvertRGBA4444ToABGR4444 = &ConvertRGBA4444ToABGR4444Basic;
Convert16bppTo16bppFunc ConvertRGBA5551ToABGR1555 = &ConvertRGBA5551ToABGR1555Basic;
Convert16bppTo16bppFunc ConvertRGB565ToBGR565 = &ConvertRGB565ToBGR565Basic;
#endif
void SetupColorConv() {
#if PPSSPP_ARCH(ARM_NEON) && !PPSSPP_ARCH(ARM64)
if (cpu_info.bNEON) {
ConvertRGBA4444ToABGR4444 = &ConvertRGBA4444ToABGR4444NEON;
ConvertRGBA5551ToABGR1555 = &ConvertRGBA5551ToABGR1555NEON;
ConvertRGB565ToBGR565 = &ConvertRGB565ToBGR565NEON;
}
#endif
}
+3 -35
View File
@@ -19,9 +19,6 @@
#include "ppsspp_config.h"
#include "Common/CommonTypes.h"
#include "Common/Data/Convert/ColorConvNEON.h"
void SetupColorConv();
inline u8 Convert4To8(u8 v) {
// Swizzle bits: 00001234 -> 12341234
@@ -103,11 +100,6 @@ void convert5551_dx9(u16* data, u32* out, int width, int l, int u);
// TODO: Need to revisit the naming convention of these. Seems totally backwards
// now that we've standardized on Draw::DataFormat.
typedef void (*Convert16bppTo16bppFunc)(u16 *dst, const u16 *src, u32 numPixels);
typedef void (*Convert16bppTo32bppFunc)(u32 *dst, const u16 *src, u32 numPixels);
typedef void (*Convert32bppTo16bppFunc)(u16 *dst, const u32 *src, u32 numPixels);
typedef void (*Convert32bppTo32bppFunc)(u32 *dst, const u32 *src, u32 numPixels);
void ConvertBGRA8888ToRGBA8888(u32 *dst, const u32 *src, u32 numPixels);
#define ConvertRGBA8888ToBGRA8888 ConvertBGRA8888ToRGBA8888
void ConvertBGRA8888ToRGB888(u8 *dst, const u32 *src, u32 numPixels);
@@ -133,31 +125,7 @@ void ConvertRGBA4444ToBGRA8888(u32 *dst, const u16 *src, u32 numPixels);
void ConvertRGBA5551ToBGRA8888(u32 *dst, const u16 *src, u32 numPixels);
void ConvertRGB565ToBGRA8888(u32 *dst, const u16 *src, u32 numPixels);
void ConvertRGBA4444ToABGR4444Basic(u16 *dst, const u16 *src, u32 numPixels);
void ConvertRGBA5551ToABGR1555Basic(u16 *dst, const u16 *src, u32 numPixels);
void ConvertRGB565ToBGR565Basic(u16 *dst, const u16 *src, u32 numPixels);
void ConvertRGBA4444ToABGR4444(u16 *dst, const u16 *src, u32 numPixels);
void ConvertRGBA5551ToABGR1555(u16 *dst, const u16 *src, u32 numPixels);
void ConvertRGB565ToBGR565(u16 *dst, const u16 *src, u32 numPixels);
void ConvertBGRA5551ToABGR1555(u16 *dst, const u16 *src, u32 numPixels);
#if PPSSPP_ARCH(ARM64)
#define ConvertRGBA4444ToABGR4444 ConvertRGBA4444ToABGR4444NEON
#elif !PPSSPP_ARCH(ARM)
#define ConvertRGBA4444ToABGR4444 ConvertRGBA4444ToABGR4444Basic
#else
extern Convert16bppTo16bppFunc ConvertRGBA4444ToABGR4444;
#endif
#if PPSSPP_ARCH(ARM64)
#define ConvertRGBA5551ToABGR1555 ConvertRGBA5551ToABGR1555NEON
#elif !PPSSPP_ARCH(ARM)
#define ConvertRGBA5551ToABGR1555 ConvertRGBA5551ToABGR1555Basic
#else
extern Convert16bppTo16bppFunc ConvertRGBA5551ToABGR1555;
#endif
#if PPSSPP_ARCH(ARM64)
#define ConvertRGB565ToBGR565 ConvertRGB565ToBGR565NEON
#elif !PPSSPP_ARCH(ARM)
#define ConvertRGB565ToBGR565 ConvertRGB565ToBGR565Basic
#else
extern Convert16bppTo16bppFunc ConvertRGB565ToBGR565;
#endif
-118
View File
@@ -1,118 +0,0 @@
// Copyright (c) 2015- PPSSPP Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0 or later versions.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "ppsspp_config.h"
#if PPSSPP_ARCH(ARM_NEON)
#if defined(_MSC_VER) && PPSSPP_ARCH(ARM64)
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif
#include "Common/Data/Convert/ColorConvNEON.h"
#include "Common/CommonTypes.h"
#include "Common/CPUDetect.h"
// TODO: More NEON color conversion funcs.
void ConvertRGBA4444ToABGR4444NEON(u16 *dst, const u16 *src, u32 numPixels) {
const uint16x8_t mask0040 = vdupq_n_u16(0x00F0);
if (((uintptr_t)dst & 15) == 0 && ((uintptr_t)src & 15) == 0) {
u32 simdable = (numPixels / 8) * 8;
for (u32 i = 0; i < simdable; i += 8) {
uint16x8_t c = vld1q_u16(src);
const uint16x8_t a = vshrq_n_u16(c, 12);
const uint16x8_t b = vandq_u16(vshrq_n_u16(c, 4), mask0040);
const uint16x8_t g = vshlq_n_u16(vandq_u16(c, mask0040), 4);
const uint16x8_t r = vshlq_n_u16(c, 12);
uint16x8_t res = vorrq_u16(vorrq_u16(r, g), vorrq_u16(b, a));
vst1q_u16(dst, res);
src += 8;
dst += 8;
}
numPixels -= simdable;
}
// Finish off the rest, if there were any outside the simdable range.
if (numPixels > 0) {
// Note that we've already moved src/dst forward.
ConvertRGBA4444ToABGR4444Basic(dst, src, numPixels);
}
}
void ConvertRGBA5551ToABGR1555NEON(u16 *dst, const u16 *src, u32 numPixels) {
const uint16x8_t maskB = vdupq_n_u16(0x003E);
const uint16x8_t maskG = vdupq_n_u16(0x07C0);
if (((uintptr_t)dst & 15) == 0 && ((uintptr_t)src & 15) == 0) {
u32 simdable = (numPixels / 8) * 8;
for (u32 i = 0; i < simdable; i += 8) {
uint16x8_t c = vld1q_u16(src);
const uint16x8_t a = vshrq_n_u16(c, 15);
const uint16x8_t b = vandq_u16(vshrq_n_u16(c, 9), maskB);
const uint16x8_t g = vandq_u16(vshlq_n_u16(c, 1), maskG);
const uint16x8_t r = vshlq_n_u16(c, 11);
uint16x8_t res = vorrq_u16(vorrq_u16(r, g), vorrq_u16(b, a));
vst1q_u16(dst, res);
src += 8;
dst += 8;
}
numPixels -= simdable;
}
// Finish off the rest, if there were any outside the simdable range.
if (numPixels > 0) {
// Note that we've already moved src/dst forward.
ConvertRGBA5551ToABGR1555Basic(dst, src, numPixels);
}
}
void ConvertRGB565ToBGR565NEON(u16 *dst, const u16 *src, u32 numPixels) {
const uint16x8_t maskG = vdupq_n_u16(0x07E0);
if (((uintptr_t)dst & 15) == 0 && ((uintptr_t)src & 15) == 0) {
u32 simdable = (numPixels / 8) * 8;
for (u32 i = 0; i < simdable; i += 8) {
uint16x8_t c = vld1q_u16(src);
const uint16x8_t b = vshrq_n_u16(c, 11);
const uint16x8_t g = vandq_u16(c, maskG);
const uint16x8_t r = vshlq_n_u16(c, 11);
uint16x8_t res = vorrq_u16(vorrq_u16(r, g), b);
vst1q_u16(dst, res);
src += 8;
dst += 8;
}
numPixels -= simdable;
}
// Finish off the rest, if there were any outside the simdable range.
if (numPixels > 0) {
// Note that we've already moved src/dst forward.
ConvertRGB565ToBGR565Basic(dst, src, numPixels);
}
}
#endif // PPSSPP_ARCH(ARM_NEON)
-24
View File
@@ -1,24 +0,0 @@
// Copyright (c) 2015- PPSSPP Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0 or later versions.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#pragma once
#include "Common/Data/Convert/ColorConv.h"
void ConvertRGBA4444ToABGR4444NEON(u16 *dst, const u16 *src, u32 numPixels);
void ConvertRGBA5551ToABGR1555NEON(u16 *dst, const u16 *src, u32 numPixels);
void ConvertRGB565ToBGR565NEON(u16 *dst, const u16 *src, u32 numPixels);
-20
View File
@@ -991,16 +991,6 @@
<ClCompile Include="System.cpp" />
<ClCompile Include="ThreadPools.cpp" />
<ClCompile Include="Util\AudioFormat.cpp" />
<ClCompile Include="Util\AudioFormatNEON.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="Util\BlockAllocator.cpp" />
<ClCompile Include="Util\DisArm64.cpp" />
<ClCompile Include="Util\GameManager.cpp" />
@@ -1354,16 +1344,6 @@
<ClInclude Include="ThreadEventQueue.h" />
<ClInclude Include="ThreadPools.h" />
<ClInclude Include="Util\AudioFormat.h" />
<ClInclude Include="Util\AudioFormatNEON.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="Util\BlockAllocator.h" />
<ClInclude Include="Util\DisArm64.h" />
<ClInclude Include="Util\GameManager.h" />
-6
View File
@@ -577,9 +577,6 @@
<ClCompile Include="HLE\sceSha256.cpp">
<Filter>HLE\Libraries</Filter>
</ClCompile>
<ClCompile Include="Util\AudioFormatNEON.cpp">
<Filter>Util</Filter>
</ClCompile>
<ClCompile Include="Util\AudioFormat.cpp">
<Filter>Util</Filter>
</ClCompile>
@@ -1663,9 +1660,6 @@
<ClInclude Include="Util\AudioFormat.h">
<Filter>Util</Filter>
</ClInclude>
<ClInclude Include="Util\AudioFormatNEON.h">
<Filter>Util</Filter>
</ClInclude>
<ClInclude Include="..\ext\sfmt19937\SFMT.h">
<Filter>Ext\sfmt19937</Filter>
</ClInclude>
+43 -18
View File
@@ -19,13 +19,25 @@
#include "Common/Common.h"
#include "Common/CPUDetect.h"
#include "Core/Util/AudioFormat.h"
#include "Core/Util/AudioFormatNEON.h"
#ifdef _M_SSE
#include <emmintrin.h>
#endif
void AdjustVolumeBlockStandard(s16 *out, s16 *in, size_t size, int leftVol, int rightVol) {
#if PPSSPP_ARCH(ARM_NEON)
#if defined(_MSC_VER) && PPSSPP_ARCH(ARM64)
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif
#endif // PPSSPP_ARCH(ARM_NEON)
// TODO: This shouldn't be a global.
#if PPSSPP_ARCH(ARM_NEON)
alignas(16) static s16 volumeValues[4] = {};
#endif
void AdjustVolumeBlock(s16 *out, s16 *in, size_t size, int leftVol, int rightVol) {
#ifdef _M_SSE
if (leftVol <= 0x7fff && -leftVol <= 0x8000 && rightVol <= 0x7fff && -rightVol <= 0x8000) {
__m128i volume = _mm_set_epi16(leftVol, rightVol, leftVol, rightVol, leftVol, rightVol, leftVol, rightVol);
@@ -67,7 +79,36 @@ void AdjustVolumeBlockStandard(s16 *out, s16 *in, size_t size, int leftVol, int
}
}
#endif
#elif PPSSPP_ARCH(ARM_NEON)
if (leftVol <= 0xFFFF && -leftVol <= 0x10000 && rightVol <= 0xFFFF && -rightVol <= 0x10000) {
// Note: vqshrn_n_s32 takes a const argument, so we always go with 1 here, 15 there.
volumeValues[0] = leftVol >> 1;
volumeValues[1] = rightVol >> 1;
volumeValues[2] = leftVol >> 1;
volumeValues[3] = rightVol >> 1;
const int16x4_t vol = vld1_s16(volumeValues);
while (size >= 16) {
int16x8_t indata1 = vld1q_s16(in);
int16x8_t indata2 = vld1q_s16(in + 8);
int32x4_t outh1 = vmull_s16(vget_high_s16(indata1), vol);
int32x4_t outh2 = vmull_s16(vget_high_s16(indata2), vol);
int32x4_t outl1 = vmull_s16(vget_low_s16(indata1), vol);
int32x4_t outl2 = vmull_s16(vget_low_s16(indata2), vol);
int16x8_t outdata1 = vcombine_s16(vqshrn_n_s32(outl1, 15), vqshrn_n_s32(outh1, 15));
int16x8_t outdata2 = vcombine_s16(vqshrn_n_s32(outl2, 15), vqshrn_n_s32(outh2, 15));
vst1q_s16(out, outdata1);
vst1q_s16(out + 8, outdata2);
in += 16;
out += 16;
size -= 16;
}
}
#endif
if (leftVol <= 0x7fff && -leftVol <= 0x8000 && rightVol <= 0x7fff && -rightVol <= 0x8000) {
for (size_t i = 0; i < size; i += 2) {
out[i] = ApplySampleVolume(in[i], leftVol);
@@ -110,19 +151,3 @@ void ConvertS16ToF32(float *out, const s16 *in, size_t size) {
out[i] = in[i] * (1.0f / 32767.0f);
}
}
#if !defined(_M_SSE) && !PPSSPP_ARCH(ARM64)
AdjustVolumeBlockFunc AdjustVolumeBlock = &AdjustVolumeBlockStandard;
// This has to be done after CPUDetect has done its magic.
void SetupAudioFormats() {
#if PPSSPP_ARCH(ARM_NEON) && !PPSSPP_ARCH(ARM64)
if (cpu_info.bNEON) {
AdjustVolumeBlock = &AdjustVolumeBlockNEON;
}
#endif
}
#else
void SetupAudioFormats() {
}
#endif
+1 -12
View File
@@ -20,7 +20,6 @@
#include "ppsspp_config.h"
#include "Common/Common.h"
#include "Common/CommonTypes.h"
#include "Core/Util/AudioFormatNEON.h"
#define IS_LITTLE_ENDIAN (*(const u16 *)"\0\xff" >= 0x100)
@@ -66,15 +65,5 @@ static inline s16 ApplySampleVolume20Bit(s16 sample, int vol20) {
return clamp_s16((sample * (vol20 >> 4)) >> 12);
}
void SetupAudioFormats();
void AdjustVolumeBlockStandard(s16 *out, s16 *in, size_t size, int leftVol, int rightVol);
void AdjustVolumeBlock(s16 *out, s16 *in, size_t size, int leftVol, int rightVol);
void ConvertS16ToF32(float *ou, const s16 *in, size_t size);
#ifdef _M_SSE
#define AdjustVolumeBlock AdjustVolumeBlockStandard
#elif PPSSPP_ARCH(ARM64)
#define AdjustVolumeBlock AdjustVolumeBlockNEON
#else
typedef void (*AdjustVolumeBlockFunc)(s16 *out, s16 *in, size_t size, int leftVol, int rightVol);
extern AdjustVolumeBlockFunc AdjustVolumeBlock;
#endif
-78
View File
@@ -1,78 +0,0 @@
// Copyright (c) 2012- PPSSPP Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0 or later versions.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "ppsspp_config.h"
#if PPSSPP_ARCH(ARM_NEON)
#if defined(_MSC_VER) && PPSSPP_ARCH(ARM64)
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif
#include "Common/CommonTypes.h"
#include "Core/Util/AudioFormat.h"
#include "Core/Util/AudioFormatNEON.h"
#if !PPSSPP_ARCH(ARM) && !PPSSPP_ARCH(ARM64)
#error Should not be compiled on non-ARM.
#endif
alignas(16) static s16 volumeValues[4] = {};
void AdjustVolumeBlockNEON(s16 *out, s16 *in, size_t size, int leftVol, int rightVol) {
if (leftVol <= 0xFFFF && -leftVol <= 0x10000 && rightVol <= 0xFFFF && -rightVol <= 0x10000) {
// Note: vqshrn_n_s32 takes a const argument, so we always go with 1 here, 15 there.
volumeValues[0] = leftVol >> 1;
volumeValues[1] = rightVol >> 1;
volumeValues[2] = leftVol >> 1;
volumeValues[3] = rightVol >> 1;
const int16x4_t vol = vld1_s16(volumeValues);
while (size >= 16) {
int16x8_t indata1 = vld1q_s16(in);
int16x8_t indata2 = vld1q_s16(in + 8);
int32x4_t outh1 = vmull_s16(vget_high_s16(indata1), vol);
int32x4_t outh2 = vmull_s16(vget_high_s16(indata2), vol);
int32x4_t outl1 = vmull_s16(vget_low_s16(indata1), vol);
int32x4_t outl2 = vmull_s16(vget_low_s16(indata2), vol);
int16x8_t outdata1 = vcombine_s16(vqshrn_n_s32(outl1, 15), vqshrn_n_s32(outh1, 15));
int16x8_t outdata2 = vcombine_s16(vqshrn_n_s32(outl2, 15), vqshrn_n_s32(outh2, 15));
vst1q_s16(out, outdata1);
vst1q_s16(out + 8, outdata2);
in += 16;
out += 16;
size -= 16;
}
}
if (leftVol <= 0x7fff && -leftVol <= 0x8000 && rightVol <= 0x7fff && -rightVol <= 0x8000) {
for (size_t i = 0; i < size; i += 2) {
out[i] = ApplySampleVolume(in[i], leftVol);
out[i + 1] = ApplySampleVolume(in[i + 1], rightVol);
}
} else {
for (size_t i = 0; i < size; i += 2) {
out[i] = ApplySampleVolume20Bit(in[i], leftVol);
out[i + 1] = ApplySampleVolume20Bit(in[i + 1], rightVol);
}
}
}
#endif // PPSSPP_ARCH(ARM_NEON)
-22
View File
@@ -1,22 +0,0 @@
// Copyright (c) 2012- PPSSPP Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0 or later versions.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#pragma once
#include "Common/CommonTypes.h"
void AdjustVolumeBlockNEON(s16 *out, s16 *in, size_t size, int leftVol, int rightVol);
+281 -55
View File
@@ -16,7 +16,9 @@
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "ppsspp_config.h"
#include "ext/xxhash.h"
#include "Common/Common.h"
#include "Common/Data/Convert/ColorConv.h"
#include "Common/CPUDetect.h"
@@ -25,12 +27,21 @@
#include "GPU/GPU.h"
#include "GPU/GPUState.h"
#include "GPU/Common/TextureDecoder.h"
// NEON is in a separate file so that it can be compiled with a runtime check.
#include "GPU/Common/TextureDecoderNEON.h"
#ifdef _M_SSE
#include <emmintrin.h>
#include <smmintrin.h>
#endif
#if PPSSPP_ARCH(ARM_NEON)
#if defined(_MSC_VER) && PPSSPP_ARCH(ARM64)
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif
#endif
#ifdef _M_SSE
u32 QuickTexHashSSE2(const void *checkp, u32 size) {
u32 check = 0;
@@ -66,6 +77,107 @@ u32 QuickTexHashSSE2(const void *checkp, u32 size) {
}
#endif
#if PPSSPP_ARCH(ARM_NEON)
alignas(16) static const u16 QuickTexHashInitial[8] = { 0xc00bU, 0x9bd9U, 0x4b73U, 0xb651U, 0x4d9bU, 0x4309U, 0x0083U, 0x0001U };
u32 QuickTexHashNEON(const void *checkp, u32 size) {
u32 check = 0;
__builtin_prefetch(checkp, 0, 0);
if (((intptr_t)checkp & 0xf) == 0 && (size & 0x3f) == 0) {
#if PPSSPP_PLATFORM(IOS) || PPSSPP_ARCH(ARM64) || defined(_MSC_VER) || !PPSSPP_ARCH(ARMV7)
uint32x4_t cursor = vdupq_n_u32(0);
uint16x8_t cursor2 = vld1q_u16(QuickTexHashInitial);
uint16x8_t update = vdupq_n_u16(0x2455U);
const u32 *p = (const u32 *)checkp;
const u32 *pend = p + size / 4;
while (p < pend) {
cursor = vreinterpretq_u32_u16(vmlaq_u16(vreinterpretq_u16_u32(cursor), vreinterpretq_u16_u32(vld1q_u32(&p[4 * 0])), cursor2));
cursor = veorq_u32(cursor, vld1q_u32(&p[4 * 1]));
cursor = vaddq_u32(cursor, vld1q_u32(&p[4 * 2]));
cursor = veorq_u32(cursor, vreinterpretq_u32_u16(vmulq_u16(vreinterpretq_u16_u32(vld1q_u32(&p[4 * 3])), cursor2)));
cursor2 = vaddq_u16(cursor2, update);
p += 4 * 4;
}
cursor = vaddq_u32(cursor, vreinterpretq_u32_u16(cursor2));
uint32x2_t mixed = vadd_u32(vget_high_u32(cursor), vget_low_u32(cursor));
check = vget_lane_u32(mixed, 0) + vget_lane_u32(mixed, 1);
#else
// TODO: Why does this crash on iOS, but only certain devices?
// It's faster than the above, but I guess it sucks to be using an iPhone.
// As of 2020 clang, it's still faster by ~1.4%.
// d0/d1 (q0) - cursor
// d2/d3 (q1) - cursor2
// d4/d5 (q2) - update
// d16-d23 (q8-q11) - memory transfer
asm volatile (
// Initialize cursor.
"vmov.i32 q0, #0\n"
// Initialize cursor2.
"movw r0, 0xc00b\n"
"movt r0, 0x9bd9\n"
"movw r1, 0x4b73\n"
"movt r1, 0xb651\n"
"vmov d2, r0, r1\n"
"movw r0, 0x4d9b\n"
"movt r0, 0x4309\n"
"movw r1, 0x0083\n"
"movt r1, 0x0001\n"
"vmov d3, r0, r1\n"
// Initialize update.
"movw r0, 0x2455\n"
"vdup.i16 q2, r0\n"
// This is where we end.
"add r0, %1, %2\n"
// Okay, do the memory hashing.
"QuickTexHashNEON_next:\n"
"pld [%2, #0xc0]\n"
"vldmia %2!, {d16-d23}\n"
"vmla.i16 q0, q1, q8\n"
"vmul.i16 q11, q11, q1\n"
"veor.i32 q0, q0, q9\n"
"cmp %2, r0\n"
"vadd.i32 q0, q0, q10\n"
"vadd.i16 q1, q1, q2\n"
"veor.i32 q0, q0, q11\n"
"blo QuickTexHashNEON_next\n"
// Now let's get the result.
"vadd.i32 q0, q0, q1\n"
"vadd.i32 d0, d0, d1\n"
"vmov r0, r1, d0\n"
"add %0, r0, r1\n"
: "=r"(check)
: "r"(size), "r"(checkp)
: "r0", "r1", "d0", "d1", "d2", "d3", "d4", "d5", "d16", "d17", "d18", "d19", "d20", "d21", "d22", "d23", "cc"
);
#endif
} else {
const u32 size_u32 = size / 4;
const u32 *p = (const u32 *)checkp;
for (u32 i = 0; i < size_u32; i += 4) {
check += p[i + 0];
check ^= p[i + 1];
check += p[i + 2];
check ^= p[i + 3];
}
}
return check;
}
#endif // PPSSPP_ARCH(ARM_NEON)
// Masks to downalign bufw to 16 bytes, and wrap at 2048.
static const u32 textureAlignMask16[16] = {
0x7FF & ~(((8 * 16) / 16) - 1), //GE_TFMT_5650,
@@ -99,6 +211,7 @@ u32 GetTextureBufw(int level, u32 texaddr, GETextureFormat format) {
return bufw;
}
// Is this compatible with QuickTexHashNEON/SSE?
u32 QuickTexHashNonSSE(const void *checkp, u32 size) {
u32 check = 0;
@@ -150,39 +263,7 @@ u32 QuickTexHashNonSSE(const void *checkp, u32 size) {
return check;
}
#if !PPSSPP_ARCH(ARM64) && !defined(_M_SSE)
static u32 QuickTexHashBasic(const void *checkp, u32 size) {
#if PPSSPP_ARCH(ARM) && defined(__GNUC__)
__builtin_prefetch(checkp, 0, 0);
u32 check;
asm volatile (
// Let's change size to the end address.
"add %1, %1, %2\n"
"mov r6, #0\n"
".align 2\n"
// If we have zero sized input, we'll return garbage. Oh well, shouldn't happen.
"QuickTexHashBasic_next:\n"
"ldmia %2!, {r2-r5}\n"
"add r6, r6, r2\n"
"eor r6, r6, r3\n"
"cmp %2, %1\n"
"add r6, r6, r4\n"
"eor r6, r6, r5\n"
"blo QuickTexHashBasic_next\n"
".align 2\n"
"QuickTexHashBasic_done:\n"
"mov %0, r6\n"
: "=r"(check)
: "r"(size), "r"(checkp)
: "r2", "r3", "r4", "r5", "r6"
);
#else
u32 QuickTexHashBasic(const void *checkp, u32 size) {
u32 check = 0;
const u32 size_u32 = size / 4;
const u32 *p = (const u32 *)checkp;
@@ -192,11 +273,9 @@ static u32 QuickTexHashBasic(const void *checkp, u32 size) {
check += p[i + 2];
check ^= p[i + 3];
}
#endif
return check;
}
#endif
void DoSwizzleTex16(const u32 *ysrcp, u8 *texptr, int bxc, int byc, u32 pitch) {
// ysrcp is in 32-bits, so this is convenient.
@@ -252,11 +331,12 @@ void DoSwizzleTex16(const u32 *ysrcp, u8 *texptr, int bxc, int byc, u32 pitch) {
}
}
void DoUnswizzleTex16Basic(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32 pitch) {
void DoUnswizzleTex16(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32 pitch) {
// ydestp is in 32-bits, so this is convenient.
const u32 pitchBy32 = pitch >> 2;
#ifdef _M_SSE
// This check is pretty much a given, right?
if (((uintptr_t)ydestp & 0xF) == 0 && (pitch & 0xF) == 0) {
const __m128i *src = (const __m128i *)texptr;
// The pitch parameter is in bytes, so shift down for 128-bit.
@@ -287,6 +367,37 @@ void DoUnswizzleTex16Basic(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32
ydestp += pitchBy32 * 8;
}
} else
#elif PPSSPP_ARCH(ARM_NEON)
if (((uintptr_t)ydestp & 0xF) == 0 && (pitch & 0xF) == 0) {
// TODO: Does this really do anything meaningful?
__builtin_prefetch(texptr, 0, 0);
const u32 *src = (const u32 *)texptr;
for (int by = 0; by < byc; by++) {
u32 *xdest = ydestp;
for (int bx = 0; bx < bxc; bx++) {
u32 *dest = xdest;
for (int n = 0; n < 2; n++) {
// Textures are always 16-byte aligned so this is fine.
uint32x4_t temp1 = vld1q_u32(src);
uint32x4_t temp2 = vld1q_u32(src + 4);
uint32x4_t temp3 = vld1q_u32(src + 8);
uint32x4_t temp4 = vld1q_u32(src + 12);
vst1q_u32(dest, temp1);
dest += pitchBy32;
vst1q_u32(dest, temp2);
dest += pitchBy32;
vst1q_u32(dest, temp3);
dest += pitchBy32;
vst1q_u32(dest, temp4);
dest += pitchBy32;
src += 16;
}
xdest += 4;
}
ydestp += pitchBy32 * 8;
}
} else
#endif
{
const u32 *src = (const u32 *)texptr;
@@ -306,23 +417,6 @@ void DoUnswizzleTex16Basic(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32
}
}
#if !PPSSPP_ARCH(ARM64) && !defined(_M_SSE)
QuickTexHashFunc DoQuickTexHash = &QuickTexHashBasic;
QuickTexHashFunc StableQuickTexHash = &QuickTexHashNonSSE;
UnswizzleTex16Func DoUnswizzleTex16 = &DoUnswizzleTex16Basic;
#endif
// This has to be done after CPUDetect has done its magic.
void SetupTextureDecoder() {
#if PPSSPP_ARCH(ARM_NEON) && !PPSSPP_ARCH(ARM64)
if (cpu_info.bNEON) {
DoQuickTexHash = &QuickTexHashNEON;
StableQuickTexHash = &QuickTexHashNEON;
DoUnswizzleTex16 = &DoUnswizzleTex16NEON;
}
#endif
}
// S3TC / DXT Decoder
class DXTDecoder {
public:
@@ -661,6 +755,138 @@ CheckAlphaResult CheckAlphaRGBA5551SSE2(const u32 *pixelData, int stride, int w,
return CHECKALPHA_FULL;
}
#endif // _M_SSE
#if PPSSPP_ARCH(ARM_NEON)
static inline bool VectorIsNonZeroNEON(const uint32x4_t &v) {
u64 low = vgetq_lane_u64(vreinterpretq_u64_u32(v), 0);
u64 high = vgetq_lane_u64(vreinterpretq_u64_u32(v), 1);
return (low | high) != 0;
}
#ifndef _MSC_VER
// MSVC consider this function the same as the one above! uint16x8_t is typedef'd to the same type as uint32x4_t.
static inline bool VectorIsNonZeroNEON(const uint16x8_t &v) {
u64 low = vgetq_lane_u64(vreinterpretq_u64_u16(v), 0);
u64 high = vgetq_lane_u64(vreinterpretq_u64_u16(v), 1);
return (low | high) != 0;
}
#endif
CheckAlphaResult CheckAlphaRGBA8888NEON(const u32 *pixelData, int stride, int w, int h) {
const u32 *p = (const u32 *)pixelData;
const uint32x4_t mask = vdupq_n_u32(0xFF000000);
uint32x4_t bits = mask;
for (int y = 0; y < h; ++y) {
for (int i = 0; i < w; i += 4) {
const uint32x4_t a = vld1q_u32(&p[i]);
bits = vandq_u32(bits, a);
}
uint32x4_t result = veorq_u32(bits, mask);
if (VectorIsNonZeroNEON(result)) {
return CHECKALPHA_ANY;
}
p += stride;
}
return CHECKALPHA_FULL;
}
CheckAlphaResult CheckAlphaABGR4444NEON(const u32 *pixelData, int stride, int w, int h) {
const u16 *p = (const u16 *)pixelData;
const uint16x8_t mask = vdupq_n_u16((u16)0x000F);
uint16x8_t bits = mask;
for (int y = 0; y < h; ++y) {
for (int i = 0; i < w; i += 8) {
const uint16x8_t a = vld1q_u16(&p[i]);
bits = vandq_u16(bits, a);
}
uint16x8_t result = veorq_u16(bits, mask);
if (VectorIsNonZeroNEON(result)) {
return CHECKALPHA_ANY;
}
p += stride;
}
return CHECKALPHA_FULL;
}
CheckAlphaResult CheckAlphaABGR1555NEON(const u32 *pixelData, int stride, int w, int h) {
const u16 *p = (const u16 *)pixelData;
const uint16x8_t mask = vdupq_n_u16((u16)0x0001);
uint16x8_t bits = mask;
for (int y = 0; y < h; ++y) {
for (int i = 0; i < w; i += 8) {
const uint16x8_t a = vld1q_u16(&p[i]);
bits = vandq_u16(bits, a);
}
uint16x8_t result = veorq_u16(bits, mask);
if (VectorIsNonZeroNEON(result)) {
return CHECKALPHA_ANY;
}
p += stride;
}
return CHECKALPHA_FULL;
}
CheckAlphaResult CheckAlphaRGBA4444NEON(const u32 *pixelData, int stride, int w, int h) {
const u16 *p = (const u16 *)pixelData;
const uint16x8_t mask = vdupq_n_u16((u16)0xF000);
uint16x8_t bits = mask;
for (int y = 0; y < h; ++y) {
for (int i = 0; i < w; i += 8) {
const uint16x8_t a = vld1q_u16(&p[i]);
bits = vandq_u16(bits, a);
}
uint16x8_t result = veorq_u16(bits, mask);
if (VectorIsNonZeroNEON(result)) {
return CHECKALPHA_ANY;
}
p += stride;
}
return CHECKALPHA_FULL;
}
CheckAlphaResult CheckAlphaRGBA5551NEON(const u32 *pixelData, int stride, int w, int h) {
const u16 *p = (const u16 *)pixelData;
const uint16x8_t mask = vdupq_n_u16((u16)0x8000);
uint16x8_t bits = mask;
for (int y = 0; y < h; ++y) {
for (int i = 0; i < w; i += 8) {
const uint16x8_t a = vld1q_u16(&p[i]);
bits = vandq_u16(bits, a);
}
uint16x8_t result = veorq_u16(bits, mask);
if (VectorIsNonZeroNEON(result)) {
return CHECKALPHA_ANY;
}
p += stride;
}
return CHECKALPHA_FULL;
}
#endif
CheckAlphaResult CheckAlphaRGBA8888Basic(const u32 *pixelData, int stride, int w, int h) {
+23 -24
View File
@@ -17,25 +17,24 @@
#pragma once
#include "ppsspp_config.h"
#include "Common/Common.h"
#include "Common/Swap.h"
#include "Core/MemMap.h"
#include "Core/ConfigValues.h"
#include "GPU/ge_constants.h"
#include "GPU/GPUState.h"
enum CheckAlphaResult {
// These are intended to line up with TexCacheEntry::STATUS_ALPHA_UNKNOWN, etc.
CHECKALPHA_FULL = 0,
CHECKALPHA_ANY = 4,
};
#include "ppsspp_config.h"
#include "Common/Common.h"
#include "Common/Swap.h"
#include "Core/MemMap.h"
#include "Core/ConfigValues.h"
#include "GPU/ge_constants.h"
#include "GPU/Common/TextureDecoderNEON.h"
#include "GPU/GPUState.h"
void SetupTextureDecoder();
// Pitch must be aligned to 16 bits (as is the case on a PSP)
// For both of these, pitch must be aligned to 16 bits (as is the case on a PSP).
void DoSwizzleTex16(const u32 *ysrcp, u8 *texptr, int bxc, int byc, u32 pitch);
void DoUnswizzleTex16(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32 pitch);
// For SSE, we statically link the SSE2 algorithms.
#if defined(_M_SSE)
@@ -43,22 +42,22 @@ u32 QuickTexHashSSE2(const void *checkp, u32 size);
#define DoQuickTexHash QuickTexHashSSE2
#define StableQuickTexHash QuickTexHashSSE2
// Pitch must be aligned to 16 bytes (as is the case on a PSP)
void DoUnswizzleTex16Basic(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32 pitch);
#define DoUnswizzleTex16 DoUnswizzleTex16Basic
// For ARM/ARM64, NEON is mandatory, so we also statically link.
#elif PPSSPP_ARCH(ARM_NEON)
u32 QuickTexHashNEON(const void *checkp, u32 size);
// For ARM64, NEON is mandatory, so we also statically link.
#elif PPSSPP_ARCH(ARM64)
#define DoQuickTexHash QuickTexHashNEON
#define StableQuickTexHash QuickTexHashNEON
#define DoUnswizzleTex16 DoUnswizzleTex16NEON
#else
typedef u32 (*QuickTexHashFunc)(const void *checkp, u32 size);
extern QuickTexHashFunc DoQuickTexHash;
extern QuickTexHashFunc StableQuickTexHash;
typedef void (*UnswizzleTex16Func)(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32 pitch);
extern UnswizzleTex16Func DoUnswizzleTex16;
#else
u32 QuickTexHashBasic(const void *checkp, u32 size);
u32 QuickTexHashNonSSE(const void *checkp, u32 size);
#define DoQuickTexHash QuickTexHashBasic
#define StableQuickTexHash QuickTexHashNonSSE
#endif
CheckAlphaResult CheckAlphaRGBA8888Basic(const u32 *pixelData, int stride, int w, int h);
-295
View File
@@ -1,295 +0,0 @@
// Copyright (c) 2012- PPSSPP Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0 or later versions.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "ppsspp_config.h"
#if PPSSPP_ARCH(ARM_NEON)
#include "ext/xxhash.h"
#if defined(_MSC_VER) && PPSSPP_ARCH(ARM64)
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif
#include "GPU/GPUState.h"
#include "GPU/Common/TextureDecoder.h"
alignas(16) static const u16 QuickTexHashInitial[8] = {0xc00bU, 0x9bd9U, 0x4b73U, 0xb651U, 0x4d9bU, 0x4309U, 0x0083U, 0x0001U};
#ifdef _MSC_VER
#define __builtin_prefetch(a,b,c)
#endif
u32 QuickTexHashNEON(const void *checkp, u32 size) {
u32 check = 0;
__builtin_prefetch(checkp, 0, 0);
if (((intptr_t)checkp & 0xf) == 0 && (size & 0x3f) == 0) {
#if PPSSPP_PLATFORM(IOS) || PPSSPP_ARCH(ARM64) || defined(_MSC_VER) || !PPSSPP_ARCH(ARMV7)
uint32x4_t cursor = vdupq_n_u32(0);
uint16x8_t cursor2 = vld1q_u16(QuickTexHashInitial);
uint16x8_t update = vdupq_n_u16(0x2455U);
const u32 *p = (const u32 *)checkp;
const u32 *pend = p + size / 4;
while (p < pend) {
cursor = vreinterpretq_u32_u16(vmlaq_u16(vreinterpretq_u16_u32(cursor), vreinterpretq_u16_u32(vld1q_u32(&p[4 * 0])), cursor2));
cursor = veorq_u32(cursor, vld1q_u32(&p[4 * 1]));
cursor = vaddq_u32(cursor, vld1q_u32(&p[4 * 2]));
cursor = veorq_u32(cursor, vreinterpretq_u32_u16(vmulq_u16(vreinterpretq_u16_u32(vld1q_u32(&p[4 * 3])), cursor2)));
cursor2 = vaddq_u16(cursor2, update);
p += 4 * 4;
}
cursor = vaddq_u32(cursor, vreinterpretq_u32_u16(cursor2));
uint32x2_t mixed = vadd_u32(vget_high_u32(cursor), vget_low_u32(cursor));
check = vget_lane_u32(mixed, 0) + vget_lane_u32(mixed, 1);
#else
// TODO: Why does this crash on iOS, but only certain devices?
// It's faster than the above, but I guess it sucks to be using an iPhone.
// As of 2020 clang, it's still faster by ~1.4%.
// d0/d1 (q0) - cursor
// d2/d3 (q1) - cursor2
// d4/d5 (q2) - update
// d16-d23 (q8-q11) - memory transfer
asm volatile (
// Initialize cursor.
"vmov.i32 q0, #0\n"
// Initialize cursor2.
"movw r0, 0xc00b\n"
"movt r0, 0x9bd9\n"
"movw r1, 0x4b73\n"
"movt r1, 0xb651\n"
"vmov d2, r0, r1\n"
"movw r0, 0x4d9b\n"
"movt r0, 0x4309\n"
"movw r1, 0x0083\n"
"movt r1, 0x0001\n"
"vmov d3, r0, r1\n"
// Initialize update.
"movw r0, 0x2455\n"
"vdup.i16 q2, r0\n"
// This is where we end.
"add r0, %1, %2\n"
// Okay, do the memory hashing.
"QuickTexHashNEON_next:\n"
"pld [%2, #0xc0]\n"
"vldmia %2!, {d16-d23}\n"
"vmla.i16 q0, q1, q8\n"
"vmul.i16 q11, q11, q1\n"
"veor.i32 q0, q0, q9\n"
"cmp %2, r0\n"
"vadd.i32 q0, q0, q10\n"
"vadd.i16 q1, q1, q2\n"
"veor.i32 q0, q0, q11\n"
"blo QuickTexHashNEON_next\n"
// Now let's get the result.
"vadd.i32 q0, q0, q1\n"
"vadd.i32 d0, d0, d1\n"
"vmov r0, r1, d0\n"
"add %0, r0, r1\n"
: "=r"(check)
: "r"(size), "r"(checkp)
: "r0", "r1", "d0", "d1", "d2", "d3", "d4", "d5", "d16", "d17", "d18", "d19", "d20", "d21", "d22", "d23", "cc"
);
#endif
} else {
const u32 size_u32 = size / 4;
const u32 *p = (const u32 *)checkp;
for (u32 i = 0; i < size_u32; i += 4) {
check += p[i + 0];
check ^= p[i + 1];
check += p[i + 2];
check ^= p[i + 3];
}
}
return check;
}
void DoUnswizzleTex16NEON(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32 pitch) {
// ydestp is in 32-bits, so this is convenient.
const u32 pitchBy32 = pitch >> 2;
__builtin_prefetch(texptr, 0, 0);
__builtin_prefetch(ydestp, 1, 1);
const u32 *src = (const u32 *)texptr;
for (int by = 0; by < byc; by++) {
u32 *xdest = ydestp;
for (int bx = 0; bx < bxc; bx++) {
u32 *dest = xdest;
for (int n = 0; n < 2; n++) {
// Textures are always 16-byte aligned so this is fine.
uint32x4_t temp1 = vld1q_u32(src);
uint32x4_t temp2 = vld1q_u32(src + 4);
uint32x4_t temp3 = vld1q_u32(src + 8);
uint32x4_t temp4 = vld1q_u32(src + 12);
vst1q_u32(dest, temp1);
dest += pitchBy32;
vst1q_u32(dest, temp2);
dest += pitchBy32;
vst1q_u32(dest, temp3);
dest += pitchBy32;
vst1q_u32(dest, temp4);
dest += pitchBy32;
src += 16;
}
xdest += 4;
}
ydestp += pitchBy32 * 8;
}
}
static inline bool VectorIsNonZeroNEON(const uint32x4_t &v) {
u64 low = vgetq_lane_u64(vreinterpretq_u64_u32(v), 0);
u64 high = vgetq_lane_u64(vreinterpretq_u64_u32(v), 1);
return (low | high) != 0;
}
#ifndef _MSC_VER
// MSVC consider this function the same as the one above! uint16x8_t is typedef'd to the same type as uint32x4_t.
static inline bool VectorIsNonZeroNEON(const uint16x8_t &v) {
u64 low = vgetq_lane_u64(vreinterpretq_u64_u16(v), 0);
u64 high = vgetq_lane_u64(vreinterpretq_u64_u16(v), 1);
return (low | high) != 0;
}
#endif
CheckAlphaResult CheckAlphaRGBA8888NEON(const u32 *pixelData, int stride, int w, int h) {
const u32 *p = (const u32 *)pixelData;
const uint32x4_t mask = vdupq_n_u32(0xFF000000);
uint32x4_t bits = mask;
for (int y = 0; y < h; ++y) {
for (int i = 0; i < w; i += 4) {
const uint32x4_t a = vld1q_u32(&p[i]);
bits = vandq_u32(bits, a);
}
uint32x4_t result = veorq_u32(bits, mask);
if (VectorIsNonZeroNEON(result)) {
return CHECKALPHA_ANY;
}
p += stride;
}
return CHECKALPHA_FULL;
}
CheckAlphaResult CheckAlphaABGR4444NEON(const u32 *pixelData, int stride, int w, int h) {
const u16 *p = (const u16 *)pixelData;
const uint16x8_t mask = vdupq_n_u16((u16)0x000F);
uint16x8_t bits = mask;
for (int y = 0; y < h; ++y) {
for (int i = 0; i < w; i += 8) {
const uint16x8_t a = vld1q_u16(&p[i]);
bits = vandq_u16(bits, a);
}
uint16x8_t result = veorq_u16(bits, mask);
if (VectorIsNonZeroNEON(result)) {
return CHECKALPHA_ANY;
}
p += stride;
}
return CHECKALPHA_FULL;
}
CheckAlphaResult CheckAlphaABGR1555NEON(const u32 *pixelData, int stride, int w, int h) {
const u16 *p = (const u16 *)pixelData;
const uint16x8_t mask = vdupq_n_u16((u16)0x0001);
uint16x8_t bits = mask;
for (int y = 0; y < h; ++y) {
for (int i = 0; i < w; i += 8) {
const uint16x8_t a = vld1q_u16(&p[i]);
bits = vandq_u16(bits, a);
}
uint16x8_t result = veorq_u16(bits, mask);
if (VectorIsNonZeroNEON(result)) {
return CHECKALPHA_ANY;
}
p += stride;
}
return CHECKALPHA_FULL;
}
CheckAlphaResult CheckAlphaRGBA4444NEON(const u32 *pixelData, int stride, int w, int h) {
const u16 *p = (const u16 *)pixelData;
const uint16x8_t mask = vdupq_n_u16((u16)0xF000);
uint16x8_t bits = mask;
for (int y = 0; y < h; ++y) {
for (int i = 0; i < w; i += 8) {
const uint16x8_t a = vld1q_u16(&p[i]);
bits = vandq_u16(bits, a);
}
uint16x8_t result = veorq_u16(bits, mask);
if (VectorIsNonZeroNEON(result)) {
return CHECKALPHA_ANY;
}
p += stride;
}
return CHECKALPHA_FULL;
}
CheckAlphaResult CheckAlphaRGBA5551NEON(const u32 *pixelData, int stride, int w, int h) {
const u16 *p = (const u16 *)pixelData;
const uint16x8_t mask = vdupq_n_u16((u16)0x8000);
uint16x8_t bits = mask;
for (int y = 0; y < h; ++y) {
for (int i = 0; i < w; i += 8) {
const uint16x8_t a = vld1q_u16(&p[i]);
bits = vandq_u16(bits, a);
}
uint16x8_t result = veorq_u16(bits, mask);
if (VectorIsNonZeroNEON(result)) {
return CHECKALPHA_ANY;
}
p += stride;
}
return CHECKALPHA_FULL;
}
#endif
-27
View File
@@ -1,27 +0,0 @@
// Copyright (c) 2012- PPSSPP Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0 or later versions.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "GPU/Common/TextureDecoder.h"
u32 QuickTexHashNEON(const void *checkp, u32 size);
void DoUnswizzleTex16NEON(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32 pitch);
CheckAlphaResult CheckAlphaRGBA8888NEON(const u32 *pixelData, int stride, int w, int h);
CheckAlphaResult CheckAlphaABGR4444NEON(const u32 *pixelData, int stride, int w, int h);
CheckAlphaResult CheckAlphaABGR1555NEON(const u32 *pixelData, int stride, int w, int h);
CheckAlphaResult CheckAlphaRGBA4444NEON(const u32 *pixelData, int stride, int w, int h);
CheckAlphaResult CheckAlphaRGBA5551NEON(const u32 *pixelData, int stride, int w, int h);
-2
View File
@@ -126,8 +126,6 @@ TextureCacheD3D11::TextureCacheD3D11(Draw::DrawContext *draw)
HRESULT result = 0;
SetupTextureDecoder();
nextTexture_ = nullptr;
}
-1
View File
@@ -69,7 +69,6 @@ TextureCacheDX9::TextureCacheDX9(Draw::DrawContext *draw)
} else {
maxAnisotropyLevel = pCaps.MaxAnisotropy;
}
SetupTextureDecoder();
nextTexture_ = nullptr;
device_->CreateVertexDeclaration(g_FramebufferVertexElements, &pFramebufferVertexDecl);
-2
View File
@@ -49,8 +49,6 @@ TextureCacheGLES::TextureCacheGLES(Draw::DrawContext *draw)
: TextureCacheCommon(draw) {
render_ = (GLRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
SetupTextureDecoder();
nextTexture_ = nullptr;
std::vector<GLRInputLayout::Entry> entries;
-20
View File
@@ -354,16 +354,6 @@
<ClInclude Include="Common\SoftwareTransformCommon.h" />
<ClInclude Include="Common\SplineCommon.h" />
<ClInclude Include="Common\StencilCommon.h" />
<ClInclude Include="Common\TextureDecoderNEON.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="Common\TextureCacheCommon.h" />
<ClInclude Include="Common\TextureScalerCommon.h" />
<ClInclude Include="Common\TransformCommon.h" />
@@ -493,16 +483,6 @@
<ClCompile Include="Common\ShaderUniforms.cpp" />
<ClCompile Include="Common\SplineCommon.cpp" />
<ClCompile Include="Common\StencilCommon.cpp" />
<ClCompile Include="Common\TextureDecoderNEON.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="Common\TextureCacheCommon.cpp" />
<ClCompile Include="Common\TextureScalerCommon.cpp" />
<ClCompile Include="Common\TransformCommon.cpp" />
-6
View File
@@ -105,9 +105,6 @@
<ClInclude Include="Common\PostShader.h">
<Filter>Common</Filter>
</ClInclude>
<ClInclude Include="Common\TextureDecoderNEON.h">
<Filter>Common</Filter>
</ClInclude>
<ClInclude Include="Common\TextureCacheCommon.h">
<Filter>Common</Filter>
</ClInclude>
@@ -353,9 +350,6 @@
<ClCompile Include="Common\PostShader.cpp">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="Common\TextureDecoderNEON.cpp">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="Common\TextureCacheCommon.cpp">
<Filter>Common</Filter>
</ClCompile>
-1
View File
@@ -382,7 +382,6 @@ GPUCommon::GPUCommon(GraphicsContext *gfxCtx, Draw::DrawContext *draw) :
static_assert(sizeof(DisplayList) == 456, "Bad DisplayList size");
Reinitialize();
SetupColorConv();
gstate.Reset();
gstate_c.Reset();
gpuStats.Reset();
-1
View File
@@ -183,7 +183,6 @@ TextureCacheVulkan::TextureCacheVulkan(Draw::DrawContext *draw, VulkanContext *v
computeShaderManager_(vulkan),
samplerCache_(vulkan) {
DeviceRestore(draw);
SetupTextureDecoder();
}
TextureCacheVulkan::~TextureCacheVulkan() {
-2
View File
@@ -467,8 +467,6 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
InitFastMath(cpu_info.bNEON);
g_threadManager.Init(cpu_info.num_cores, cpu_info.logical_cpu_count);
SetupAudioFormats();
g_Discord.SetPresenceMenu();
// Make sure UI state is MENU.
+1 -3
View File
@@ -461,7 +461,6 @@
<ClInclude Include="..\..\Common\Serialize\SerializeSet.h" />
<ClInclude Include="..\..\Common\CodeBlock.h" />
<ClInclude Include="..\..\Common\Data\Convert\ColorConv.h" />
<ClInclude Include="..\..\Common\Data\Convert\ColorConvNEON.h" />
<ClInclude Include="..\..\Common\Common.h" />
<ClInclude Include="..\..\Common\CommonFuncs.h" />
<ClInclude Include="..\..\Common\CommonTypes.h" />
@@ -578,7 +577,6 @@
<ClCompile Include="..\..\Common\Render\Text\draw_text_win.cpp" />
<ClCompile Include="..\..\Common\Serialize\Serializer.cpp" />
<ClCompile Include="..\..\Common\Data\Convert\ColorConv.cpp" />
<ClCompile Include="..\..\Common\Data\Convert\ColorConvNEON.cpp" />
<ClCompile Include="..\..\Common\ConsoleListener.cpp" />
<ClCompile Include="..\..\Common\CPUDetect.cpp" />
<ClCompile Include="..\..\Common\FakeCPUDetect.cpp" />
@@ -642,4 +640,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
+1 -3
View File
@@ -93,7 +93,6 @@
<ClCompile Include="..\..\Common\ArmEmitter.cpp" />
<ClCompile Include="..\..\Common\Serialize\Serializer.cpp" />
<ClCompile Include="..\..\Common\Data\Convert\ColorConv.cpp" />
<ClCompile Include="..\..\Common\Data\Convert\ColorConvNEON.cpp" />
<ClCompile Include="..\..\Common\ConsoleListener.cpp" />
<ClCompile Include="..\..\Common\CPUDetect.cpp" />
<ClCompile Include="..\..\Common\FakeCPUDetect.cpp" />
@@ -390,7 +389,6 @@
<ClInclude Include="..\..\Common\Serialize\Serializer.h" />
<ClInclude Include="..\..\Common\CodeBlock.h" />
<ClInclude Include="..\..\Common\Data\Convert\ColorConv.h" />
<ClInclude Include="..\..\Common\Data\Convert\ColorConvNEON.h" />
<ClInclude Include="..\..\Common\Common.h" />
<ClInclude Include="..\..\Common\CommonFuncs.h" />
<ClInclude Include="..\..\Common\CommonTypes.h" />
@@ -711,4 +709,4 @@
<Filter>Math\lin</Filter>
</None>
</ItemGroup>
</Project>
</Project>
+1 -3
View File
@@ -581,7 +581,6 @@
<ClInclude Include="..\..\Core\Util\PortManager.h" />
<ClInclude Include="..\..\Core\WebServer.h" />
<ClInclude Include="..\..\Core\Util\AudioFormat.h" />
<ClInclude Include="..\..\Core\Util\AudioFormatNEON.h" />
<ClInclude Include="..\..\Core\Util\BlockAllocator.h" />
<ClInclude Include="..\..\Core\Util\DisArm64.h" />
<ClInclude Include="..\..\Core\Util\GameManager.h" />
@@ -840,7 +839,6 @@
<ClCompile Include="..\..\Core\Util\PortManager.cpp" />
<ClCompile Include="..\..\Core\WebServer.cpp" />
<ClCompile Include="..\..\Core\Util\AudioFormat.cpp" />
<ClCompile Include="..\..\Core\Util\AudioFormatNEON.cpp" />
<ClCompile Include="..\..\Core\Util\BlockAllocator.cpp" />
<ClCompile Include="..\..\Core\Util\DisArm64.cpp" />
<ClCompile Include="..\..\Core\Util\GameManager.cpp" />
@@ -5329,4 +5327,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
+1 -7
View File
@@ -239,9 +239,6 @@
<ClCompile Include="..\..\Core\Util\AudioFormat.cpp">
<Filter>Util</Filter>
</ClCompile>
<ClCompile Include="..\..\Core\Util\AudioFormatNEON.cpp">
<Filter>Util</Filter>
</ClCompile>
<ClCompile Include="..\..\Core\Util\BlockAllocator.cpp">
<Filter>Util</Filter>
</ClCompile>
@@ -1230,9 +1227,6 @@
<ClInclude Include="..\..\Core\Util\AudioFormat.h">
<Filter>Util</Filter>
</ClInclude>
<ClInclude Include="..\..\Core\Util\AudioFormatNEON.h">
<Filter>Util</Filter>
</ClInclude>
<ClInclude Include="..\..\Core\Util\BlockAllocator.h">
<Filter>Util</Filter>
</ClInclude>
@@ -1767,4 +1761,4 @@
<Filter>Ext\gason</Filter>
</None>
</ItemGroup>
</Project>
</Project>
+1 -3
View File
@@ -398,7 +398,6 @@
<ClInclude Include="..\..\GPU\Common\StencilCommon.h" />
<ClInclude Include="..\..\GPU\Common\TextureCacheCommon.h" />
<ClInclude Include="..\..\GPU\Common\TextureDecoder.h" />
<ClInclude Include="..\..\GPU\Common\TextureDecoderNEON.h" />
<ClInclude Include="..\..\GPU\Common\TextureScalerCommon.h" />
<ClInclude Include="..\..\GPU\Common\TransformCommon.h" />
<ClInclude Include="..\..\GPU\Common\VertexDecoderCommon.h" />
@@ -458,7 +457,6 @@
<ClCompile Include="..\..\GPU\Common\StencilCommon.cpp" />
<ClCompile Include="..\..\GPU\Common\TextureCacheCommon.cpp" />
<ClCompile Include="..\..\GPU\Common\TextureDecoder.cpp" />
<ClCompile Include="..\..\GPU\Common\TextureDecoderNEON.cpp" />
<ClCompile Include="..\..\GPU\Common\TextureScalerCommon.cpp" />
<ClCompile Include="..\..\GPU\Common\TransformCommon.cpp" />
<ClCompile Include="..\..\GPU\Common\VertexDecoderArm.cpp" />
@@ -530,4 +528,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
+1 -3
View File
@@ -17,7 +17,6 @@
<ClCompile Include="..\..\GPU\Common\StencilCommon.cpp" />
<ClCompile Include="..\..\GPU\Common\TextureCacheCommon.cpp" />
<ClCompile Include="..\..\GPU\Common\TextureDecoder.cpp" />
<ClCompile Include="..\..\GPU\Common\TextureDecoderNEON.cpp" />
<ClCompile Include="..\..\GPU\Common\TextureScalerCommon.cpp" />
<ClCompile Include="..\..\GPU\Common\TransformCommon.cpp" />
<ClCompile Include="..\..\GPU\Common\VertexDecoderArm.cpp" />
@@ -79,7 +78,6 @@
<ClInclude Include="..\..\GPU\Common\StencilCommon.h" />
<ClInclude Include="..\..\GPU\Common\TextureCacheCommon.h" />
<ClInclude Include="..\..\GPU\Common\TextureDecoder.h" />
<ClInclude Include="..\..\GPU\Common\TextureDecoderNEON.h" />
<ClInclude Include="..\..\GPU\Common\TextureScalerCommon.h" />
<ClInclude Include="..\..\GPU\Common\TransformCommon.h" />
<ClInclude Include="..\..\GPU\Common\VertexDecoderCommon.h" />
@@ -122,4 +120,4 @@
<ClInclude Include="..\..\GPU\Common\VertexShaderGenerator.h" />
<ClInclude Include="..\..\GPU\Common\ReinterpretFramebuffer.h" />
</ItemGroup>
</Project>
</Project>
-6
View File
@@ -59,10 +59,7 @@ endif
ifeq ($(findstring armeabi-v7a,$(TARGET_ARCH_ABI)),armeabi-v7a)
ARCH_FILES := \
$(SRC)/GPU/Common/TextureDecoderNEON.cpp.neon \
$(SRC)/Core/Util/AudioFormatNEON.cpp.neon \
$(SRC)/Common/ArmEmitter.cpp \
$(SRC)/Common/Data/Convert/ColorConvNEON.cpp.neon \
$(SRC)/Common/Math/fast/fast_matrix_neon.S.neon \
$(SRC)/Core/MIPS/ARM/ArmCompALU.cpp \
$(SRC)/Core/MIPS/ARM/ArmCompBranch.cpp \
@@ -86,10 +83,7 @@ endif
ifeq ($(findstring arm64-v8a,$(TARGET_ARCH_ABI)),arm64-v8a)
ARCH_FILES := \
$(SRC)/GPU/Common/TextureDecoderNEON.cpp \
$(SRC)/Core/Util/AudioFormatNEON.cpp \
$(SRC)/Common/Arm64Emitter.cpp \
$(SRC)/Common/Data/Convert/ColorConvNEON.cpp \
$(SRC)/Core/MIPS/ARM64/Arm64CompALU.cpp \
$(SRC)/Core/MIPS/ARM64/Arm64CompBranch.cpp \
$(SRC)/Core/MIPS/ARM64/Arm64CompFPU.cpp \
+2 -8
View File
@@ -627,10 +627,7 @@ ifeq ($(WITH_DYNAREC),1)
ifeq ($(HAVE_NEON),1)
SOURCES_CXX += \
$(COREDIR)/MIPS/ARM/ArmCompVFPUNEON.cpp \
$(COREDIR)/MIPS/ARM/ArmCompVFPUNEONUtil.cpp \
$(COREDIR)/Util/AudioFormatNEON.cpp \
$(COMMONDIR)/Data/Convert/ColorConvNEON.cpp \
$(GPUDIR)/Common/TextureDecoderNEON.cpp
$(COREDIR)/MIPS/ARM/ArmCompVFPUNEONUtil.cpp
SOURCES_C += $(EXTDIR)/libpng17/arm/arm_init.c \
$(EXTDIR)/libpng17/arm/filter_neon_intrinsics.c
@@ -656,10 +653,7 @@ ifeq ($(WITH_DYNAREC),1)
ifeq ($(HAVE_NEON),1)
SOURCES_CXX += \
$(COREDIR)/MIPS/ARM/ArmCompVFPUNEON.cpp \
$(COREDIR)/MIPS/ARM/ArmCompVFPUNEONUtil.cpp \
$(COREDIR)/Util/AudioFormatNEON.cpp \
$(COMMONDIR)/Data/Convert/ColorConvNEON.cpp \
$(GPUDIR)/Common/TextureDecoderNEON.cpp
$(COREDIR)/MIPS/ARM/ArmCompVFPUNEONUtil.cpp
SOURCES_C += $(EXTDIR)/libpng17/arm/arm_init.c \
$(EXTDIR)/libpng17/arm/filter_neon_intrinsics.c
-2
View File
@@ -474,8 +474,6 @@ private:
};
bool TestQuickTexHash() {
SetupTextureDecoder();
static const int BUF_SIZE = 1024;
AlignedMem buf(BUF_SIZE, 16);