mirror of https://github.com/PCSX2/pcsx2.git
Require SSE2 instead of SSE+MMX. SSE2 implies SSE+MMX is supported, so all checksOF of 'SSE' and 'MMX' can be removed.
SSE2 is supported on more than decade-old x86 CPUs. Almost(?) every x86 CPU since PS2 was released. Certainly running the existing code on a non-SSE2 computer resulted in most of the code being disabled anyway and the emulator being incredibly slow. This removal will hopefully allow the removal of MMX/3DNow code as it has been superceded.
This commit is contained in:
parent
707d32536c
commit
6f5e0f96b4
|
@ -240,8 +240,6 @@ void SysLogMachineCaps()
|
|||
|
||||
wxArrayString features[2]; // 2 lines, for readability!
|
||||
|
||||
if( x86caps.hasMultimediaExtensions ) features[0].Add( L"MMX" );
|
||||
if( x86caps.hasStreamingSIMDExtensions ) features[0].Add( L"SSE" );
|
||||
if( x86caps.hasStreamingSIMD2Extensions ) features[0].Add( L"SSE2" );
|
||||
if( x86caps.hasStreamingSIMD3Extensions ) features[0].Add( L"SSE3" );
|
||||
if( x86caps.hasSupplementalStreamingSIMD3Extensions ) features[0].Add( L"SSSE3" );
|
||||
|
|
|
@ -31,45 +31,24 @@
|
|||
|
||||
using namespace pxSizerFlags;
|
||||
|
||||
static void CpuCheckSSE2()
|
||||
{
|
||||
if( x86caps.hasStreamingSIMD2Extensions ) return;
|
||||
|
||||
// Only check once per process session:
|
||||
static bool checked = false;
|
||||
if( checked ) return;
|
||||
checked = true;
|
||||
|
||||
wxDialogWithHelpers exconf( NULL, _("PCSX2 - SSE2 Recommended") );
|
||||
|
||||
exconf += exconf.Heading( pxE( L"Warning: Your computer does not support SSE2, which is required by many PCSX2 recompilers and plugins. Your options will be limited and emulation will be *very* slow." )
|
||||
);
|
||||
|
||||
pxIssueConfirmation( exconf, MsgButtons().OK(), L"Error.Startup.NoSSE2" );
|
||||
|
||||
// Auto-disable anything that needs SSE2:
|
||||
|
||||
g_Conf->EmuOptions.Cpu.Recompiler.EnableEE = false;
|
||||
g_Conf->EmuOptions.Cpu.Recompiler.EnableVU0 = false;
|
||||
g_Conf->EmuOptions.Cpu.Recompiler.EnableVU1 = false;
|
||||
}
|
||||
|
||||
void Pcsx2App::DetectCpuAndUserMode()
|
||||
{
|
||||
AffinityAssert_AllowFrom_MainUI();
|
||||
|
||||
#ifdef _M_X86
|
||||
x86caps.Identify();
|
||||
x86caps.CountCores();
|
||||
x86caps.SIMD_EstablishMXCSRmask();
|
||||
|
||||
if( !x86caps.hasMultimediaExtensions || !x86caps.hasStreamingSIMDExtensions )
|
||||
if(!x86caps.hasStreamingSIMD2Extensions )
|
||||
{
|
||||
// Note: Due to optimizations to GIFpath parsers, memcpy, and possibly other things, we need
|
||||
// a bare minimum of SSE supported by the CPU.
|
||||
// This code will probably never run if the binary was correctly compiled for SSE2
|
||||
// SSE2 is required for any decent speed and is supported by more than decade old x86 CPUs
|
||||
throw Exception::HardwareDeficiency()
|
||||
.SetDiagMsg(L"Critical Failure: SSE Extensions not available.")
|
||||
.SetUserMsg(_("SSE extensions are not available. PCSX2 requires a cpu that supports the SSE instruction set."));
|
||||
.SetDiagMsg(L"Critical Failure: SSE2 Extensions not available.")
|
||||
.SetUserMsg(_("SSE2 extensions are not available. PCSX2 requires a cpu that supports the SSE2 instruction set."));
|
||||
}
|
||||
#endif
|
||||
|
||||
EstablishAppUserMode();
|
||||
|
||||
|
@ -148,7 +127,6 @@ void Pcsx2App::AllocateCoreStuffs()
|
|||
{
|
||||
if( AppRpc_TryInvokeAsync( &Pcsx2App::AllocateCoreStuffs ) ) return;
|
||||
|
||||
CpuCheckSSE2();
|
||||
SysLogMachineCaps();
|
||||
AppApplySettings();
|
||||
|
||||
|
|
|
@ -237,10 +237,7 @@ void Panels::CpuPanelEE::AppStatusEvent_OnSettingsApplied()
|
|||
}
|
||||
|
||||
void Panels::CpuPanelEE::ApplyConfigToGui( AppConfig& configToApply, int flags ){
|
||||
m_panel_RecEE->Enable( x86caps.hasStreamingSIMD2Extensions );
|
||||
|
||||
// IOP rec should work fine on any CPU. :D
|
||||
//m_panel_RecIOP->Enable( x86caps.hasStreamingSIMD2Extensions );
|
||||
m_panel_RecEE->Enable(true);
|
||||
|
||||
const Pcsx2Config::RecompilerOptions& recOps( configToApply.EmuOptions.Cpu.Recompiler );
|
||||
m_panel_RecEE->SetSelection( (int)recOps.EnableEE );
|
||||
|
@ -288,14 +285,14 @@ void Panels::CpuPanelVU::AppStatusEvent_OnSettingsApplied()
|
|||
|
||||
void Panels::CpuPanelVU::ApplyConfigToGui( AppConfig& configToApply, int flags )
|
||||
{
|
||||
m_panel_VU0->Enable( x86caps.hasStreamingSIMD2Extensions );
|
||||
m_panel_VU1->Enable( x86caps.hasStreamingSIMD2Extensions );
|
||||
m_panel_VU0->Enable(true);
|
||||
m_panel_VU1->Enable(true);
|
||||
|
||||
m_panel_VU0->EnableItem( 1, x86caps.hasStreamingSIMD2Extensions );
|
||||
m_panel_VU0->EnableItem( 2, x86caps.hasStreamingSIMD2Extensions );
|
||||
m_panel_VU0->EnableItem( 1, true);
|
||||
m_panel_VU0->EnableItem( 2, true);
|
||||
|
||||
m_panel_VU1->EnableItem( 1, x86caps.hasStreamingSIMD2Extensions );
|
||||
m_panel_VU1->EnableItem( 2, x86caps.hasStreamingSIMD2Extensions );
|
||||
m_panel_VU1->EnableItem( 1, true);
|
||||
m_panel_VU1->EnableItem( 2, true);
|
||||
|
||||
Pcsx2Config::RecompilerOptions& recOps( configToApply.EmuOptions.Cpu.Recompiler );
|
||||
if( recOps.UseMicroVU0 )
|
||||
|
|
|
@ -577,7 +577,7 @@ static void recThrowHardwareDeficiency( const wxChar* extFail )
|
|||
{
|
||||
throw Exception::HardwareDeficiency()
|
||||
.SetDiagMsg(pxsFmt( L"R5900-32 recompiler init failed: %s is not available.", extFail))
|
||||
.SetUserMsg(pxsFmt(_("%s Extensions not found. The R5900-32 recompiler requires a host CPU with MMX, SSE, and SSE2 extensions."), extFail ));
|
||||
.SetUserMsg(pxsFmt(_("%s Extensions not found. The R5900-32 recompiler requires a host CPU with SSE2 extensions."), extFail ));
|
||||
}
|
||||
|
||||
static void recReserveCache()
|
||||
|
@ -601,12 +601,6 @@ static void recReserve()
|
|||
{
|
||||
// Hardware Requirements Check...
|
||||
|
||||
if ( !x86caps.hasMultimediaExtensions )
|
||||
recThrowHardwareDeficiency( L"MMX" );
|
||||
|
||||
if ( !x86caps.hasStreamingSIMDExtensions )
|
||||
recThrowHardwareDeficiency( L"SSE" );
|
||||
|
||||
if ( !x86caps.hasStreamingSIMD2Extensions )
|
||||
recThrowHardwareDeficiency( L"SSE2" );
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
static __fi void mVUthrowHardwareDeficiency(const wxChar* extFail, int vuIndex) {
|
||||
throw Exception::HardwareDeficiency()
|
||||
.SetDiagMsg(pxsFmt(L"microVU%d recompiler init failed: %s is not available.", vuIndex, extFail))
|
||||
.SetUserMsg(pxsFmt(_("%s Extensions not found. microVU requires a host CPU with MMX, SSE, and SSE2 extensions."), extFail));
|
||||
.SetUserMsg(pxsFmt(_("%s Extensions not found. microVU requires a host CPU with SSE2 extensions."), extFail));
|
||||
}
|
||||
|
||||
void mVUreserveCache(microVU& mVU) {
|
||||
|
@ -43,8 +43,6 @@ void mVUreserveCache(microVU& mVU) {
|
|||
// Only run this once per VU! ;)
|
||||
void mVUinit(microVU& mVU, uint vuIndex) {
|
||||
|
||||
if(!x86caps.hasMultimediaExtensions) mVUthrowHardwareDeficiency( L"MMX", vuIndex );
|
||||
if(!x86caps.hasStreamingSIMDExtensions) mVUthrowHardwareDeficiency( L"SSE", vuIndex );
|
||||
if(!x86caps.hasStreamingSIMD2Extensions) mVUthrowHardwareDeficiency( L"SSE2", vuIndex );
|
||||
|
||||
memzero(mVU.prog);
|
||||
|
|
Loading…
Reference in New Issue