cancel
Showing results for 
Search instead for 
Did you mean: 

OpenGL & Vulkan

squishynewt
Journeyman III

OpenGL glGenerateMipmap changes internalformat

This used to work on 22.5 drivers but is broken on 22.7? Radeon RX 6700 XT. Code works fine on Nvidia based system.

Call glGenerateMipmap on a compressed texture (lod=0) causes all lod(0-4) to be converted to uncompressed format.

Documentation states: "The internal formats of the derived mipmap images all match those of the levelbase image."

 

Spoiler

Dim texID As Integer = GL.GenTexture()
GL.BindTexture(TextureTarget.Texture2D, texID)

GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureBaseLevel, 0)
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMaxLevel, 4)

Dim ft As Integer
GL.GetTexLevelParameter(TextureTarget.Texture2D, 0, GetTextureParameter.TextureInternalFormat, ft)
Debug.WriteLine(ft) ' OUTPUTS 33777 = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT

GL.GenerateMipmap(GenerateMipmapTarget.Texture2D)
GL.GetTexLevelParameter(TextureTarget.Texture2D, 0, GetTextureParameter.TextureInternalFormat, ft)

Debug.WriteLine(ft) ' OUTPUTS 32856 = GL_RGBA8 ???

0 Likes
4 Replies
dipak
Big Boss

Hi @squishynewt 

Thank you for reporting it. I have whitelisted you and moved the post to the OpenGL forum.

Thanks.

0 Likes
dipak
Big Boss

I have reported the issue to the OpenGL team. I will let you know if I get any update on this.

Thanks.

0 Likes
dipak
Big Boss

Just to let you know, the OpenGL team has investigated this issue and they have implemented a fix internally.

Thanks.

0 Likes
dipak
Big Boss

Hi @squishynewt ,

Could you please try the latest driver (Adrenalin 23.7.1 ) to check if this issue has been fixed?

Thanks.

0 Likes