Skip to main content

fex_reduced_x87_precision

Function fex_reduced_x87_precision 

Source
pub fn fex_reduced_x87_precision() -> Rule
Expand description

FEX’s reduced x87 precision in every process.

x86 code runs under FEX, which by default emulates x87 floating-point code, which games built for 32-bit x86 use heavily, at its full 80-bit precision, and such games run slowly that way. Its X87ReducedPrecision option computes with 64-bit doubles instead, which is fast at some cost in accuracy (FEX warns of possible rendering bugs). Our FEX still rounds to single precision when the x87 precision control asks for 24 bits, as D3D9 sets it when it creates a device. FEX takes the option from FEX_X87REDUCEDPRECISION, parsed as an integer (so “1”, not “true”), and reads it from the Windows environment block when its process init runs, after this library has written its env there.

It matches every process, native ARM64 ones included. FEX is not loaded in those, so the variable does nothing there, but a child they start inherits it, and that child may be x86. A rule for one game with env=FEX_X87REDUCEDPRECISION= removes it again, and the variable exported where the process starts wins over it.