Merge remote-tracking branch 'origin/master' into linux-editor
# Conflicts: # Source/Engine/Core/Math/Color.cs # Source/Engine/Navigation/Navigation.cpp # Source/Engine/Platform/Win32/Win32Platform.cpp
This commit is contained in:
@@ -12,12 +12,12 @@
|
||||
#include "Engine/Core/Collections/HashFunctions.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "IncludeWindowsHeaders.h"
|
||||
|
||||
#include <Psapi.h>
|
||||
#include <WinSock2.h>
|
||||
#include <IPHlpApi.h>
|
||||
#include <oleauto.h>
|
||||
#include <WinBase.h>
|
||||
#include <xmmintrin.h>
|
||||
#pragma comment(lib, "Iphlpapi.lib")
|
||||
|
||||
namespace
|
||||
@@ -298,6 +298,24 @@ void Win32Platform::AtomicStore(int64 volatile* dst, int64 value)
|
||||
InterlockedExchange64(dst, value);
|
||||
}
|
||||
|
||||
void Win32Platform::Prefetch(void const* ptr)
|
||||
{
|
||||
_mm_prefetch((char const*)ptr, _MM_HINT_T0);
|
||||
}
|
||||
|
||||
void* Win32Platform::Allocate(uint64 size, uint64 alignment)
|
||||
{
|
||||
#if COMPILE_WITH_PROFILER
|
||||
TrackAllocation(size);
|
||||
#endif
|
||||
return _aligned_malloc((size_t)size, (size_t)alignment);
|
||||
}
|
||||
|
||||
void Win32Platform::Free(void* ptr)
|
||||
{
|
||||
_aligned_free(ptr);
|
||||
}
|
||||
|
||||
bool Win32Platform::Is64BitPlatform()
|
||||
{
|
||||
#ifdef PLATFORM_64BITS
|
||||
|
||||
Reference in New Issue
Block a user