mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
MTGS: Explicitly set FP control register on startup
Linux appears? to inherit the value of MXCSR from the creating thread, and that breaks parts of the software renderer.
This commit is contained in:
committed by
Connor McLaughlin
parent
51ceab1f3c
commit
68f43121fb
@@ -9,6 +9,7 @@
|
||||
#include "IconsFontAwesome5.h"
|
||||
#include "VMManager.h"
|
||||
|
||||
#include "common/FPControl.h"
|
||||
#include "common/ScopedGuard.h"
|
||||
#include "common/StringUtil.h"
|
||||
#include "common/WrappedMemCopy.h"
|
||||
@@ -144,6 +145,10 @@ void MTGS::ThreadEntryPoint()
|
||||
{
|
||||
Threading::SetNameOfCurrentThread("GS");
|
||||
|
||||
// Explicitly set rounding mode to default (nearest, FTZ off).
|
||||
// Otherwise it appears to get inherited from the EE thread on Linux.
|
||||
FPControlRegister::SetCurrent(FPControlRegister::GetDefault());
|
||||
|
||||
for (;;)
|
||||
{
|
||||
// wait until we're actually asked to initialize (and config has been loaded, etc)
|
||||
|
||||
Reference in New Issue
Block a user