Too many DDraw Surfaces kill framerate?

Started by
4 comments, last by SikCiv 24 years, 6 months ago
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

-Kentamanos
Advertisement
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.

  Downloads:  ZeroOne Realm

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

<b>/NJ</b>
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).]

-Kentamanos
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?

  Downloads:  ZeroOne Realm

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-------(*)

  Downloads:  ZeroOne Realm

This topic is closed to new replies.

Advertisement