Re: [AD] Memory Bitmap to Display blit slow?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Την Sun, 01 Mar 2009 22:55:27 +0200,ο(η) Milan Mimica <milan.mimica@xxxxxxxxxx> έγραψε:

Thomas Fjellstrom wrote:
On Sun March 1 2009, Milan Mimica wrote:
Thomas Fjellstrom wrote:
I've been noticing this for a while now, but under linux, with the nvidia binary drivers, bliting a memory bitmap to a regular allegro 5 display is
horrendously slow.
Upoading a bitmap from system memory to OpenGL texture is just slow, as
ex_membmp shows it. That's how I see it and never asked why.

It's not 4fps on a Quadcore with a 8800GTS slow.

Reminds me, AllegroGL had this comment and I never looked into it:
/* XXX On NV cards, we want to use BGRA instead of RGBA for speed */

My experience has been that BGRA is ~10% faster than RGBA when uploading texture data, as the driver does not have to swizzle the components around. This also affects Ati cards. (It's been a long time since the test, so things may have changed - but somehow I doubt it.)

Some recent posts on GameDev (or was it Beyond3D?) indicated an unoptimized upload speed of ~400MB/sec from system memory to OpenGL. The poster was able to improve speed significantly by breaking up the updates in smaller calls to glTexSubImage2D, presumably because a single big call would thrash the cache.

Which reminds me: you are using glTexSubImage2D instead of glTexImage2D for blitting, right? The latter allocates video memory anew and will positively destroy performance.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/