Skip to content

util/ktx: Set max level instead of nearest filters

Nanley Chery requested to merge nchery/piglit:fix/test-astc-miplevels into main

Commit 6b0c7a56 ("Add texture min/mag filters") worked around 3D texture issues (presumably for the sliced-3D ASTC test introduced later on) by setting the min/mag filter to GL_NEAREST for the loaded textures.

The filters helped by disabling mipmapping for textures that would otherwise be considered mipmap incomplete (because not all allowable miplevels are present). Unfortunately, this also affected textures which didn't suffer from that problem and impacted tests which specifically wanted to test each miplevel in a loaded texture (e.g., ./bin/khr_compressed_astc-miptree_gl).

Fix this issue by setting each texture's maximum level instead.

Merge request reports