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

avoid creating unnecessary owned strings & fix limits #281

Merged
merged 3 commits into from
Jul 23, 2023

Conversation

rajveermalviya
Copy link
Collaborator

Changes

  • added support for advertising maxBindingsPerBindGroup limt
  • use smallvec crate to avoid possible heap allocations, mimics what wgpu-rs already does for these functions:
    • wgpuQueueSubmit
    • wgpuRenderPassEncoderExecuteBundles
    • wgpuQueueSubmitForIndex
  • replace OwnedLabel with some helper functions for *const c_char
    • ptr_into_label: replaces general usages of OwnedLabel, it creates a Cow::Borrowed of &str which avoids unnecessary heap allocation of String. Only some functions in wgpu-core converts the passed Cow::Borrowed of &str to owned String.
    • ptr_into_path & ptr_into_pathbuf are just similar helpers.

@almarklein almarklein merged commit 44e1f3a into gfx-rs:trunk Jul 23, 2023
15 checks passed
@rajveermalviya rajveermalviya deleted the misc branch July 24, 2023 04:26
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.

2 participants