Unexpected one frame stalls from AMD driver

Hi All,

I have a scene with a few (~10) simple objects and 2 light sources. Under specific conditions I observe a sudden one frame stall. Then it returns back to normal and never happens again until I restart the application.

[li]My application loads the scene and constantly renders it on the screen (sleep is not called)[/li][li]The scene is static (no animations, particles, etc.)[/li][li]So far the FPS is pretty much constant with each frame taking ~15 ms to render (vsynch is off)[/li][li]When the camera starts rotating a stall occurs with one frame taking ~65 ms to render[/li][li]After this moment the issue never happens again under any circumstances.[/li][/ol]

On the left there is a performance graph, showing the stall. On the right there are two screenshots taken before and right after the stall occurred. As you can see nothing changes except the camera slightly rotates.

Can anyone explain what is going on there? Maybe somebody has a similar experience?

Several more facts

[li]The issue is 100% consistent[/li][li]The magnitude of the rotation angle which triggers the issue is constant for each initial camera orientation, but it varies between different initial orientations.[/li][li]It happens only when I have at least one light source in the scene.[/li][li]When I switch light sources in the scene off, I encounter similar stalls. This makes me think that’s the FFP emulator recompiles its shaders, but what would be the reason to recompile shaders just because the camera rotates? [/li][/ol]

Application information:

[li]OpenGL 2.1 FFP with occasional use of shaders (in this particular example shaders are not used)[/li][/ul]

The issue presents on all the AMD platforms I have managed to find:

[li]AMD Radeon HD 6800 \ Windows 7 \ Driver 9.12 (Catalyst 13.1)[/li][li]AMD Radeon HD 6670 \ Windows 7 \ Driver 9.12[/li][li]AMD Radeon HD 6320 \ Linux \ [/li][li]ATI Technologies Inc Radeon E2400 \ Linux \ [/li][/ul]

The issue does not occur on all the NV platforms I have managed to find:

[li]NVIDIA GeForce GTX 460M \ Windows 7 \ Driver[/li][li]NVIDIA Quadro FX 880M \ Windows 7 \ Driver[/li][/ul]

It would be great if there was a way to avoid the stalls, but I doubt it. So I’m just trying to understand this phenomena. I would appreciate any related information.


I suspect that your guess is correct and that the FFP emulator is compiling (and - hopefully - caching) new shaders for your lights.

I’ve seen similar before on Intel (with D3D so let’s not blame their GL driver) where the driver doesn’t seem to load a shader to the GPU until the shader is actually used for the first time, causing stalls of similar magnitude until everything is built up. I don’t know if the same happens with AMD.

Another possible cause is a non-resident texture or VBO coming into view for the first time; it will need to be transferred to the GPU (where hopefully it’s going to subsequently stay) which could also cause a stall (I’ve consistently benchmarked AMD as being significantly slower than either NVIDIA or Intel at transferring textures; a likely cause is “Catalyst AI” modifying the internal format on the fly).

Thank you for such a quick response! Probably I wasn’t clear enough with my description of the issue. I’m so concerned with it is because the camera sees all the objects in the scene from the very beginning.

So there’s this static scene where nothing is changing. The frame rate has been settled down after loading. Then the only thing which happens is the camera slightly changes its rotation while still seeing the whole scene. This is when the stall happens.

From the logical perspective it should not be, because all the resources have been uploaded to the video memory and used in actual rendering, the number of lights doesn’t change, we don’t see new objects and don’t see the old ones closer or farther. It’s just the slightly different angle of view to the scene which triggers it and I don’t get why :smiley:

I’m trying to post a picture explaining what’s going on. Unfortunately it seems like I don’t have enough privileges here :frowning:

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.