AnsweredAssumed Answered

Crash with GL_COMPRESSED_RGB and glGenerateMipmap

Question asked by stailgot on Apr 2, 2020

Hi there.

 

On some texture resolutions our application crash with enabled compressed textures and mipmap.

Happens only with AMD gpus. Tested on professional and game card with latest drivers.

 

Minimal code for reproduce. Sample texture attached to this topic.

 

  GLuint texture = 0;
  glGenTextures( 1, &texture );
  glBindTexture( GL_TEXTURE_2D, texture );
  glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
  glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
  glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
  glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );

  // ok with GL_RGB or without glGenerateMipmap
  glTexImage2D( GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB, w, h, 0, GL_RGB, GL_UNSIGNED_BYTE, data );
  glGenerateMipmap( GL_TEXTURE_2D );

 

 

This feature very important for us. Hope for soon fix.

 

 

Similar unresolved problems:

glTexImage2D with GL_COMPRESSED_RGBA
https://community.amd.com/message/1297109

 

glGenerateMipmap with GL_COMPRESSED_RGB crashes for certain resolutions
https://community.amd.com/message/2718885?commentID=2718885#comment-2718885

Attachments

Outcomes