turn on MMX instructions (Debian Bug#653215: python-pygame)

Issue #100 resolved
Lenard Lindstrom
created an issue

(Forwarded from Debian Bug Tracker: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653215)

Package: python-pygame\
Version: 1.9.1release+dfsg-2\
Severity: wishlist\

//On Sat, Dec 24, 2011 at 3:19 PM, Jeff Breidenbach jeff@jab.org wrote://

pygame.transform.get_smoothscale_backend() returns GENERIC and
pygame.transform.set_smoothscale_backend( 'MMX') throws an exception.
The reason is pygame is compiled with -D_NO_MMX_FOR_X86_64
in Setup.in. According to random internet searching, this compile flag is
a workaround for an old SDL bug that has been fixed since libsdl1.2.10.
If so, let's please turn MMX scaling back on. Here's the note I found on
the internet.

"If your CPU supports MMX and SSE instructions (if you have procfs,
see contents of /proc/cpuinfo), smooth stretching images should be working
swiftly. To check things out, run cgview with -i, and see what smooth scaling
“backend” is. If it's not what you expect, you need to compile pygame, after
removing -D_NO_MMX_FOR_X86_64 from CFLAGS for transform.c (edit
Setup.in and run config.py). You need to get a recent version of SDL
(>=1.2.10) if you do so, since _NO_MMX_FOR_X86_64 was introduced
as a workaround for a bug in SDL (see [[https://bugzilla.redhat.com/show_bug.cgi?id=487720|RedHat bugzilla #487720]])"

I've tested this myself and it appears to work fine. The speed difference is
significant for my program.


Hi Jeff,

I'm filing a new bug report to keep track of progress on this. Please
consider using reportbug or manually submitting a bug report via
e-mail for any future requests, rather than directly contacting the
maintainers/uploaders of a package.

Have you already contacted the upstream pygame developers and notified
them of this issue? Ideally, instead of applying another
Debian-specific patch to pygame, you should ask upstream to remove
-D_NO_MMX_FOR_X86_64 prior to their next release so that all
downstream distributions can benefit from the change, not just Debian.


(addendum: I do not have access to an x86-64 machine, so cannot verify Jeff Breidenbach's claim that MMX works with SDL 1.2.10 and greater. Also, could the problem be platform dependent? -- Lenard)

Comments (1)

  1. Log in to comment