Page 1 of 2
Double-buffering problem

Posted:
Jun 13, 2002 @ 5:41am
by fzammetti

Posted:
Jun 13, 2002 @ 5:46am
by Kzinti

Posted:
Jun 13, 2002 @ 6:33am
by fzammetti
Ok, using 163840 (320*512) worked! Now, my question is this: the Y-Pitch returned by GAPI comes back as 256 on the E-125 (X-Pitch is 1). Therefore, I obviously do 320 * (Y-Pitch * 2) to determine by back-buffer size. Will this be the correct way to do it on all devices?
Secondly, I'm assuming there is a MUCH better way to do double-buffering than memcpy because my frame rate dropped from 32 to 18. I certainly expected some hit, but that's not going to cut it.
Any ideas?

Posted:
Jun 13, 2002 @ 8:42am
by refractor
On a StrongARM it should be feasible to perform double-buffering without memcpy. You should be able to allocate another buffer in physical memory and point the "LCD" DMA channel alternatly at that and the "Windows" video bank.
I got quite far investigating that, until I needed Platform Builder for header files, functions, etc (we do have an MSDN subscription here but we produce PC software and the idiot of a techie threw away everything that was vaguely useful ... I'm waiting 'til the next set with Platform Builder arrives, then I'll look at it again and report back)..
(You're taking more of a hit 'cos you're presumably copying the 320x512, some of which isn't even visible. Copy only what you need - I'm pretty sure that the screen isn't cached or buffered so reads and writes will be slooow).

Posted:
Jun 13, 2002 @ 9:05am
by Kzinti
Indeed, don't copy 320x512... Try copying 320x480 instead. Might be faster, might be slower... I will have to test this also.
The pitch returned by GAPI on a E-125 is 512, not 256. The pitch is always specified in bytes (not pixels). The correct size is pitchY * height (or 512 * 320).
Refractor:
I've been looking for ways to do real double-buffering for a long time and haven't found anything on the subject. If you have anything, that would be great!

Posted:
Jun 13, 2002 @ 9:07am
by Kzinti
By the way, you shouln't be allocating your own buffer on the E-125, otherwise performances are going to be really bad. The E-125 GAPI implementation is already providing you with a backbufffer (i.e. IsDisplayDRAMBuffer() will return TRUE).
So basically you should be rendering directly to the GAPI buffer and GXEndDraw() will take care of updating the actual display.

Posted:
Jun 13, 2002 @ 9:18am
by refractor

Posted:
Jun 13, 2002 @ 9:26am
by Kzinti

Posted:
Jun 13, 2002 @ 9:54am
by cryo
Intel SA-1110

Posted:
Jun 13, 2002 @ 11:00am
by Jasper

Posted:
Jun 13, 2002 @ 11:08am
by refractor

Posted:
Jun 13, 2002 @ 11:16am
by Phantom

Posted:
Jun 13, 2002 @ 11:16am
by Jasper

Posted:
Jun 13, 2002 @ 11:48am
by refractor
IsDisplayDRAMBuffer()?

Posted:
Jun 13, 2002 @ 5:37pm
by fzammetti