Skip to content

Instantly share code, notes, and snippets.

@BoyBaykiller
Last active March 9, 2025 05:22
Show Gist options
  • Select an option

  • Save BoyBaykiller/19b86c8c287ed44b24afbe389b548ec7 to your computer and use it in GitHub Desktop.

Select an option

Save BoyBaykiller/19b86c8c287ed44b24afbe389b548ec7 to your computer and use it in GitHub Desktop.
OpenGL Bug Generating Mipmap after getting TextureHandle causes texture sampling to return black at any other Lod than 0 if compressed format is used

High level steps to reproduce:

  • Create a valid 2D Texture with compressed internal format

  • Upload some pixels

  • Generate a bindless texture handle

  • Generate a mipmap for the texture

  • Now in the shader, sampling the texture at every other LOD than 0 always returns black

Here is a minimal example that reproduces the issue: https://github.com/BoyBaykiller/AmdDriverBugReproduce/tree/master. It works by default, but when the variable shouldReproduceBug is set to true a black screen is shown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment