mirror of https://github.com/PCSX2/pcsx2.git
gs: initial merge complete
This commit is contained in:
parent
24b9c5698e
commit
b7c0c9589a
|
@ -247,7 +247,7 @@
|
|||
#if !defined(_MSC_VER)
|
||||
// http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mingw32/intrin_x86.h?view=markup
|
||||
|
||||
__forceinline int _BitScanForward(unsigned long* const Index, const unsigned long Mask)
|
||||
static int _BitScanForward(unsigned long* const Index, const unsigned long Mask)
|
||||
{
|
||||
#if defined(__GCC_ASM_FLAG_OUTPUTS__) && 0
|
||||
// Need GCC6 to test the code validity
|
||||
|
@ -265,8 +265,8 @@
|
|||
// gcc 4.8 define __rdtsc but unfortunately the compiler crash...
|
||||
// The redefine allow to skip the gcc __rdtsc version -- Gregory
|
||||
#define __rdtsc _lnx_rdtsc
|
||||
//__forceinline unsigned long long __rdtsc()
|
||||
__forceinline unsigned long long _lnx_rdtsc()
|
||||
//static unsigned long long __rdtsc()
|
||||
static unsigned long long _lnx_rdtsc()
|
||||
{
|
||||
#if defined(__amd64__) || defined(__x86_64__)
|
||||
unsigned long long low, high;
|
||||
|
|
|
@ -23,6 +23,12 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#ifdef _WIN32
|
||||
# define gsforceinline __forceinline
|
||||
#else
|
||||
# define gsforceinline __forceinline __inline__
|
||||
#endif
|
||||
|
||||
enum Align_Mode
|
||||
{
|
||||
Align_Outside,
|
||||
|
@ -105,24 +111,24 @@ class GSVector8i;
|
|||
|
||||
// conversion
|
||||
|
||||
__forceinline GSVector4i::GSVector4i(const GSVector4& v, bool truncate)
|
||||
gsforceinline GSVector4i::GSVector4i(const GSVector4& v, bool truncate)
|
||||
{
|
||||
m = truncate ? _mm_cvttps_epi32(v) : _mm_cvtps_epi32(v);
|
||||
}
|
||||
|
||||
__forceinline GSVector4::GSVector4(const GSVector4i& v)
|
||||
gsforceinline GSVector4::GSVector4(const GSVector4i& v)
|
||||
{
|
||||
m = _mm_cvtepi32_ps(v);
|
||||
}
|
||||
|
||||
#if _M_SSE >= 0x501
|
||||
|
||||
__forceinline GSVector8i::GSVector8i(const GSVector8& v, bool truncate)
|
||||
gsforceinline GSVector8i::GSVector8i(const GSVector8& v, bool truncate)
|
||||
{
|
||||
m = truncate ? _mm256_cvttps_epi32(v) : _mm256_cvtps_epi32(v);
|
||||
}
|
||||
|
||||
__forceinline GSVector8::GSVector8(const GSVector8i& v)
|
||||
gsforceinline GSVector8::GSVector8(const GSVector8i& v)
|
||||
{
|
||||
m = _mm256_cvtepi32_ps(v);
|
||||
}
|
||||
|
@ -131,34 +137,34 @@ __forceinline GSVector8::GSVector8(const GSVector8i& v)
|
|||
|
||||
// casting
|
||||
|
||||
__forceinline GSVector4i GSVector4i::cast(const GSVector4& v)
|
||||
gsforceinline GSVector4i GSVector4i::cast(const GSVector4& v)
|
||||
{
|
||||
return GSVector4i(_mm_castps_si128(v.m));
|
||||
}
|
||||
|
||||
__forceinline GSVector4 GSVector4::cast(const GSVector4i& v)
|
||||
gsforceinline GSVector4 GSVector4::cast(const GSVector4i& v)
|
||||
{
|
||||
return GSVector4(_mm_castsi128_ps(v.m));
|
||||
}
|
||||
|
||||
#if _M_SSE >= 0x500
|
||||
|
||||
__forceinline GSVector4i GSVector4i::cast(const GSVector8& v)
|
||||
gsforceinline GSVector4i GSVector4i::cast(const GSVector8& v)
|
||||
{
|
||||
return GSVector4i(_mm_castps_si128(_mm256_castps256_ps128(v)));
|
||||
}
|
||||
|
||||
__forceinline GSVector4 GSVector4::cast(const GSVector8& v)
|
||||
gsforceinline GSVector4 GSVector4::cast(const GSVector8& v)
|
||||
{
|
||||
return GSVector4(_mm256_castps256_ps128(v));
|
||||
}
|
||||
|
||||
__forceinline GSVector8 GSVector8::cast(const GSVector4i& v)
|
||||
gsforceinline GSVector8 GSVector8::cast(const GSVector4i& v)
|
||||
{
|
||||
return GSVector8(_mm256_castps128_ps256(_mm_castsi128_ps(v.m)));
|
||||
}
|
||||
|
||||
__forceinline GSVector8 GSVector8::cast(const GSVector4& v)
|
||||
gsforceinline GSVector8 GSVector8::cast(const GSVector4& v)
|
||||
{
|
||||
return GSVector8(_mm256_castps128_ps256(v.m));
|
||||
}
|
||||
|
@ -167,32 +173,32 @@ __forceinline GSVector8 GSVector8::cast(const GSVector4& v)
|
|||
|
||||
#if _M_SSE >= 0x501
|
||||
|
||||
__forceinline GSVector4i GSVector4i::cast(const GSVector8i& v)
|
||||
gsforceinline GSVector4i GSVector4i::cast(const GSVector8i& v)
|
||||
{
|
||||
return GSVector4i(_mm256_castsi256_si128(v));
|
||||
}
|
||||
|
||||
__forceinline GSVector4 GSVector4::cast(const GSVector8i& v)
|
||||
gsforceinline GSVector4 GSVector4::cast(const GSVector8i& v)
|
||||
{
|
||||
return GSVector4(_mm_castsi128_ps(_mm256_castsi256_si128(v)));
|
||||
}
|
||||
|
||||
__forceinline GSVector8i GSVector8i::cast(const GSVector4i& v)
|
||||
gsforceinline GSVector8i GSVector8i::cast(const GSVector4i& v)
|
||||
{
|
||||
return GSVector8i(_mm256_castsi128_si256(v.m));
|
||||
}
|
||||
|
||||
__forceinline GSVector8i GSVector8i::cast(const GSVector4& v)
|
||||
gsforceinline GSVector8i GSVector8i::cast(const GSVector4& v)
|
||||
{
|
||||
return GSVector8i(_mm256_castsi128_si256(_mm_castps_si128(v.m)));
|
||||
}
|
||||
|
||||
__forceinline GSVector8i GSVector8i::cast(const GSVector8& v)
|
||||
gsforceinline GSVector8i GSVector8i::cast(const GSVector8& v)
|
||||
{
|
||||
return GSVector8i(_mm256_castps_si256(v.m));
|
||||
}
|
||||
|
||||
__forceinline GSVector8 GSVector8::cast(const GSVector8i& v)
|
||||
gsforceinline GSVector8 GSVector8::cast(const GSVector8i& v)
|
||||
{
|
||||
return GSVector8(_mm256_castsi256_ps(v.m));
|
||||
}
|
||||
|
|
|
@ -84,7 +84,6 @@ public:
|
|||
virtual SaveStateBase& FreezeMainMemory();
|
||||
virtual SaveStateBase& FreezeBios();
|
||||
virtual SaveStateBase& FreezeInternals();
|
||||
virtual SaveStateBase& FreezePlugins();
|
||||
|
||||
// Loads or saves an arbitrary data type. Usable on atomic types, structs, and arrays.
|
||||
// For dynamically allocated pointers use FreezeMem instead.
|
||||
|
|
|
@ -45,7 +45,7 @@ typedef struct _keyEvent
|
|||
u32 evt;
|
||||
} keyEvent;
|
||||
|
||||
uptr pDsp[2];
|
||||
extern uptr pDsp[2];
|
||||
|
||||
typedef void FnType_OnThreadComplete(const wxCommandEvent& evt);
|
||||
typedef void (Pcsx2App::*FnPtr_Pcsx2App)();
|
||||
|
|
|
@ -39,18 +39,6 @@ enum AppEventType
|
|||
AppStatus_Exiting
|
||||
};
|
||||
|
||||
enum PluginEventType
|
||||
{
|
||||
CorePlugins_Loaded,
|
||||
CorePlugins_Init,
|
||||
CorePlugins_Opening, // dispatched prior to plugins being opened
|
||||
CorePlugins_Opened, // dispatched after plugins are opened
|
||||
CorePlugins_Closing, // dispatched prior to plugins being closed
|
||||
CorePlugins_Closed, // dispatched after plugins are closed
|
||||
CorePlugins_Shutdown,
|
||||
CorePlugins_Unloaded,
|
||||
};
|
||||
|
||||
struct AppEventInfo
|
||||
{
|
||||
AppEventType evt_type;
|
||||
|
@ -101,37 +89,6 @@ public:
|
|||
virtual ~EventListener_CoreThread();
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// IEventListener_Plugins
|
||||
// --------------------------------------------------------------------------------------
|
||||
class IEventListener_Plugins : public IEventDispatcher<PluginEventType>
|
||||
{
|
||||
public:
|
||||
typedef PluginEventType EvtParams;
|
||||
|
||||
public:
|
||||
virtual ~IEventListener_Plugins() = default;
|
||||
|
||||
virtual void DispatchEvent( const PluginEventType& pevt );
|
||||
|
||||
protected:
|
||||
virtual void CorePlugins_OnLoaded() {}
|
||||
virtual void CorePlugins_OnInit() {}
|
||||
virtual void CorePlugins_OnOpening() {} // dispatched prior to plugins being opened
|
||||
virtual void CorePlugins_OnOpened() {} // dispatched after plugins are opened
|
||||
virtual void CorePlugins_OnClosing() {} // dispatched prior to plugins being closed
|
||||
virtual void CorePlugins_OnClosed() {} // dispatched after plugins are closed
|
||||
virtual void CorePlugins_OnShutdown() {}
|
||||
virtual void CorePlugins_OnUnloaded() {}
|
||||
};
|
||||
|
||||
class EventListener_Plugins : public IEventListener_Plugins
|
||||
{
|
||||
public:
|
||||
EventListener_Plugins();
|
||||
virtual ~EventListener_Plugins();
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// IEventListener_AppStatus
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
@ -202,35 +159,6 @@ protected:
|
|||
void CoreThread_OnStopped() { Owner.OnCoreThread_Stopped(); }
|
||||
};
|
||||
|
||||
template< typename TypeToDispatchTo >
|
||||
class EventListenerHelper_Plugins : public EventListener_Plugins
|
||||
{
|
||||
public:
|
||||
TypeToDispatchTo& Owner;
|
||||
|
||||
public:
|
||||
EventListenerHelper_Plugins( TypeToDispatchTo& dispatchTo )
|
||||
: Owner( dispatchTo ) { }
|
||||
|
||||
EventListenerHelper_Plugins( TypeToDispatchTo* dispatchTo )
|
||||
: Owner( *dispatchTo )
|
||||
{
|
||||
pxAssert(dispatchTo != NULL);
|
||||
}
|
||||
|
||||
virtual ~EventListenerHelper_Plugins() = default;
|
||||
|
||||
protected:
|
||||
void CorePlugins_OnLoaded() { Owner.OnCorePlugins_Loaded(); }
|
||||
void CorePlugins_OnInit() { Owner.OnCorePlugins_Init(); }
|
||||
void CorePlugins_OnOpening() { Owner.OnCorePlugins_Opening(); }
|
||||
void CorePlugins_OnOpened() { Owner.OnCorePlugins_Opened(); }
|
||||
void CorePlugins_OnClosing() { Owner.OnCorePlugins_Closing(); }
|
||||
void CorePlugins_OnClosed() { Owner.OnCorePlugins_Closed(); }
|
||||
void CorePlugins_OnShutdown() { Owner.OnCorePlugins_Shutdown(); }
|
||||
void CorePlugins_OnUnloaded() { Owner.OnCorePlugins_Unloaded(); }
|
||||
};
|
||||
|
||||
template< typename TypeToDispatchTo >
|
||||
class EventListenerHelper_AppStatus : public EventListener_AppStatus
|
||||
{
|
||||
|
|
|
@ -74,6 +74,8 @@ std::unique_ptr<AppConfig> g_Conf;
|
|||
AspectRatioType iniAR;
|
||||
bool switchAR;
|
||||
|
||||
uptr pDsp[2];
|
||||
|
||||
// Returns a string message telling the user to consult guides for obtaining a legal BIOS.
|
||||
// This message is in a function because it's used as part of several dialogs in PCSX2 (there
|
||||
// are multiple variations on the BIOS and BIOS folder checks).
|
||||
|
|
|
@ -87,7 +87,6 @@ protected:
|
|||
class GSFrame : public wxFrame
|
||||
, public EventListener_AppStatus
|
||||
, public EventListener_CoreThread
|
||||
, public EventListener_Plugins
|
||||
{
|
||||
typedef wxFrame _parent;
|
||||
|
||||
|
|
Loading…
Reference in New Issue