Merge branch 'woa_support' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-woa_support
# Conflicts: # Source/ThirdParty/assimp/config.h.in # Source/Tools/Flax.Build/Deps/Dependencies/Assimp.cs
This commit is contained in:
@@ -6,10 +6,14 @@
|
||||
|
||||
// Platform description
|
||||
#define PLATFORM_DESKTOP 1
|
||||
#if defined(WIN64)
|
||||
#if defined(WIN64) && defined(_M_X64)
|
||||
#define PLATFORM_64BITS 1
|
||||
#define PLATFORM_ARCH_X64 1
|
||||
#define PLATFORM_ARCH ArchitectureType::x64
|
||||
#elif defined(WIN64) && defined(_M_ARM64)
|
||||
#define PLATFORM_64BITS 1
|
||||
#define PLATFORM_ARCH_ARM64 1
|
||||
#define PLATFORM_ARCH ArchitectureType::ARM64
|
||||
#else
|
||||
#define PLATFORM_64BITS 0
|
||||
#define PLATFORM_ARCH_X86 1
|
||||
|
||||
@@ -159,10 +159,14 @@ bool Win32Platform::Init()
|
||||
CpuInfo.PageSize = siSysInfo.dwPageSize;
|
||||
CpuInfo.ClockSpeed = ClockFrequency;
|
||||
{
|
||||
#ifdef _M_ARM64
|
||||
CpuInfo.CacheLineSize = 128;
|
||||
#else
|
||||
int args[4];
|
||||
__cpuid(args, 0x80000006);
|
||||
CpuInfo.CacheLineSize = args[2] & 0xFF;
|
||||
ASSERT(CpuInfo.CacheLineSize && Math::IsPowerOfTwo(CpuInfo.CacheLineSize));
|
||||
#endif
|
||||
}
|
||||
|
||||
// Setup unique device ID
|
||||
@@ -229,10 +233,12 @@ void Win32Platform::MemoryBarrier()
|
||||
{
|
||||
_ReadWriteBarrier();
|
||||
#if PLATFORM_64BITS
|
||||
#ifdef _AMD64_
|
||||
#if defined(_AMD64_)
|
||||
__faststorefence();
|
||||
#elif defined(_IA64_)
|
||||
__mf();
|
||||
#elif defined(_ARM64_)
|
||||
__dmb(_ARM64_BARRIER_ISH);
|
||||
#else
|
||||
#error "Invalid platform."
|
||||
#endif
|
||||
@@ -246,7 +252,11 @@ void Win32Platform::MemoryBarrier()
|
||||
|
||||
void Win32Platform::Prefetch(void const* ptr)
|
||||
{
|
||||
#if _M_ARM64
|
||||
__prefetch((char const*)ptr);
|
||||
#else
|
||||
_mm_prefetch((char const*)ptr, _MM_HINT_T0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void* Win32Platform::Allocate(uint64 size, uint64 alignment)
|
||||
|
||||
@@ -1312,6 +1312,14 @@ Array<PlatformBase::StackFrame> WindowsPlatform::GetStackFrames(int32 skipCount,
|
||||
stack.AddrBStore.Mode = AddrModeFlat;
|
||||
stack.AddrStack.Offset = ctx.IntSp;
|
||||
stack.AddrStack.Mode = AddrModeFlat;
|
||||
#elif _M_ARM64
|
||||
imageType = IMAGE_FILE_MACHINE_ARM64;
|
||||
stack.AddrPC.Offset = ctx.Pc;
|
||||
stack.AddrPC.Mode = AddrModeFlat;
|
||||
stack.AddrFrame.Offset = ctx.Fp;
|
||||
stack.AddrFrame.Mode = AddrModeFlat;
|
||||
stack.AddrStack.Offset = ctx.Sp;
|
||||
stack.AddrStack.Mode = AddrModeFlat;
|
||||
#else
|
||||
#error "Platform not supported!"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user