New assert preventing creation of DXT mipmapped textures which previously worked
BStringhamVRSK opened this issue · 2 comments
Description
The following assert was added to filament/src/details/Texture.cpp on 8/7/2025 in the Texture::Builder::build(Engine& engine) function:
FILAMENT_FLAG_GUARDED_CHECK_PRECONDITION(mImpl->mLevels == 1 || formatMipmappable,
featureFlags.assert_texture_format_mipmappable)
<< "Texture levels is > 1 (levels=" << +mImpl->mLevels
<< " dim=" << mImpl->mWidth << "x" << mImpl->mHeight
<< ", but the format ("
<< int(mImpl->mFormat) << ") "
<< " is not mipmppable";
This is preventing us from creating DXT with pre-created mipmaps and is blocking us from upgrading to newer versions of the Filament libraries.
We create our mipmaps in advance and add them to the texture at runtime. We are not calling generateMipmaps because we already have them.
I'm sure this assert was added for the generateMipmaps() case, but our use case is different.
Can this assert be removed or modified so that we can continue build a DXT texture with 12 mips (for example) and manually fill in the mips as we have been doing?
To Reproduce
Use the Texture Builder to create a DXT texture with more than 1 mip level.
Expected behavior
Allow mipmapped DXT textures to be built and filled in with precomputed mipmaps, which was working up until version 1.64.1
Nice! Thanks for the update.