Bug Report: non-active FBO causes much slower rendering

Windows 8.1 64-bit
GEForce 780
Driver 347.52

I have two programs that render the scene to a texture, then draw the texture onscreen:

“FBO Off.exe” runs at 1000 FPS.

The program “FBO On.exe” only differs by the creation of a bunch of FBOs at the beginning of the program:

for (int n = 0; n < 36 * 6; n++)
                uint32 framebuffer;
                glGenFramebuffers(1, &framebuffer);
                glBindFramebuffer(GL_FRAMEBUFFER, framebuffer);
        glBindFramebuffer(GL_FRAMEBUFFER, 0);

This program runs at 500-700 FPS, though the FBOs are never used and the rest of the code is identical.

Why would anyone want to create 216 FBOs? Well, with shadow mapping that accounts for 36 point lights and is not an unreasonable amount. We accidentally discovered this when a simple scene with 36 point lights experienced a huge drop in framerate when our cached shadowmaps were in use, which use an extra FBO to render static geometry:

Even if FBOs should be shared across different shadow maps, it still makes no sense for an inactive FBO to have any effect on rendering performance, and I would classify this as a bug.

According to one user there is no significant different in the performance of the two applications with the 344.75 drivers:

Moved to OpenGL forum for visibility in the proper RSS feed.

Any word on this?

Thanks for reporting. I have filed a NVIDIA internal bug to the driver team.