WIP: native win64 support

This commit is contained in:
Latif Khalifa
2013-10-20 12:37:35 +02:00
parent 32bed5660a
commit 6bae4a8d92
5 changed files with 8 additions and 8 deletions

View File

@@ -184,7 +184,7 @@ LLMutex* LLFastTimer::sLogLock = NULL;
std::queue<LLSD> LLFastTimer::sLogQueue; std::queue<LLSD> LLFastTimer::sLogQueue;
const int LLFastTimer::NamedTimer::HISTORY_NUM = 300; const int LLFastTimer::NamedTimer::HISTORY_NUM = 300;
#if LL_WINDOWS #if defined(LL_WINDOWS) && !defined(_WIN64)
#define USE_RDTSC 1 #define USE_RDTSC 1
#endif #endif

View File

@@ -416,7 +416,7 @@ static F64 calculate_cpu_frequency(U32 measure_msecs)
unsigned long dwCurPriorityClass = GetPriorityClass(hProcess); unsigned long dwCurPriorityClass = GetPriorityClass(hProcess);
int iCurThreadPriority = GetThreadPriority(hThread); int iCurThreadPriority = GetThreadPriority(hThread);
unsigned long dwProcessMask, dwSystemMask, dwNewMask = 1; unsigned long dwProcessMask, dwSystemMask, dwNewMask = 1;
GetProcessAffinityMask(hProcess, &dwProcessMask, &dwSystemMask); GetProcessAffinityMask(hProcess, (PDWORD_PTR)&dwProcessMask, (PDWORD_PTR)&dwSystemMask);
SetPriorityClass(hProcess, REALTIME_PRIORITY_CLASS); SetPriorityClass(hProcess, REALTIME_PRIORITY_CLASS);
SetThreadPriority(hThread, THREAD_PRIORITY_TIME_CRITICAL); SetThreadPriority(hThread, THREAD_PRIORITY_TIME_CRITICAL);

View File

@@ -140,7 +140,7 @@ inline F64 llabs(const F64 a)
inline S32 lltrunc( F32 f ) inline S32 lltrunc( F32 f )
{ {
#if LL_WINDOWS && !defined( __INTEL_COMPILER ) #if LL_WINDOWS && !defined( __INTEL_COMPILER ) && !defined(_WIN64)
// Avoids changing the floating point control word. // Avoids changing the floating point control word.
// Add or subtract 0.5 - epsilon and then round // Add or subtract 0.5 - epsilon and then round
const static U32 zpfp[] = { 0xBEFFFFFF, 0x3EFFFFFF }; const static U32 zpfp[] = { 0xBEFFFFFF, 0x3EFFFFFF };
@@ -166,7 +166,7 @@ inline S32 lltrunc( F64 f )
inline S32 llfloor( F32 f ) inline S32 llfloor( F32 f )
{ {
#if LL_WINDOWS && !defined( __INTEL_COMPILER ) #if LL_WINDOWS && !defined( __INTEL_COMPILER ) && !defined(_WIN64)
// Avoids changing the floating point control word. // Avoids changing the floating point control word.
// Accurate (unlike Stereopsis version) for all values between S32_MIN and S32_MAX and slightly faster than Stereopsis version. // Accurate (unlike Stereopsis version) for all values between S32_MIN and S32_MAX and slightly faster than Stereopsis version.
// Add -(0.5 - epsilon) and then round // Add -(0.5 - epsilon) and then round

View File

@@ -31,7 +31,7 @@
#error "Please include llmath.h before this file." #error "Please include llmath.h before this file."
#endif #endif
#if ( ( LL_DARWIN || LL_LINUX ) && !(__SSE2__) ) || ( LL_WINDOWS && ( _M_IX86_FP < 2 ) ) #if ( ( LL_DARWIN || LL_LINUX ) && !(__SSE2__) ) || ( LL_WINDOWS && ( _M_IX86_FP < 2 ) && !defined(_WIN64) )
#error SSE2 not enabled. LLVector4a and related class will not compile. #error SSE2 not enabled. LLVector4a and related class will not compile.
#endif #endif

View File

@@ -749,7 +749,7 @@ void LLWindowWin32::close()
LL_DEBUGS("Window") << "Destroying Window" << LL_ENDL; LL_DEBUGS("Window") << "Destroying Window" << LL_ENDL;
// Don't process events in our mainWindowProc any longer. // Don't process events in our mainWindowProc any longer.
SetWindowLong(mWindowHandle, GWL_USERDATA, NULL); SetWindowLongPtr(mWindowHandle, GWLP_USERDATA, NULL);
// Make sure we don't leave a blank toolbar button. // Make sure we don't leave a blank toolbar button.
ShowWindow(mWindowHandle, SW_HIDE); ShowWindow(mWindowHandle, SW_HIDE);
@@ -1660,7 +1660,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
LL_DEBUGS("Window") << "Keeping vertical sync" << LL_ENDL; LL_DEBUGS("Window") << "Keeping vertical sync" << LL_ENDL;
} }
SetWindowLong(mWindowHandle, GWL_USERDATA, (U32)this); SetWindowLongPtr(mWindowHandle, GWLP_USERDATA, (LONG_PTR)this);
// register this window as handling drag/drop events from the OS // register this window as handling drag/drop events from the OS
DragAcceptFiles( mWindowHandle, TRUE ); DragAcceptFiles( mWindowHandle, TRUE );
@@ -1983,7 +1983,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
// This helps prevent avatar walking after maximizing the window by double-clicking the title bar. // This helps prevent avatar walking after maximizing the window by double-clicking the title bar.
static bool sHandleLeftMouseUp = true; static bool sHandleLeftMouseUp = true;
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(h_wnd, GWL_USERDATA); LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLongPtr(h_wnd, GWLP_USERDATA);
if (NULL != window_imp) if (NULL != window_imp)