Skip to content

gpu/pass.rs: Remove Iterator::collect<Vec<_>> usage from bind calls #172

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

Closed
wants to merge 1 commit into from

Conversation

gustafla
Copy link
Contributor

I disliked that trivial resource bind calls were performing memory allocations, so I changed the gpu API.

However, I want you to take a moment to discuss whether the API should have a newtype for *mut SDL_GPUBuffer that is used for a sys-crate bind-call, just like it has one for SDL_GPUBufferBinding and SDL_GPUTextureSamplerBinding.

In my opinion, there should be an opaque newtype for that, and the API shouldn't just use the raw pointer that can be obtained from Buffer::raw() and Texture::raw().

@gustafla
Copy link
Contributor Author

Ah, I noticed @quaternic has created a refactoring PR for the whole API. Should we work together on this? I don't want any unnecessary memory allocations in my GPU API wrapper crate.

@gustafla
Copy link
Contributor Author

gustafla commented Jun 9, 2025

I'm closing this for now in favor of #158

@gustafla gustafla closed this Jun 9, 2025
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.

1 participant