[core] make wgc::RenderBundleEncoder like Passes (with methods on self and global)#9712
Conversation
|
cc @teoxoy |
|
The 2nd and 3rd commits look good, but do we need the 1st? I think if we do we should at least make sure to panic if finish is called multiple times. At lest until we wrap the encoder's inner state into a |
Not really but the idea is that the API is done so we can do further internal changes without changing API. Should I drop it or fix it? |
|
I think we still need changes to the API because right now all the functions take I think we should drop the 1st commit and move it into the PR that does the more extensive changes to the internals of the bundle encoder. |
Use them in bundle_ffi methods and mark them as deprecated. Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
For history the first commit was bd7a941 |
We already have separate registry (HashMap) in servo so I though that was also something firefox could do to bypass the problem, but I know it's not elegant. IIRC when passes were refactored I asked about them going out of global. It's somehow ironically how we need to move them back in just so we will be able to get them out again in the future. So I guess I need to do this too. |
Connections
As announced in #5121 (comment)
Description
Recording in content process must go and so does current form of RenderBundleEncoder, but before we start doing internal changes to the encoder itself let's make it's outside interface (that is from wgc, normal wgpu wraps it so there is no changes on the outside) same as of other passes with methods on both
&mut selfandGlobal(taking&mut RenderBundleEncoderas in passes, tho this might change in the follow ups). We still keep bundle_ffi for now (so there is less rush for changes in FF) but we do not use them in deno nor in wgpu anymore (less unsafe 🎉).Testing
Mainly just refactor.
Squash or Rebase?
Squash
Checklist
wgpumay be affected behaviorally.CHANGELOG.mdentries for the user-facing effects of this change are present.