Skip to main content
gamedev.net
🔒 Locked

Strange issue.

Started by Woodchuck 4 replies 1.1k views
Original Post
Woodchuck
Woodchuck
I've got a strange things here. I'm talking about a 3D engine, using directx9 and shaders 2.0. The problem appeared when I try to add an omni light in a scene, in addition of a directional light. The performance was multiplied by 2. Yes, by adding a light, the program run 2 times faster... I discover that when the omni light is added, an occlusion query is issue (begin and end). So, I add a fake occlusion query issue, and now, the program run 2 times faster. What's happen ? I think this is somethings like a resource management issue or a cpu/gpu paralization issue... any idea ?
Woodchuck
Woodchuck
Damn, no response.

I forgot to mention, that by this way, I highlight a performance problem of my program. It is not solved at all.

I know this topic is vague for the moment. I would like to know if some cpu/gpu paralization issue are well known. Because I think the occlusion query begin issue just tell to the driver : "hey ! prepare yourself !". Something like that. A resource management issue. For sure.

I would like to say in addition that I'm speaking about a professional 3D engine, a clear engine, well wrote by experiment programmers. That's clearly not a mistake of a beginner that have things to learn about program debuging. Sorry for them.

Have you encounter somethings that is reminiscent of this problem ?
Woodchuck
Woodchuck
Ok I've got it.

The performance measurement (wich use windows performance counter) is wrong when an occlusion query (and i don't know the hell what else) is issued.
For information I use nvperfhud to find that...
remigius
remigius
I don't think you mentioned which engine you are using, so it's going to be hard to get feedback if anyone has encountered something sililar. If your program is running 2x faster with only the same directional light by just adding an unused occlusion query, there's something fishy going on. A cpu/gpu paralization issue might be causing this, but I doubt it.

Have you tried if you get the same effect on another machine? It might be some driver issue or something with your hardware setup. And even though it's a professional engine, it can't hurt to run it against the D3D Debug runtimes if you haven't done so already.

[edit]

Too slow [smile]
Woodchuck
Woodchuck
Thanks for reply so.
Woodchuck
Woodchuck
The problem seems to come from here :

Quote:

MSDN :
The QueryPerformanceCounter function retrieves the current value of the high-resolution performance counter.

Syntax

BOOL QueryPerformanceCounter(

LARGE_INTEGER *lpPerformanceCount
);

Remarks

On a multiprocessor computer, it should not matter which processor is called. However, you can get different results on different processors due to bugs in the basic input/output system (BIOS) or the hardware abstraction layer (HAL). To specify processor affinity for a thread, use the SetThreadAffinityMask function.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.