Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Unexpected one frame stalls from AMD driver

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2013
    Posts
    3

    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.

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


    Click image for larger version. 

Name:	Graph.jpg 
Views:	74 
Size:	15.8 KB 
ID:	1088
    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
    1. The issue is 100% consistent
    2. The magnitude of the rotation angle which triggers the issue is constant for each initial camera orientation, but it varies between different initial orientations.
    3. It happens only when I have at least one light source in the scene.
    4. 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?


    Application information:
    • OpenGL 2.1 FFP with occasional use of shaders (in this particular example shaders are not used)


    The issue presents on all the AMD platforms I have managed to find:
    • AMD Radeon HD 6800 \ Windows 7 \ Driver 9.12 (Catalyst 13.1)
    • AMD Radeon HD 6670 \ Windows 7 \ Driver 9.12
    • AMD Radeon HD 6320 \ Linux \
    • ATI Technologies Inc Radeon E2400 \ Linux \


    The issue does not occur on all the NV platforms I have managed to find:
    • NVIDIA GeForce GTX 460M \ Windows 7 \ Driver 8.17.12.9616
    • NVIDIA Quadro FX 880M \ Windows 7 \ Driver 9.18.13.1106


    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.


    Thanks,
    gonzaless
    Last edited by gonzaless; 07-31-2013 at 02:15 PM.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,201
    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).

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2013
    Posts
    3
    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

  4. #4
    Junior Member Newbie
    Join Date
    Jul 2013
    Posts
    3
    I'm trying to post a picture explaining what's going on. Unfortunately it seems like I don't have enough privileges here

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •