2 Replies Latest reply on Oct 5, 2010 4:54 PM by pboudier

    glGenerateMipmap is very slow on HD4670

    xanagan
      glGenerateMipmap take a very long load time compare to NVIDIA 9800GT

      I am working on OpenGL 3.2 forward compatible profile thus the only auto generation of mipmap I can use is glGenerateMipmap.

      [code]

       

      glGenTextures(1,textureID); glBindTexture(GL_TEXTURE_2D,*textureID); if(colorDepth == 32){ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8,width,height,0, GL_RGBA, GL_UNSIGNED_BYTE,pixelData); } else if(colerDepth == 24){ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8,width,height,0, GL_RGB, GL_UNSIGNED_BYTE,pixelData); }

      [/code]

       

      There are two problem

      1.the time take to generate mipmap is very long it take 30 second to generate mipmap of 13 of 2048 * 2048  24bit texture , compare to my GF 9800GT which only take 2~3 second.

      2.the quality of mipmap is bad even when viewing upclose,It look like the driver choose some lowres mipmap instead of hires one (very noticable when using mipmap on normalmap/bumpmap texture).

      Please someone with knowledge about working with ATI/AMD GPU help me on this,since without any mipmap texture/bumpmap effect will look very shimmering when view from distance.

      My system is windows xp ,AMD athlonx2 64bit 250 CPU,  ATIHD4670 with 10.3 driver



      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT,16);

      glHint(GL_GENERATE_MIPMAP_HINT,GL_NICEST); //change this to FASTEST didnt help loding time

      glGenerateMipmap(GL_TEXTURE_2D);