rive-runtime
rive-runtime copied to clipboard
Metal implementation asserts on texture mip map level count
When using the Metal backend, I get this assert:
-[MTLDebugBlitCommandEncoder generateMipmapsForTexture:]:1114: failed assertion `Generate Mipmaps For Texture Validation
[tex mipmapLevelCount](1) must be > 1.
The texture is created with a single mip map, as we've always done, using the inBandBytes given to FileAssetLoader::loadContents(rive::FileAsset& _asset, rive::Span<const uint8_t> inBandBytes, rive::Factory* factory)
I'm not sure if it's Rive that has changed, or if it's macOS SDK's that now assert on improper setup:
https://github.com/rive-app/rive-runtime/blob/main/renderer/src/metal/render_context_metal_impl.mm#L737-L748
Docs: https://developer.apple.com/documentation/metal/mtlblitcommandencoder?language=objc