# MDP - mdp_cpuflags.h: CPU Flags

#### Mega Drive Plugins v1.0.0
Revision 0

The MDP plugin interface provides a method to determine what CPU functionality is available on the host system, such as extra instruction sets. The system's CPU flags are provided to plugins in three ways:

1. mdp_t. cpuFlagsRequired is compared against the system's CPU flags. If the system is missing any specified CPU flags, the plugin is not loaded.
2. CPU flags are passed to renderer functions in the mdp_render_info_t struct.
3. CPU flags can be obtained using host_srv. val_get(MDP_VAL_CPU_FLAGS).

CPU flags are architecture-dependent, and may be reused for different meanings on different architectures.

CPU flags for i386 / x86_64:

CPU Flag | Description
--- | ---
MDP_CPUFLAG_X86_MMX | CPU supports the MMX instruction set.
MDP_CPUFLAG_X86_MMXEXT | CPU supports the extended MMX instruction set. (Note: This is only a separate flag on AMD CPUs; on Intel CPUs, this flag is implied by MDP_CPUFLAG_X86_SSE.)
MDP_CPUFLAG_X86_3DNOW | CPU supports the 3DNOW! instruction set. (AMD only)
MDP_CPUFLAG_X86_3DNOWEXT | CPU supports the extended 3DNOW! instruction set. (AMD only)
MDP_CPUFLAG_X86_SSE | CPU supports the SSE instruction set.
MDP_CPUFLAG_X86_SSE2 | CPU supports the SSE2 instruction set.
MDP_CPUFLAG_X86_SSE3 | CPU supports the SSE3 instruction set.
MDP_CPUFLAG_X86_SSSE3 | CPU supports the SSSE3 instruction set.
MDP_CPUFLAG_X86_SSE41 | CPU supports the SSE4.1 instruction set.
MDP_CPUFLAG_X86_SSE42 | CPU supports the SSE4.1 instruction set.
MDP_CPUFLAG_X86_SSE4A | CPU supports the SSE4a instruction set. (AMD only)

CPU flags for additional architectures will be added in future versions of MDP.