Move ErrorScopes implementation into wgpu-core - #10086
Conversation
55826ae to
7cece35
Compare
|
@sagudev could you fixup the 2 commits? I can also merge as is if there are conflicts since they do already compile individually. |
I am not sure what you are asking me to do. All commits should be good to go (they pass CI independently) and github does not report any conflicts to me. Should I rebase? |
|
There are 2 commits named "Move error types to wgpu-types", I thought you wanted to squash the 2nd into the first but there might be conflicts. Also "use cross thread spawn and store the data in state" could be squashed into "[deno] Use error impl from core". |
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Ideally we would implement ParentDevice but it needs Labeled which is nontrivial Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
I did rebase and cleaned up commits. |
|
Thanks! |
|
Anything else blocking landing this? |
|
Oh, no - I was waiting on that job that kept intermittently failing to succeed. |
Connections
Towards #8911
Description
As outlined in #8911 (comment) in this PR we only move implementation of error scopes into wgpu-core. Errors are currently still produced by consumers (wgpu, deno, ...) and pushed onto device via
handle_errorand co. The error design is taken from wgpu, but handling somewhat different (wgpu has special handling for panicking situations and uses indexes to check for out-of-order drops so for the time being wgpu still has own implementation of push and pop but now using the stack from wgc). For wgpu we now useParentDevice::devicefrom wgc and send error in there.I managed to get deno changes to minimum, but the most complication is using events from wgc for device lost and uncaptured device error as we need Send/Sync for types we bring in closures. So we use ArcMutex https://docs.rs/deno_inside/latest/deno_inside/struct.V8CrossThreadTaskSpawner.html and pass other non-send/sync stuff via hashmap via state.
Testing
Should be covered by existing tests.
Squash or Rebase?
Rebase.
Checklist
wgpumay be affected behaviorally.CHANGELOG.mdentries for the user-facing effects of this change are present.