View Full Version : FPS Locked at 60? And poor performance
Gadget
28-08-2004, 06:50 PM
Couple of quick questions, I hope someone can shed some light on these.
I am getting 60 fps using the DirectX 7 DirectDraw interface, yet the game is not coded in any way to VBlank, so why is it limited at 60? It's matching my montor refresh but I don't want this, what can I do? I have searched everywhere for info but cannot find anything other than 'WaitForVBlank' but I want to do the opposite.
The other problem has been mentioned here before, but I am not sure if it is clear cut. I get drops in FPS to around 30 - 40, yet the game and my system should not allow this... Someone using an ATI card gets 500 fps constant, meanwhile my GeForce 4400 gives 60 (tied to refresh rate grrr) and drops to 20, 30, 40 when there are several small sprites on screen.
If I load everything into VRAM it makes NO difference at all, suggesting that it's the code, but it's not... I tested DelphiX using the same display size etc and it was really fast and funnily enough had no VBlank issue?
Is there a specific problem with NVidia cards, can I disable the VBlank as well? Been tearing my hair out for months over this =(
Paulius
29-08-2004, 07:27 PM
It's strange that using video memory makes no difference, do you fall back to system memory when creating surfaces and video memory fails? If that's the case try putting in some error messages to see if video memory fails. Perhaps VSync is turned on in display & performance settings under display properties?
Alimonster
30-08-2004, 07:44 AM
When calling the flip function, try passing the flag DDFLIP_NOVSYNC (or maybe DDFLIP_DONOTWAIT, I forget). The down side here is that going faster than the v-synch can cause artifacts on the screen ("tearing"), but if you're fine with that then go for it.
Gadget
10-01-2005, 06:26 PM
When calling the flip function, try passing the flag DDFLIP_NOVSYNC (or maybe DDFLIP_DONOTWAIT, I forget). The down side here is that going faster than the v-synch can cause artifacts on the screen ("tearing"), but if you're fine with that then go for it.
Hi, I made that change today after reading about DDFLIP_DONOTWAIT on the gamedev site. It works and gives constant 72fps (tied to VBlank). With VBlank off I get 200+ fps lol
I tested the Flip result and it works perfectly everytime, with no error returned, which leads me to the next question...
Why use DDWAIT?? It seems to wait no matter what? I thought it was supposed to wait for the hardware? I think nVidia DDraw drivers are bugged.
Paulius
10-01-2005, 10:16 PM
It should have an effect if VBlank is not overridden by the drivers, try setting VBlank to Application-controlled
Gadget
11-01-2005, 09:33 AM
It should have an effect if VBlank is not overridden by the drivers, try setting VBlank to Application-controlled
What I mean is, that if I have DDFLIP_DONOTWAIT it runs at the 72fps refresh rate of monitor. if DDFLIP_WAIT is set, it runs at 60 - 62fps, even if display is at 72hz.
If I disable VBlank, as well as use DDFLIP_DONOTWAIT I get 120 - 200fps! With no errors from blitting or flipping, with no real artifacts, just the standard 'jerky' refresh tear. Obviously I don't want to disable VBlank, unless there is some miracle way of manually timing it, and what would the advantage be?
I am puzzled what it is that it waits for if you use DDFLIP_WAIT, as it obviously doesn't need to wait for anything, or at lease I cant see it...
You get 60-62fps with DDFLIP_WAIT because your update and draw is taking long enough sometimes to just miss a vertical blank, so it has to wait for an entire frame to do the flip. This results in a dropped frame and a lower fps reading.
Gadget
11-01-2005, 03:17 PM
You get 60-62fps with DDFLIP_WAIT because your update and draw is taking long enough sometimes to just miss a vertical blank, so it has to wait for an entire frame to do the flip. This results in a dropped frame and a lower fps reading.
Hmmm, so how does using DDFLIP_DONOTWAIT affect VBlank, and is there an reason not to use it? It doesn't seem to tear the image or anything so it must still be waiting for VBlank?
Are we saying that DDFLIP_DONOWAIT is just flipping when the drawing hasn't finished? If so, shouldn't I see some artifacts?
It's been a while since I've used DirectDraw, so my recollection of the details of DDFLIP_DONOTWAIT and DDFLIP_WAIT are a bit fuzzy. I have to say that I am now at a loss as to explain why this is happening. :(
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.