glCopyTexSubImage2D and automatic mipmap generation

Here is the situation: My program uses dynamic textures, and I use glCopyTexSubImage2D to set the texture content. Without automatic mipmap generation this goes at reasonable speeed. However, when I enable automatic texture generation (by setting GL_GENERATE_MIPMAP to GL_TRUE) the speed drops to a measly 5-7% of the speed that was obtained before. Does this sound reasonable? I expected something around 50%…

Note that this happens regardless of whether the dynamic texture is generated using the framebuffer or a pbuffer.

This happens on a 6800GT under Linux (Mandrake 2.6) with 61.11 drivers and also under Windows XP Pro with the 61.77 drivers. There is no such behavior on e.g. ATI 9800 Pro.

Any help or pointers are most appreciated.

  • SFRuckus

Do you mean that you lose no performance with your Radeon 9800 Pro ?

That sounds like a driver bug. I’d report it to Nvidia’s devrel.

@vincoof: There is a performance drop on the 9800 as well, but it is of the expected 50% order.

  • SFRuckus

What is the format of the texture you are updating with glCopyTexSubImage2D?

@jra: The format I use is GL_RGBA8.

  • SFRuckus

Odd, that should work fine.

Send me a demo and I will file a bug if this hasn’t already been fixed.

I posted an automatic mipmapping issue on GF 6800 GT some time ago, but it didn’t get solved.

I’m having the same problem in both linux (61.11) and windows (up to 66.0).

Specifying image data with teximage2D and enabling automatic mipmap generation has the expected 50% overhead +/-regardless of texture internal format.
If the data is specified with copyteximage or copytexsubimage I get the same large performance drop.

Nico