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

Open question: Should end methods take ownership? #9

Open
MendyBerger opened this issue Apr 19, 2024 · 1 comment
Open

Open question: Should end methods take ownership? #9

MendyBerger opened this issue Apr 19, 2024 · 1 comment

Comments

@MendyBerger
Copy link
Collaborator

Both GPURenderPassEncoder and GPUComputePassEncoder have .end() methods, and they're not supposed to be used after calling end.
JS doesn't have an ownership model so there's no way to enforce that it's never used again on a type level, but since wit does have an ownership model should we make end take ownership?

@MendyBerger MendyBerger changed the title Open question: Should end methos take ownership? Open question: Should end methods take ownership? Apr 19, 2024
@MendyBerger
Copy link
Collaborator Author

Same question for GPUCommandEncoder's finish method

MendyBerger added a commit that referenced this issue May 1, 2024
This is not what the standard does, but is needed for the current implementation. Should be removed eventually.

Also made end take ownership of self, in accordance with  #9. But should be changed back if we decide not to take that route.
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

No branches or pull requests

1 participant