-
Notifications
You must be signed in to change notification settings - Fork 543
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
Remove RawCommandBuffer: Clone bound #2247
Comments
It would require to change |
Yeah, my IIRC + gut feeling is that it only conflicts with the type-safish part of HAL. Between the raw backend API soundness and type-safeishness, I'd chose the former. |
Then user would have to wrap |
That is totally not the way we are going right now. The approach of having "real" Vulkan handles was extensively analyzed in #2206, and we concluded to continue with the move semantics instead in HAL, for now at least. |
While it helps to synchronize access to other objects, move semantics isn't very convenient for |
I've been fighting with the type system for quite a bit on that, and I came to conclusion that our typed command pool is broken by design. It can't reasonably re-use command buffers until they finish execution on GPU, and it has no means to track it, so it can't function like a pool. The only reason it sort of worked is because it is a LIFO queue, so the next acquired buffer is likely done already... TL;DR: the command pool needs to either become super more complex and fence the submissions (and track them), or be removed. Opinions? |
Not only pool need to track command buffers but also command buffers need to track resources. All of this better to be done by higher level code. Leave hal's pool and buffers unsafe with safety comments |
2514: Remove CommandBuffer: Clone bound r=omni-viral a=kvark Fixes #2247 PR checklist: - [x] `make` succeeds (on *nix) - [x] `make reftests` succeeds - [x] tested examples with the following backends: - [ ] `rustfmt` run on changed code The `CommandBuffer` type and borrow implementation are extremely confusing to me :( Co-authored-by: Dzmitry Malyshau <[email protected]>
This is one of the worst sounding API aspects of HAL at the moment.
It's currently defined as:
This was likely needed for secondary command buffers and submissions.
Steps to fix:
Clone
boundThe text was updated successfully, but these errors were encountered: