mirror of https://github.com/PCSX2/pcsx2.git
Merge pull request #224 from xsacha/sse2-force
Require SSE2 instead of SSE+MMX. SSE2 implies SSE+MMX is supported, so all checks of of 'SSE' and 'MMX' can be removed.
This commit is contained in:
commit
05d5f06bb5
|
@ -240,8 +240,6 @@ void SysLogMachineCaps()
|
||||||
|
|
||||||
wxArrayString features[2]; // 2 lines, for readability!
|
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.hasStreamingSIMD2Extensions ) features[0].Add( L"SSE2" );
|
||||||
if( x86caps.hasStreamingSIMD3Extensions ) features[0].Add( L"SSE3" );
|
if( x86caps.hasStreamingSIMD3Extensions ) features[0].Add( L"SSE3" );
|
||||||
if( x86caps.hasSupplementalStreamingSIMD3Extensions ) features[0].Add( L"SSSE3" );
|
if( x86caps.hasSupplementalStreamingSIMD3Extensions ) features[0].Add( L"SSSE3" );
|
||||||
|
|
|
@ -31,45 +31,24 @@
|
||||||
|
|
||||||
using namespace pxSizerFlags;
|
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()
|
void Pcsx2App::DetectCpuAndUserMode()
|
||||||
{
|
{
|
||||||
AffinityAssert_AllowFrom_MainUI();
|
AffinityAssert_AllowFrom_MainUI();
|
||||||
|
|
||||||
|
#ifdef _M_X86
|
||||||
x86caps.Identify();
|
x86caps.Identify();
|
||||||
x86caps.CountCores();
|
x86caps.CountCores();
|
||||||
x86caps.SIMD_EstablishMXCSRmask();
|
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
|
// This code will probably never run if the binary was correctly compiled for SSE2
|
||||||
// a bare minimum of SSE supported by the CPU.
|
// SSE2 is required for any decent speed and is supported by more than decade old x86 CPUs
|
||||||
throw Exception::HardwareDeficiency()
|
throw Exception::HardwareDeficiency()
|
||||||
.SetDiagMsg(L"Critical Failure: SSE Extensions not available.")
|
.SetDiagMsg(L"Critical Failure: SSE2 Extensions not available.")
|
||||||
.SetUserMsg(_("SSE extensions are not available. PCSX2 requires a cpu that supports the SSE instruction set."));
|
.SetUserMsg(_("SSE2 extensions are not available. PCSX2 requires a cpu that supports the SSE2 instruction set."));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
EstablishAppUserMode();
|
EstablishAppUserMode();
|
||||||
|
|
||||||
|
@ -148,7 +127,6 @@ void Pcsx2App::AllocateCoreStuffs()
|
||||||
{
|
{
|
||||||
if( AppRpc_TryInvokeAsync( &Pcsx2App::AllocateCoreStuffs ) ) return;
|
if( AppRpc_TryInvokeAsync( &Pcsx2App::AllocateCoreStuffs ) ) return;
|
||||||
|
|
||||||
CpuCheckSSE2();
|
|
||||||
SysLogMachineCaps();
|
SysLogMachineCaps();
|
||||||
AppApplySettings();
|
AppApplySettings();
|
||||||
|
|
||||||
|
|
|
@ -237,10 +237,7 @@ void Panels::CpuPanelEE::AppStatusEvent_OnSettingsApplied()
|
||||||
}
|
}
|
||||||
|
|
||||||
void Panels::CpuPanelEE::ApplyConfigToGui( AppConfig& configToApply, int flags ){
|
void Panels::CpuPanelEE::ApplyConfigToGui( AppConfig& configToApply, int flags ){
|
||||||
m_panel_RecEE->Enable( x86caps.hasStreamingSIMD2Extensions );
|
m_panel_RecEE->Enable(true);
|
||||||
|
|
||||||
// IOP rec should work fine on any CPU. :D
|
|
||||||
//m_panel_RecIOP->Enable( x86caps.hasStreamingSIMD2Extensions );
|
|
||||||
|
|
||||||
const Pcsx2Config::RecompilerOptions& recOps( configToApply.EmuOptions.Cpu.Recompiler );
|
const Pcsx2Config::RecompilerOptions& recOps( configToApply.EmuOptions.Cpu.Recompiler );
|
||||||
m_panel_RecEE->SetSelection( (int)recOps.EnableEE );
|
m_panel_RecEE->SetSelection( (int)recOps.EnableEE );
|
||||||
|
@ -288,14 +285,14 @@ void Panels::CpuPanelVU::AppStatusEvent_OnSettingsApplied()
|
||||||
|
|
||||||
void Panels::CpuPanelVU::ApplyConfigToGui( AppConfig& configToApply, int flags )
|
void Panels::CpuPanelVU::ApplyConfigToGui( AppConfig& configToApply, int flags )
|
||||||
{
|
{
|
||||||
m_panel_VU0->Enable( x86caps.hasStreamingSIMD2Extensions );
|
m_panel_VU0->Enable(true);
|
||||||
m_panel_VU1->Enable( x86caps.hasStreamingSIMD2Extensions );
|
m_panel_VU1->Enable(true);
|
||||||
|
|
||||||
m_panel_VU0->EnableItem( 1, x86caps.hasStreamingSIMD2Extensions );
|
m_panel_VU0->EnableItem( 1, true);
|
||||||
m_panel_VU0->EnableItem( 2, x86caps.hasStreamingSIMD2Extensions );
|
m_panel_VU0->EnableItem( 2, true);
|
||||||
|
|
||||||
m_panel_VU1->EnableItem( 1, x86caps.hasStreamingSIMD2Extensions );
|
m_panel_VU1->EnableItem( 1, true);
|
||||||
m_panel_VU1->EnableItem( 2, x86caps.hasStreamingSIMD2Extensions );
|
m_panel_VU1->EnableItem( 2, true);
|
||||||
|
|
||||||
Pcsx2Config::RecompilerOptions& recOps( configToApply.EmuOptions.Cpu.Recompiler );
|
Pcsx2Config::RecompilerOptions& recOps( configToApply.EmuOptions.Cpu.Recompiler );
|
||||||
if( recOps.UseMicroVU0 )
|
if( recOps.UseMicroVU0 )
|
||||||
|
|
|
@ -577,7 +577,7 @@ static void recThrowHardwareDeficiency( const wxChar* extFail )
|
||||||
{
|
{
|
||||||
throw Exception::HardwareDeficiency()
|
throw Exception::HardwareDeficiency()
|
||||||
.SetDiagMsg(pxsFmt( L"R5900-32 recompiler init failed: %s is not available.", extFail))
|
.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()
|
static void recReserveCache()
|
||||||
|
@ -601,12 +601,6 @@ static void recReserve()
|
||||||
{
|
{
|
||||||
// Hardware Requirements Check...
|
// Hardware Requirements Check...
|
||||||
|
|
||||||
if ( !x86caps.hasMultimediaExtensions )
|
|
||||||
recThrowHardwareDeficiency( L"MMX" );
|
|
||||||
|
|
||||||
if ( !x86caps.hasStreamingSIMDExtensions )
|
|
||||||
recThrowHardwareDeficiency( L"SSE" );
|
|
||||||
|
|
||||||
if ( !x86caps.hasStreamingSIMD2Extensions )
|
if ( !x86caps.hasStreamingSIMD2Extensions )
|
||||||
recThrowHardwareDeficiency( L"SSE2" );
|
recThrowHardwareDeficiency( L"SSE2" );
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
static __fi void mVUthrowHardwareDeficiency(const wxChar* extFail, int vuIndex) {
|
static __fi void mVUthrowHardwareDeficiency(const wxChar* extFail, int vuIndex) {
|
||||||
throw Exception::HardwareDeficiency()
|
throw Exception::HardwareDeficiency()
|
||||||
.SetDiagMsg(pxsFmt(L"microVU%d recompiler init failed: %s is not available.", vuIndex, extFail))
|
.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) {
|
void mVUreserveCache(microVU& mVU) {
|
||||||
|
@ -43,8 +43,6 @@ void mVUreserveCache(microVU& mVU) {
|
||||||
// Only run this once per VU! ;)
|
// Only run this once per VU! ;)
|
||||||
void mVUinit(microVU& mVU, uint vuIndex) {
|
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 );
|
if(!x86caps.hasStreamingSIMD2Extensions) mVUthrowHardwareDeficiency( L"SSE2", vuIndex );
|
||||||
|
|
||||||
memzero(mVU.prog);
|
memzero(mVU.prog);
|
||||||
|
|
Loading…
Reference in New Issue