rive-app / rive-app/rive-runtime
Metal implementation asserts on texture mip map level count
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 121
- PR merge metrics
- No merged PRs in 30d
Description
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:
Docs: https://developer.apple.com/documentation/metal/mtlblitcommandencoder?language=objc
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the assertion with the Metal backend, then inspect renderer/src/metal/render_context_metal_impl.mm at lines 737-748 and compare the mipmap-generation call with the Apple MTLBlitCommandEncoder documentation. Done means the single-mipmap texture case no longer triggers the Metal validation assertion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, objective-c
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100