Skip to content

Update glTF meshopt integration to 0.7 - #26318

Merged
alice-i-cecile merged 1 commit into
bevyengine:mainfrom
stuartparmenter:gltf-meshopt-0.7
Oct 27, 2026
Merged

alice-i-cecile merged 1 commit into
bevyengine:mainfrom
stuartparmenter:gltf-meshopt-0.7

Conversation

@stuartparmenter

@stuartparmenter stuartparmenter commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Objective

I missed updating bevy_gltf in my previous PR that updated meshopt to 0.7. It still depends on 0.6 while bevy_pbr uses 0.7, so a build with both glTF meshopt decoding and meshlets compiles meshoptimizer twice.

Solution

Update bevy_gltf to meshopt 0.7 and use its safe encoder in the test fixtures.

The decoders and filters still call meshoptimizer directly. I added safe wrappers upstream for 0.7, but they return a new vector, which needs an extra allocation and a copy into the glTF buffer. I benchmarked the safe version and it is ~20% slower, so leaving that one.

Testing

  • Verified everything works.

AI Disclosure

This was AI assisted w/ Opus 5.5 as part of my meshopt and tangent generation work. I used Opus to update the glTF integration and to benchmark the 0.7 safe wrappers against the direct decoder calls. I reviewed the changes, tested them, and opened PR.

@stuartparmenter stuartparmenter added S-Needs-Review Needs reviewer attention (from anyone!) to move forward A-glTF Related to the glTF 3D scene/model format labels Oct 26, 2026
@stuartparmenter stuartparmenter added the D-Straightforward Simple bug fixes and API improvements, docs, test and examples label Oct 26, 2026
Comment thread crates/bevy_gltf/src/loader/extensions/khr_meshopt_compression.rs
Comment thread crates/bevy_gltf/src/loader/extensions/khr_meshopt_compression.rs
@stuartparmenter stuartparmenter added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Oct 26, 2026
@alice-i-cecile
alice-i-cecile added this pull request to the merge queue Oct 27, 2026
Merged via the queue into bevyengine:main with commit 307d9ee Oct 27, 2026
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-glTF Related to the glTF 3D scene/model format D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants