Jump to content

  • Log In with Google      Sign In   
  • Create Account


Too many DDraw Surfaces kill framerate?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 SikCiv   Members   -  Reputation: 122

Like
Likes
Like

Posted 30 September 1999 - 05:47 PM

My app consists of 3 Offscreen 800x600x8 surfaces, and my frame rate is running at 30fps@800x600x8.
But when I run the DDEX4 sample app (modified to 800x600 by me) it runs at 60fps!!
After HOURS of debugging (my app is pretty big), I found out that if you have more than one large offscreen surface, the fps half!

I know that if you have too many VRAM blits, the performance drops, but the surfaces are offscreen.
Is the offscreen surface actually copied to VRAM automatically, increasing performance?

How do I overcome this problem/bug???? Anyone had the same problem?



Sponsor:

#2 Kentamanos   Members   -  Reputation: 122

Like
Likes
Like

Posted 28 September 1999 - 05:38 AM

You are not necessarily truly getting half of the frame rate. I would guess that you are syncing your blt's to the VBI, and your monitor is at a 60Hz vertical refresh rate.

As far as surface allocation, you can specify with flags what type of memory the surface uses in the DDSCAPS2 member of the DDSURFACEDESC2 (this is DX7, but I remember the same functionality with older versions).

I would guess that a lot of the performance is due to the amount of memory your card has. What are the specs on the card?

------------------

-Kentamanos


#3 SikCiv   Members   -  Reputation: 122

Like
Likes
Like

Posted 28 September 1999 - 07:12 PM

My problem occurs even when the blits arent being blitted to the screen.

Basically all im doing in my app is what the
DDEX4 sample is doing, i.e. blitting an offscreen surface to the attached back buffer, then flipping the primary buffer.

Try it yourself, modify the DDEX4 sample program so it loads two or three ddraw surface (using DDLoadBitmap from ddutil) that are as large as the primary surface (640x480, 800x600 in my case).
Even if you dont touch/blit these extra surfaces, the FPS almost halve. Ive tried it on a few systems, one with an i740 AGP card, another was a Toshiba 470CDT (MMX) laptop.



#4 Niels   Members   -  Reputation: 122

Like
Likes
Like

Posted 29 September 1999 - 11:48 PM

I tend to agree with Kentamanos:

1) The fps drop you see is probably not 50%. If your frame update takes just slightly more than your refresh rate (say 1/60 of a second) flip will wait an additional frame before doing the flip, apparently chopping your framerate in half.

2) Are you sure that all your surfaces fit in VMem, because if they don't, that will seriously affect performance.

/NJ


#5 Kentamanos   Members   -  Reputation: 122

Like
Likes
Like

Posted 30 September 1999 - 09:21 AM

Is there any way you could send me some sample code SikCiv? It does seem weird that you are experiencing this. If you'd like, I can take a look at it and get back to you.

Send code to kent_bowling@hotmail.com if you'd like.


------------------

-Kentamanos

[This message has been edited by Kentamanos (edited September 30, 1999).]


#6 SikCiv   Members   -  Reputation: 122

Like
Likes
Like

Posted 30 September 1999 - 05:47 PM

Huh?? I dont know what happened!
My FPS problem is not re-occuring anymore, since i've installed the DirectX5 SDK and Direct7 Runtime!!!!

Maybe the DirectX3 DLL library had a performance bug or something?

NB; this problem occured on two totally different machines, and my code is still the same (but recompiled with DX5 SDK files),
so i am pretty sure it was to do with the DX libraries.

--------------------------SikCivC-------(*)





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS