-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Render assets diagnostics #19311
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
base: main
Are you sure you want to change the base?
Render assets diagnostics #19311
Conversation
e5e53bd
to
4da333c
Compare
.github/workflows/ci.yml
Outdated
env: | ||
RUSTFLAGS: "-C debuginfo=0 -D warnings" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
env: | |
RUSTFLAGS: "-C debuginfo=0 -D warnings" |
not needed
.github/workflows/ci.yml
Outdated
env: | ||
RUSTFLAGS: "-C debuginfo=0 -D warnings" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
env: | |
RUSTFLAGS: "-C debuginfo=0 -D warnings" |
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one existed before this change, are you sure this is no longer needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and what about the ones on weekly.yml? they are just ctrl+c ctrl+v from this one
.github/workflows/ci.yml
Outdated
env: | ||
RUSTFLAGS: "-C debuginfo=0 -D warnings" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
env: | |
RUSTFLAGS: "-C debuginfo=0 -D warnings" |
same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having tests to make sure we don't break things in the future would be nice. I think we should wait for wgpu 25 to see if we can use the noop backend as it's ideal for this kind of thing.
François commented about the NOOP backend, so i though it was already available, but it is still not? |
Pretty sure it's just in 25, which I'm hoping to land next week. It would be awesome to have a footprint for allocating buffers in non-e2e tests. |
Wgpu 25 has landed! |
.set(RenderPlugin {
render_creation: RenderCreation::Automatic(WgpuSettings {
backends: Some(Backends::NOOP),
..default()
}),
..default()
}) |
I think this PR could be split in 2 parts. One PR to add the diagnostics then one for the tests. The diagnostic one could be merged ASAP. The main reason I suggest this is that adding diagnostics doesn't have to touch any of the CI stuff. So if CI breaks because of this PR we don't have to revert everything and only the part that needs to touch CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
We should definitely keep that kind of metrics in mind in the future and add this for anything that uses memory.
What broke was the PR for dynamic materials, should i make a solution that already allows the diagnostics of dynamic materials? or just fix for struct-backed materials for now? |
Former please :) |
Objective
There have been problems with
MeshAllocator
andMaterialBindGroupAllocator
losing track of asset changes, then it would be nice to have an automated way of checking if the number of allocations is growing uncontrollably.Solution
Create diagnostics that collect measurements of allocations from
MeshAllocator
andMaterialBindGroupAllocator
, and number of render assets present