Sign in to follow this  

Resource contention

This topic is 2853 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

While profiling my app using Pix, I noticed that the GPU is passing (in DX10 mode) most of its time in idle waiting for a resource not available. Some note : 1) The app is GPU limited (the CPU is basically idle (20% of CPU usage in the most heavy scene)) My questions are : 1) How do I have to interpret these results? In Pix every frame on the GPU side I see 2-3 little red bar (as far as i know means resource unavailable) and after them a medium/big gray bar (that means GPU idle). The CPU on another side has some operations, a big empty bar and then some other operations (is waiting for something?) Another note, when the GPU is idle generally the CPU is working. (The contrary is not valid obviously) 2) What calls can make the resource become unavailable? A MAP with DISCARD is considerated a blocking call? What others? A query to get the DESC of an object? My general frame is : 41 DrawPrimitives/DrawIndexedPrimitives (most object are instanced) 7/8 Locks on a vertex buffer with discard 9 change of pixel shader/vertex shader 1 setrendertarget Note that this is not true in DX9 mode, (no contention at all and the GPU sometimes is rendering 2 frame behind the CPU). But here i get something strange too, when navigating the timeline, sometimes i get that the gpu is processing the frame X, after process the frame X-2, then return to the frame X and so on. What's going on? Pix is not reliable for DX9? (running on a Vista system) Thanks! EDIT : In the part where the gpu is idling I checked and the first operation is doing (after a long wait by itself) is a AddRef on a ShaderResource (probably its the effect framework cause that call is a SetTexture on the shader) and the GPU start working again after the present... EDIT : Screenshot of pix http://img191.imageshack.us/img191/6800/42594100.jpg

Share this post


Link to post
Share on other sites
As far as I tested, If i draw the object one by one there is no contention...and the GPU is as thought 2-3 frame behind the CPU.
Is maybe shader sharing a bad practice? Cause I use the same shader for multiple objects...and its the only thing shared between the various draw calls.

Share this post


Link to post
Share on other sites

This topic is 2853 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this