[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [PATCH] Re: [pygame] Smooth Scaling (pygame.transform.smoothscale)



Your idea is a good one.  Otherwise we could write a minimal test
program that contains some mmx, SSE etc.  So that we try to compile it
as part of the config step.  If the code compiles ok, then it is
supported.

Note, that I use gcc(mingw) for compiling pygame on windows - and I
think mostly the asm code will be gcc specific (unless someone wants
to port it).  So for when people use MSVC the code will be #ifdef'd
out with some checks for the gcc compiler.

SDL uses cpuid stuff for run time detection, so it makes sense to use that code.

We should also look to see how SDL does compilation for osx, which can
optionally support mmx for when it runs on intel processors.


On 6/21/07, mva@xxxxxxxxxxxx <mva@xxxxxxxxxxxx> wrote:
Laura Creighton <lac@xxxxxxxxxx>:

>
> If you are on a BSD or linux system you will have a file
> /proc/cpuinfo which can tell you what sort of CPU you have and

FreeBSD does not use /proc anymore and has it disabled by default.

> whether it has MMX support or not.  I don't know where Windows
> keeps such information.  (And really old unix-and-unix-like
> systems don't have this file, but they don't have MMX either,
> so you are all set.)

For !Win32 systems we could rely on the -march settings of the processor.
According to the manual, the GCC specifies MMX and SSE/SSE2/SSE3 for
several archs, so we just have to test on them. For Win32 I just know about
the CPUID hacks, but that's only interesting for runtime checks.

Regards
Marcus