[Scummvm-devel] Feature checks (MMX, SSE, Altivec...)

Max Horn max at quendi.de
Fri Oct 22 10:01:39 CEST 2004


Yo folks,

I just wanted to suggest that we move the MMX / SSE / Altivec / etc. 
detection code to a better location. Right now, there's code in 
backends/midi/mt32 to detect MMX/SEE (in fact, multiple versions of 
that code); and Altivec detecion is common/scaler/hq?x.cpp. 
Furthermore, we have scaler code in common/scaler/ which requires MMX, 
though it doesn't seem to check for its presence.

To me it would make sense to move such code to a central place. E.g., 
add methods to OSystem, or to common/util.h; or, run the checks once at 
startup, and use it to fill in a (global?) structure with bools for 
each of these features. In other words, let's do something similar to 
the stuff in SDL_cpuinfo.h (which works like my first suggestion, but 
internally uses the second approach :-).


Cheers,

Max





More information about the Scummvm-devel mailing list