[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XF86 and full-screen graphical console apps



Quoting Johnny Taporg (taporg@yahoo.com):

> > I'm just saying that you do not gain any noticeable performance by
> > using XFree86...
> 
> ... over...?  The part of the sentance that's left out
> is the interesting part.

Most 2D games uses a limited set of images/surfaces to draw their game. If
we're talking about DirectX, I can upload those to the gfx card and take
advantage by Riva128's cool surface blitter. Can you say FAST? My 166 mHz
Pentium can repaint the entire screen in 1024x768 at the refresh rate (60+
fps).

Lets go back and compare XFree86 & svgalib. In svgalib, we have a simple
interface to get the pointer to the screen. This means I have to do all the
drawing by myself -> software. This is noticable slower than hardware I
would like to point out.

With XFree86, we have pixmaps. Because you do not have a direct pointer to
the pixmap data, it is possible for the X server to store the pixmap in
video memory, or even on a remote system. But, and this is a big but,
XFree86 is internally designed so stupid, that it _always_ stores its
pixmaps in software. Another nice thing is, that XFree86's pixmap blitter is
incredible SLOOOOW.

The above means, that you just might as well do your own software mixing,
and then use shared pixmaps (XShm extension) to copy it to the screen. This
is what SDL and PTC does. Bye bye hardware accel.

That is why I say you do not gain any noticable performance by XFree86 over
svgalib or fbdev. Actually, the two later libs are designed to do this kind
of thing, X server drivers where not. So in many cases, you will actually
get better performance using svgalib or fbdev. Of course svgalib does not
support all gfx cards, and therefore in some cases X may be a solution - but
please do not use the argument "acceleration", because that's just plain
wrong.

> Really, what is the competition for xf86?  Commercial
> X servers?  Sure, you'd sort of expect them to be
> improvements to justify their existance at all.  But
> many users feel that xf86 performs adequately enough
> that they don't need to dish out for one of the 
> commercial ones.

Most commercial X servers are built on top of XFree86. I don't know if any
of them provide pixmap acceleration, but when I asked at the XFree86 devel
mailing list, I got the impression that a rewrite of the XAA layer in XFree86
was needed to fix the pixmap problem...

> SVGAlib?  Well, it's not a windowing system.  But
> even if we're only talking games, that suid-root on
> the game itself is quite the turn-off.

Yes, but I was strictly talking about gaining speed when using X instead of
svgalib.

> KGI?  Maybe, except that it's alpha, and there's
> no guarantee that it'll make it into an official
> kernel release.

Don't know enough about KGI to compare them...

> So xf86 stands on its own.  If I'm reading you're
> messages right, it seems that you've got hostility
> towards it.  I can't help but wonder, why?

Imagine you didn't know the above problem with Pixmaps. You then use a lot
of time writing a X11 implementation that should make it rock - simply
because you thought you could get DirectX performance through X's pixmaps.
When you're finally done with this, you realize that XFree86 is four times
slower than our own software svgalib blitter. Bummer.
I just hate when something could be cool, but then because of some stupidity
some place, it just simply is not.

--
Magnus Norddahl
ClanSoft