mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-16 11:48:28 +12:00
Initial macOS port bringup (#52)
This commit is contained in:
parent
a2abffd37b
commit
974edaa649
84 changed files with 157 additions and 122 deletions
|
@ -284,7 +284,7 @@ void LatteIndices_generateAutoLineLoopIndices(void* indexDataOutput, uint32 coun
|
|||
indexMax = std::max(count, 1u) - 1;
|
||||
}
|
||||
|
||||
#if BOOST_OS_LINUX
|
||||
#if BOOST_OS_LINUX || BOOST_OS_MACOS
|
||||
#pragma clang attribute push (__attribute__((target("avx2"))), apply_to=function)
|
||||
#endif
|
||||
|
||||
|
@ -352,11 +352,11 @@ void LatteIndices_fastConvertU16_AVX2(const void* indexDataInput, void* indexDat
|
|||
indexMin = std::min(indexMin, _minIndex);
|
||||
}
|
||||
|
||||
#if BOOST_OS_LINUX
|
||||
#if BOOST_OS_LINUX || BOOST_OS_MACOS
|
||||
#pragma clang attribute pop
|
||||
#endif
|
||||
|
||||
#if BOOST_OS_LINUX
|
||||
#if BOOST_OS_LINUX || BOOST_OS_MACOS
|
||||
#pragma clang attribute push (__attribute__((target("avx2"))), apply_to=function)
|
||||
#endif
|
||||
|
||||
|
@ -423,11 +423,11 @@ void LatteIndices_fastConvertU16_SSE41(const void* indexDataInput, void* indexDa
|
|||
indexMin = std::min(indexMin, _minIndex);
|
||||
}
|
||||
|
||||
#if BOOST_OS_LINUX
|
||||
#if BOOST_OS_LINUX || BOOST_OS_MACOS
|
||||
#pragma clang attribute pop
|
||||
#endif
|
||||
|
||||
#if BOOST_OS_LINUX
|
||||
#if BOOST_OS_LINUX || BOOST_OS_MACOS
|
||||
#pragma clang attribute push (__attribute__((target("avx2"))), apply_to=function)
|
||||
#endif
|
||||
|
||||
|
@ -497,7 +497,7 @@ void LatteIndices_fastConvertU32_AVX2(const void* indexDataInput, void* indexDat
|
|||
indexMin = std::min(indexMin, _minIndex);
|
||||
}
|
||||
|
||||
#if BOOST_OS_LINUX
|
||||
#if BOOST_OS_LINUX || BOOST_OS_MACOS
|
||||
#pragma clang attribute pop
|
||||
#endif
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
#if BOOST_OS_WINDOWS > 0
|
||||
#if BOOST_OS_WINDOWS
|
||||
#include <psapi.h>
|
||||
#endif
|
||||
|
||||
|
@ -189,7 +189,7 @@ void LatteShaderCache_load()
|
|||
|
||||
const auto timeLoadStart = now_cached();
|
||||
// remember current amount of committed memory
|
||||
#if BOOST_OS_WINDOWS > 0
|
||||
#if BOOST_OS_WINDOWS
|
||||
PROCESS_MEMORY_COUNTERS pmc1;
|
||||
GetProcessMemoryInfo(GetCurrentProcess(), &pmc1, sizeof(PROCESS_MEMORY_COUNTERS));
|
||||
LONGLONG totalMem1 = pmc1.PagefileUsage;
|
||||
|
@ -285,7 +285,7 @@ void LatteShaderCache_load()
|
|||
|
||||
LatteShaderCache_updateCompileQueue(0);
|
||||
// write load time and RAM usage to log file (in dev build)
|
||||
#if BOOST_OS_WINDOWS > 0
|
||||
#if BOOST_OS_WINDOWS
|
||||
const auto timeLoadEnd = now_cached();
|
||||
const auto timeLoad = std::chrono::duration_cast<std::chrono::milliseconds>(timeLoadEnd - timeLoadStart).count();
|
||||
PROCESS_MEMORY_COUNTERS pmc2;
|
||||
|
|
|
@ -145,7 +145,7 @@ uint32 LatteTexture_CalculateTextureDataHash(LatteTexture* hostTexture)
|
|||
bool isCompressedFormat = hostTexture->IsCompressedFormat();
|
||||
if( isCompressedFormat == false )
|
||||
{
|
||||
#if BOOST_OS_WINDOWS > 0
|
||||
#if BOOST_OS_WINDOWS
|
||||
if (_cpuExtension_AVX2)
|
||||
{
|
||||
__m256i h256 = { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue