Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes needed to get rive-bevy working with bevy 0.13.0 and vello 0.1.0 #6

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bcolloran
Copy link

This PR is the bare minimum needed to get rive-bevy working with bevy 0.13.0 and vello 0.1.0.

Note that I haven't been able to get the standalone examples in this repo working because of what appears to be an upstream issue with vello+winit, but I haven't dug deeply into that.

Also, there are probably a lot of improvements to be made by folks who know this space better than I -- I was just trying to knock together something that would allow me to evaluate Rive for my bevy project.

Copy link
Contributor

@dragostis dragostis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for writing this! 🎉

The only reason why I have been waiting to update to Bevy v0.13 is because of the fact that newer version of Vello have GPU stroking disabled by default. My understanding is that this will be enabled by default once the Euler-backed strokes will be merged and used by default.

For now, I still believe that GPU_STROKES should be somehow enabled before we merge this, otherwise the performance of most of the Rive examples will be quite lacking and a huge regression from the current version.

Maybe adding a Scene::gpu_strokes(&mut self, is_enabled: bool) to Vello's scene might do the trick?

examples/viewer/src/main.rs Outdated Show resolved Hide resolved
examples/viewer/src/main.rs Outdated Show resolved Hide resolved
bcolloran and others added 2 commits March 12, 2024 10:08
Co-authored-by: Dragoș Tiselice <[email protected]>
Co-authored-by: Spencer C. Imbleau <[email protected]>
@bcolloran
Copy link
Author

You're very welcome @dragostis, happy to try to help! That totally makes sense regarding why you have been waiting to upgrade -- good news: the vello PR you were waiting for linebender/vello#496 seems to have merged! Of course, the meh news is that it's not at all clear when the Vello project will push another version to Cargo, which would mean tracking Vello by commit hash to get that update rather than a "published" version. Not a big deal, but obviously using a published version can be easier.

I have just started a new job, so I don't know when I'll loop back around to this, so of course please feel free to take this and run with it if you want. Otherwise, I'll try to push it forward hopefully next week

@dragostis
Copy link
Contributor

@bcolloran I tried updating to the newest version of Vello and testing it on Linux with Vulkan (Nvidia driver) with mixed results: it seems to run fine but ends up hanging when rendering more than just a few copies with the example app.

After a bit of digging, the culprit seems to be this issue in wgpu, but I'm not completely sure this is the case. Do you happen to have a similar device to test on? I could also ask directly on Vello about it.

@bcolloran
Copy link
Author

hi @dragostis! :-) Yes I have a Linux+Nvidia machine I can test on. Feel free to push your changes + test scene to this branch or send me a link to your branch and I'll test it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants