Freigeben über


GDI Floating-Point Services

Kernel-mode graphics drivers must do all floating-point operations between calls to the GDI-supplied EngSaveFloatingPointState and EngRestoreFloatingPointState routines.

If the hardware has a floating-point processor, the driver can do floating-point operations directly. Otherwise, the driver can use the GDI FLOATOBJ services shown in the following table to emulate floating-point operations. Regardless of processor type, the driver should use the FLOATL data type when declaring floating-point values.

Function Description

EngRestoreFloatingPointState

Restores the Windows 2000 and later kernel floating-point state after the driver uses any floating-point or MMX hardware instructions.

EngSaveFloatingPointState

Saves the current Windows 2000 and later kernel floating-point state.

FLOATOBJ_Add

Adds two FLOATOBJs.

FLOATOBJ_AddFloat

Adds a FLOATOBJ and a FLOATL.

FLOATOBJ_AddLong

Adds a FLOATOBJ and a LONG.

FLOATOBJ_Div

Divides one FLOATOBJ by another.

FLOATOBJ_DivFloat

Divides a FLOATOBJ by a FLOATL.

FLOATOBJ_DivLong

Divides a FLOATOBJ by a LONG.

FLOATOBJ_Equal

Determines whether two FLOATOBJs are equal.

FLOATOBJ_EqualLong

Determines whether a FLOATOBJ and a LONG are equal.

FLOATOBJ_GetFloat

Calculate and return the FLOAT-equivalent value of a FLOATOBJ.

FLOATOBJ_GetLong

Calculate and return the LONG-equivalent value of a FLOATOBJ.

FLOATOBJ_GreaterThan

Determines whether one FLOATOBJ is larger than another.

FLOATOBJ_GreaterThanLong

Determines whether a FLOATOBJ is larger than a LONG.

FLOATOBJ_LessThan

Determines whether one FLOATOBJ is less than another.

FLOATOBJ_LessThanLong

Determines whether a FLOATOBJ is less than a LONG.

FLOATOBJ_Mul

Multiplies two FLOATOBJ values.

FLOATOBJ_MulFloat

Multiplies a FLOATOBJ by a FLOATL.

FLOATOBJ_MulLong

Multiplies a FLOATOBJ by a LONG.

FLOATOBJ_Neg

Changes the sign of a FLOATOBJ.

FLOATOBJ_SetFloat

Sets a FLOATOBJ to a particular FLOATL value.

FLOATOBJ_SetLong

Sets a FLOATOBJ to a particular LONG value.

FLOATOBJ_Sub

Subtracts one FLOATOBJ from another.

FLOATOBJ_SubFloat

Subtracts a FLOATL from a FLOATOBJ.

FLOATOBJ_SubLong

Subtracts a LONG from a FLOATOBJ.