This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Double-buffering problem


Double-buffering problem

Postby fzammetti » Jun 13, 2002 @ 5:41am

...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Postby Kzinti » Jun 13, 2002 @ 5:46am

Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby fzammetti » Jun 13, 2002 @ 6:33am

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?
...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Postby refractor » Jun 13, 2002 @ 8:42am

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).
User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby Kzinti » Jun 13, 2002 @ 9:05am

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!
Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby Kzinti » Jun 13, 2002 @ 9:07am

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.
Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby refractor » Jun 13, 2002 @ 9:18am

User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby Kzinti » Jun 13, 2002 @ 9:26am

Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby cryo » Jun 13, 2002 @ 9:54am

User avatar
cryo
pm Member
 
Posts: 204
Joined: Sep 19, 2001 @ 6:01am
Location: Bonn, Germany


Intel SA-1110

Postby Jasper » Jun 13, 2002 @ 11:00am

User avatar
Jasper
pm Member
 
Posts: 35
Joined: Jun 4, 2002 @ 5:21pm
Location: Berlin, Germany


Postby refractor » Jun 13, 2002 @ 11:08am

User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby Phantom » Jun 13, 2002 @ 11:16am

Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Postby Jasper » Jun 13, 2002 @ 11:16am

User avatar
Jasper
pm Member
 
Posts: 35
Joined: Jun 4, 2002 @ 5:21pm
Location: Berlin, Germany


Postby refractor » Jun 13, 2002 @ 11:48am

User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


IsDisplayDRAMBuffer()?

Postby fzammetti » Jun 13, 2002 @ 5:37pm

...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Next

Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron