• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

djeedai / bevy_hanabi / 8396852802
66%

Build:
DEFAULT BRANCH: main
Ran 22 Mar 2024 10:01PM UTC
Jobs 1
Files 28
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Mar 2024 09:54PM UTC coverage: 52.661% (+0.2%) from 52.419%
8396852802

push

github

web-flow
Cache bind group across frames (#307)

Increase the rendering performance by caching most bind groups across
frames, and only regenerate them when any of the underlying buffers was
re-allocated. Profiling with Tracy shows about 1ms saved on the `2d`
example modified as per #272 (10'000 entities, 100 particle effects).

- The visibility check of entities now uses a `FixedBitSet`. There's no
  notable performance difference in itself in the above test, but using
  a bitfield saves some memory. The actual saving comes from using a
  `Local` parameter, which caches the bitset across system runs and
  prevent allocation/free each frame.
- Move `EffectCache` as a standalone resource on the render world. This
  is mostly for convenience to prevent issues with the borrow checked,
  as the `EffectsMeta` contains too many things.
- In `EffectBuffer`, merge the init and update layouts and bind groups
  for the particle buffer and associated buffers. They were duplicated
  for no good reason, as the bound resources are the same. Also cache
  the bind groups inside the `EffectBuffer` itself instead of using a
  separate `HashMap`.
- Move the creation of bind groups into a new `prepare_bind_groups()`
  system running in the `EffectSystems::PrepareBindGroups` set, itself
  part of the `RenderSet::PrepareBindGroups`. This aligns Hanabi to the
  standard Bevy rendering architecture, ensuring that bind groups are
  created last after any buffer might have been re-allocated.

This change adds a new `trace` feature adding `info_span!()` trace
annotations when active. This allows profiling Hanabi, for example with
one of the various methods described in the Bevy documentation. To
profile with Tracy for example, run _e.g._:

```sh
cargo r --example 2d --no-default-features --release
--features="bevy/bevy_winit bevy/bevy_sprite 2d trace bevy/trace_tracy"
```

Note that this requires changing the default log level to Info,
otherwise the tra... (continued)

7 of 255 new or added lines in 4 files covered. (2.75%)

6 existing lines in 1 file now uncovered.

3048 of 5788 relevant lines covered (52.66%)

22.9 hits per line

Jobs
ID Job ID Ran Files Coverage
1 8396852802.1 22 Mar 2024 10:01PM UTC 0
52.66
GitHub Action Run
Source Files on build 8396852802
Detailed source file information is not available for this build.
  • Back to Repo
  • 7310fad2 on github
  • Prev Build on main (#8396839848)
  • Next Build on main (#8400353789)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc