Skip to content

Conversation

andyleiserson
Copy link
Contributor

It is emptied by reset_queries at the end of every render pass, so it's just keeping an allocation alive, not holding any state, outside of a render pass. It seems unlikely that there is sufficient performance gain from reusing the memory allocation to justify the complexity of additional state at higher layers.

For encoding on finish, there will be some additional code handing off state during encoding. Keeping this state locally within a render pass means one less piece of state that needs to be handed off.

Squash or Rebase? Squash

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

It is emptied by `reset_queries` at the end of every render pass, so
it's just keeping an allocation alive, not holding any state. It seems
unlikely that there is sufficient performance gain from reusing the
memory allocation to justify the complexity of additional state at
higher layers.
@ErichDonGubler ErichDonGubler merged commit a9638c8 into gfx-rs:trunk Sep 9, 2025
40 checks passed
@ErichDonGubler ErichDonGubler self-assigned this Sep 9, 2025
@ErichDonGubler ErichDonGubler added the area: performance How fast things go label Sep 9, 2025
@andyleiserson andyleiserson deleted the push-wsuqkzzmyroy branch September 9, 2025 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: performance How fast things go
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants