Re: [linux-audio-dev] MMX, SSE, SSE2, 3DNOW

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] MMX, SSE, SSE2, 3DNOW
From: Frank Neumann (Frank.Neumann_AT_st.com)
Date: Mon Feb 18 2002 - 17:30:57 EET


Hi,
(just to add my 0,02 Euro-cent), Paul Sladen wrote:

[..]

> Surely it would be much better to have the plugin deal with the issue;
> otherwise the API has to know about how to handle SSE4,5,6, and 10.
>
> What the plugin does should be transparent, if it believes that it can use
> the MMX extension (because it was checked), then it should make that choice
> itself. Backwards compatiable; forwards compatiable; simpler.

I also think the plugin is the one who has to determine what exact CPU
type it's running on and whether or not to activate optimized functions
for MMX/SSE/3Dnow/AltiVec/whatever.

Advantages:
- only one plugin has to be installed, no special plugin-<cputype>
binaries required
- completely transparent to end user

Disadvantages (harmless, IMHO):
- each plugin has to carry CPU detection code (how much is that? a few
dozens bytes?)
- each plugin grows in size the more different CPU types you support
(you need "rendering functions" for at least the baseline CPU type (that
is, plain C/C++) plus each new asm-supported type)
- longer startup time for CPU detection (a few cycles?)

This reminds me of good-ol' Amiga times when I was beta-tester for a
friend's paint program which also worked with plugins (a la Gimp). He
optimized certain plugin for 68020+68881 (Motorola) CPU/FPU
combinations, and whenever I got a new version, I had to take care that
I copy the correct plugin to the plugins directory. You don't want to
ask this from the user, and you don't want him to determine at
installation time what CPU he's got. It should just _work_ (and it looks
even better when it tells the user at runtime what flavour it's running
:-).

Frank

PS: I had once asked AMD about documentation for 3DNow!, and they were
very open there - a couple of weeks later I had a nice CD-ROM in my
mailbox with all of their SDK and PDF files on it (most of which is also
on the website, though). See e.g.
http://www.amd.com/us-en/Processors/TechnicalResources/0,,30_182_739_2983,00.html
(not that I ever actually tried to write some code with 3Dnow.. :-\).


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Mon Feb 18 2002 - 17:24:18 EET