Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport worker globals for webgpu #25532
Closed
Comments
|
I guess it's a bit more complicated - there's a create_bind_group_layout_id API (and others that access the gpu_id_hub) on Navigator which we need to support for workers as well. |
bors-servo
added a commit
that referenced
this issue
Jan 23, 2020
Support worker for WebGPU To create resource ids for the WebGPU we need to access the `IdentityHub`. In order to access the `IdentityHub` from a `Window` or a `Worker` as well, I've moved the `IdentityHub` to the `GlobalScope` from the `Navigator`. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #25532 cc @kvark @jdm @zakorgy
bors-servo
added a commit
that referenced
this issue
Jan 23, 2020
Support worker for WebGPU To create resource ids for the WebGPU we need to access the `IdentityHub`. In order to access the `IdentityHub` from a `Window` or a `Worker` as well, I've moved the `IdentityHub` to the `GlobalScope` from the `Navigator`. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #25532 cc @kvark @jdm @zakorgy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are various code paths for webgpu that get a global object and downcast it to Window in order to access the Navigator object to access the
gpuproperty. There is a WorkerNavigator that exposes the same property; we should add a helper to GlobalScope that does the right thing to avoid code having to care.cc @imiklos