servo/components
bors-servo 9cd22a01f7
Auto merge of #27285 - kunalmohan:async-error, r=kvark
Implement WebGPU ErrorScopes

<!-- Please describe your changes on the following line: -->
This PR covers the following-
1. update wgpu-core (Rustify `RenderPipelineDescriptor`)
2. Add initial implementation of `pushErrorScope` and `popErrorScope`.
3. Use existing `BGL` if an equivalent already exists.

A brief explanation of the ErrorScope Implementation-
1. We store `HashMap<u64, ErrorScopeInfo>` in `GPUDevice`. `ErrorScopeInfo` is a new struct used to store all necessary info for an ErrorScope.
2. We simultaneously store `Vec<u64>` to keep track of the ErrorScope hierarchy. `next_scope_id` is used to get the `scope_id` for a new Scope.
3. We send the `scope_id` of top-level scope to the server in the message for an operation. The server performs the operation and sends back the scope_id with the result message (only if a scope_id was sent from the client. Otherwise no message is sent.).
4. We store a `HashMap<WebGPUDevice, Dom<GPUDevice>>` in `GlobalScope` to access them from `ScriptThread`.
5. While creating a `GPUDevice` we send the `PipelineId` of the pipeline it was created in so that when the server send the response, we can access the device from the GlobalScope of that Pipeline.
6. We generate the relevant `GPUError` in `GlobalScope`(if required) can call the necessary fn in `GPUDevice`.

This implementation is pretty rough and not complete at all. Broadly the following cases aren't handled at the moment-
1. ErrorFilter is not checked when an error is captured.
2. We don't propagate an error to enclosing scope if a scope did not capture it.
3. `UncapturedErrorEvents` is not implemented.

As for Equivalent BGLs we now store `Vec<(Vec<wgt::BindGroupLayoutEntry>, Dom<GPUBindGroupLayout>)>` in `GPUDevice` and compare `Vec<wgt::BindGroupLayoutEntry>` for new BGL with the existing ones and return one if it is found. Otherwise a new one is created and an entry added to the `Vec`.

r?@kvark

---
<!-- 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

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2020-07-17 13:18:31 -04:00
..
allocator
atoms Add a sessionavailable event that allows content to enter an XR session without a user gesture 2020-07-10 14:09:18 -05:00
background_hang_monitor improve reliability of hang monitor tests 2020-07-07 12:45:14 +08:00
bluetooth Some Cargo.toml cleanups 2020-05-13 22:09:56 -07:00
bluetooth_traits Some Cargo.toml cleanups 2020-05-13 22:09:56 -07:00
canvas Support depth and stencil in webxr 2020-07-10 18:35:09 -05:00
canvas_traits Support for webxr layer management 2020-06-28 16:37:45 -05:00
compositing Unfocus input when virtual keyboard is dismissed 2020-07-13 14:04:06 +02:00
config Auto merge of #27265 - jdm:hubs-stubs2, r=ferjm 2020-07-15 03:33:20 -04:00
config_plugins More Cargo.toml cleanups 2020-05-14 22:20:18 -07:00
constellation Unfocus input when virtual keyboard is dismissed 2020-07-13 14:04:06 +02:00
debugger
deny_public_fields
derive_common style: Gracefully handle errors creating shared memory UA style sheets. 2020-06-04 01:50:36 +02:00
devtools devtools: TabDescription actor 2020-07-13 09:21:27 +02:00
devtools_traits More Cargo.toml cleanups 2020-05-14 22:20:18 -07:00
dom_struct
domobject_derive More Cargo.toml cleanups 2020-05-14 22:20:18 -07:00
embedder_traits UWP: support virtual keyboard 2020-07-02 10:57:34 +02:00
fallible More Cargo.toml cleanups 2020-05-14 22:20:18 -07:00
geometry
gfx Make url for "client" referrer mandatory 2020-06-17 19:07:14 +02:00
gfx_traits Update webrender. 2020-06-11 14:07:39 -04:00
hashglobe More Cargo.toml cleanups 2020-05-14 22:20:18 -07:00
jstraceable_derive
layout Implement GPUSwapChain and GPUCanvasContext and interface with Webrender 2020-06-13 17:46:12 +05:30
layout_2020 Auto merge of #27044 - servo:flexbox, r=nox 2020-06-23 16:51:02 -04:00
layout_thread ensure clean shutdown of all threads running JS 2020-06-30 13:22:38 +08:00
layout_thread_2020 ensure clean shutdown of all threads running JS 2020-06-30 13:22:38 +08:00
layout_traits ensure clean shutdown of all threads running JS 2020-06-30 13:22:38 +08:00
malloc_size_of update keyboard-types crate 2020-06-29 10:27:54 +02:00
media Implement GPUSwapChain and GPUCanvasContext and interface with Webrender 2020-06-13 17:46:12 +05:30
metrics Remove support for energy profiling 2020-06-04 16:39:08 +02:00
msg ensure clean shutdown of all threads running JS 2020-06-30 13:22:38 +08:00
net net: Remove explicit Host header from websocket connection. 2020-07-16 13:16:30 -04:00
net_traits Propagate referrer policy during about:srcdoc page load 2020-07-02 14:29:27 +05:30
pixels More Cargo.toml updates 2020-05-30 18:18:57 -07:00
profile Remove support for heartbeats profiling 2020-06-04 22:53:56 +02:00
profile_traits Remove support for heartbeats profiling 2020-06-04 22:53:56 +02:00
rand
range More Cargo.toml updates 2020-05-30 18:18:57 -07:00
remutex Fix rust's remutex source code link 2020-06-01 21:24:05 +09:00
script Auto merge of #27285 - kunalmohan:async-error, r=kvark 2020-07-17 13:18:31 -04:00
script_layout_interface ensure clean shutdown of all threads running JS 2020-06-30 13:22:38 +08:00
script_plugins Update to 7/6 rustc. 2020-07-06 10:06:06 -04:00
script_traits Unfocus input when virtual keyboard is dismissed 2020-07-13 14:04:06 +02:00
selectors Fix typo 2020-07-01 13:49:28 -07:00
servo Auto merge of #27302 - jdm:gst-package-mac, r=Manishearth 2020-07-17 10:51:57 -04:00
servo_arc More Cargo.toml updates 2020-05-30 18:18:57 -07:00
size_of_test
std_test_override
style Auto merge of #27032 - mrobinson:fractional-iteration, r=jdm 2020-06-24 15:54:27 -04:00
style_derive style: Rustfmt recent changes. 2020-06-04 02:02:50 +02:00
style_traits style: Miscellaneous servo build fixes. 2020-06-04 01:50:36 +02:00
to_shmem style: Gracefully handle errors creating shared memory UA style sheets. 2020-06-04 01:50:36 +02:00
to_shmem_derive style: Gracefully handle errors creating shared memory UA style sheets. 2020-06-04 01:50:36 +02:00
url Update referrer computation 2020-07-02 14:29:26 +05:30
webdriver_server update keyboard-types crate 2020-06-29 10:27:54 +02:00
webgpu Ensure GPUDevice cleanup in GlobalScope 2020-07-17 21:17:38 +05:30
webrender_surfman Support for webxr layer management 2020-06-28 16:37:45 -05:00
webrender_traits Implement GPUSwapChain and GPUCanvasContext and interface with Webrender 2020-06-13 17:46:12 +05:30