-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
What to do about running out of resources. #533
Comments
Tried new Rend3, rev "e1cfe1b". Modified code to detect error returns from mesh, texture creation. Just panics for now. Many log entries of the form:
which is a message not seen before. As expected, caught an allocation error with:
It would be helpful if the Rend3 errors were Send. They can't be converted into "anyhow" errors, or be copied or cloned, which is inconvenient. It's that "inner" entry that's a WGPU error that causes the trouble, because it's not Send. |
Subscript out of range error:
So, here, Sharpview kept loading meshes until it hit the limit, then treated that as a non-fatal error and kept going. After a few more requests, there was a subscript out of range in the mesh manager. |
The issue for Will look into the subscript issue. Interesting, didn't realize wgpu errors weren't send. That's an issue in wgpu, but can fix it here too. |
Sounds good. The subscript error seems to indicate that repeatedly banging against the limit breaks something. Now that I can detect out-of-memory errors, I have to do something about them beyond ignoring them. This will take some work. I can switch meshes to a lower level of detail, which was planned anyway and is partly implemented. Thanks for the quick response. |
Question: if Rend3/WGPU reaches the ExceededMaximumBufferSize, are there internal allocations which will cause crashes? I can get vertex consumption down via the level of detail system, but it may take a second or so for a scan to decide what to remove. Rend3 is still drawing during that period. I have my own vertex count, and my intent is to reduce my vertex count around 90% of the level that triggered ExceededMaximumBufferSize. I don't want to be hitting the limit constantly. But I have to hit it a few times to discover it. |
There shouldn't be. If you encounter any, I'd consider it a bug.
I figured it out, should be a simple fix, will apply it once I'm done with work. |
Sounds good. I've sketched out a design for my code for running right up to the limit and then backing off. Non-trivial but can be done. |
Alright, #539 should have fixed that issue |
Everything is going great, and then, suddenly, there's a panic in Rend3 due to hitting the limit on the number of vertices in a bind group or filling GPU memory. This needs to be handled more gracefully.
Suggestions:
pub fn add_mesh(self: &Arc<Self>, mesh: Mesh) -> Result<MeshHandle, Error>
pub fn add_texture_2d(self: &Arc<Self>, texture: Texture) -> Result<Texture2DHandle, Error>
Some kind of metric to tell users when resources are low. Or at least how much is in use. Worst case, applications allocate until they run out, then try to keep the metric safely below its peak value.
Some way around the bind group size limitation.
Now that Sharpview can display more than one Second Life region, if the user goes to a crowded area, the bind group limit is hit, even though the GPU is only about half full.
The text was updated successfully, but these errors were encountered: