-
Notifications
You must be signed in to change notification settings - Fork 77
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
If and when is VERTEX_WRITABLE_STORAGE needed? #317
Comments
Hi @sharkdp, thanks for opening this issue. This one has been on my mind for some time. Here's some context:
But that status quo is not a good solution. So thanks for reopening that topic.
I think it's only needed when you have a vertex shader which writes to some buffer. I'm pretty sure 🎆 Hanabi never does that, although there might be some bug where some buffer is bound with write access by mistake even thought it doesn't need it.
This is kind of expected in the sense that we request a feature that the hardware doesn't support. Why a crash you ask? Because I don't think there's a simple mechanism in Bevy to gracefully fail a plugin initialization unfortunately.
This is exactly the kind of thing I was worried about removing that feature request. And this incidentally makes me think about the wasm bug which looks similar and is not root caused. By any chance did you run several examples and they all fail? Is there any case where only the first effect shows up and not the other ones (that's exactly the wasm bug which I can't diagnose and blocks warm support)?
This is arguable. I get this blocks development, but in general I'm a fervent supporter of crashing hard and fast rather than silently failing, as the former is a lot easier to debug. It depends on context though; you might argue it's just a visual effect and is not breaking your app. Or a more artistically inclined dev might argue this completely break the artistic vision of a game. The best is to give the choice where possible I guess. Let me know if you can do more testing on various examples in the repo, and which ones break or not. I will try to figure out if there's any vertex write anywhere. But I don't think I can repro with my hardware. |
Thank you for the detailed answer!
I think I should have explained this better: If I do not request the feature to be set to true:
So it's not like there is a regression for cases where it worked before. The fact that it doesn't work on the old hardware setup might be entirely unrelated to VERTEX_WRITABLE_STORAGE.
Absolutely agree with you. Choice would be best. I just wanted to mention that in our specific use case, we would rather still support the old hardware and ignore the absence of particle effects than to not support it at all. Ideally, I would like to get back some
So far, I only tested with our game. But I can try to run Hanabi examples on that laptop. Just need to figure out if I can cross-compile them. What exactly would we want to test? Run all of the examples in their current state? And then log if they (1) crash or (2) run, but show no effects at all or (3) run, but only show the first effect? |
There were a number of bugs fixed recently, which might explain (hopefully) effects not showing up. If you can remove the |
The requesting of `VERTEX_WRITABLE_STORAGE` in all examples is a legacy from the very start of the project, which has no reason to be. We have already validated that everything works without it, and this creates confusion for users. Fixes #317
Some bevy_hanabi examples explicitly set
VERTEX_WRITABLE_STORAGE
totrue
:But other examples don't. I couldn't figure out if and when this is really necessary. For example, I can start the
gradient
example without those three lines, and it seems to work just fine. I can even explicitly set it tofalse
and things look the same. Am I missing something or does this maybe have a performance impact?I'm mainly asking because explicitly requesting this feature leads to crashes on some older hardware:
If I do not request the feature to be set to true, it starts properly but does not show any particle effects, which I would prefer over crashing on startup. But I'm not sure about the implications on devices where it does actually work.
Thank you for providing this crate. It works great for us!
The text was updated successfully, but these errors were encountered: