Commit graph

8681 commits

Author SHA1 Message Date
Kunal Mohan
8ff00f0e9c Remove entries from error_command_buffers on drop 2020-08-08 20:20:07 +05:30
bors-servo
53467b80b9
Auto merge of #27536 - kunalmohan:update-wgpu, r=kvark
Major fixes in error reporting in GPUCommandEncoder and ErrorScope Model

<!-- Please describe your changes on the following line: -->
1. Update wgpu to use the error model on wgpu-core side. Register error Ids separately.
2. ~~Record errors only in `GPUCommandEncoder.finish()`. Errors are no longer recorded in ErrorScopes in transfer commands or while recording passes. Any errors that occur are stored on the server-side in `error_command_encoders: HashMap<id::CommandEncoderId, String>` and reported on `CommandEncoderFinish`. Note: This should be reverted when the spec gets updated.~~
3. Correct a major flaw in ErrorScope Model. If multiple operations are issued inside scope and an early operation fails, the promise resolves and script execution continues. The scope, however, was not popped until the results of all its operations were received. This meant that if the user issues another operation, it was assumed to be issued in an error scope that has already been popped by the user, which led to the failure of a number of tests. This is solved by storing a `popped` boolean to check whether `popErrorScope()` has been called on a scope or not. Operation is now issued in the lastest scope for which `popped == false`.

One of the tests used to crash, but it no longer does (All subtests under it fail now). That explains the large number of failing test expectations that have been added. Most of them fail due to the tests being outdated. I'll switch to the updated branch in the next PR.

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-08-07 15:38:17 -04:00
Kunal Mohan
1d80f57aab Record errors in GPUCommandEncoder.BeginPass() and EncoderPass.endPass() 2020-08-07 22:36:05 +05:30
Kunal Mohan
78c9466fdb fix ErrorScope model 2020-08-07 11:35:50 +05:30
bors-servo
080e9dc6df
Auto merge of #27538 - asajeffrey:webxr-texture-invalidation, r=Manishearth
Make textures that come from webxr invalid outside an rAF

<!-- Please describe your changes on the following line: -->

Implements "The colorTexture and depthStencilTexture objects MUST only be used during the XR animation frame of the current session and MUST be made invalid once the XR animation frame completes." from https://immersive-web.github.io/layers/#xrwebglsubimagetype

---
<!-- 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] There are no tests for these changes because we can't test this until we have projection layers

<!-- 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-08-06 22:57:35 -04:00
Alan Jeffrey
c1d064b626 Make textures that come from webxr invalid outside an rAF 2020-08-06 17:51:58 -05:00
Josh Matthews
c6049eda7b Enter a realm when handling mediasession commands. 2020-08-06 14:09:38 -04:00
Kunal Mohan
072770dbc0 Register invalid resources separately 2020-08-06 10:48:17 +05:30
Alan Jeffrey
c4dd171dfb Add XRLayerEvent 2020-08-05 18:07:54 -05:00
Kunal Mohan
01c8b24e9f update wgpu 2020-08-06 00:21:45 +05:30
bors-servo
f8c8307f94
Auto merge of #27499 - asajeffrey:webxr-xrmedia-dummy, r=Manishearth
Add dummy implementations of missing XR layer types

<!-- Please describe your changes on the following line: -->

Add dummy implementations of the missing layer types, and the functions that create them.

---
<!-- 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] 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-08-04 19:08:41 -04:00
bors-servo
549179bbd6
Auto merge of #27480 - kunalmohan:gpu-void-error, r=kvark
WebGPU-Report errors in Promise or void returning operations

<!-- Please describe your changes on the following line: -->
This also updates GPUBuffer mapping to match latest spec.

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

<!-- 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-08-04 16:37:16 -04:00
Alan Jeffrey
d255dc9f7b Add a dummy implementation of all the XR Layer types 2020-08-04 15:10:01 -05:00
Alan Jeffrey
754019f6bc Add test for layers feature (currently always false) 2020-08-04 11:55:06 -05:00
Alan Jeffrey
31de34704d Implement the changes to updating the render state from the WebXR Layers spec 2020-08-03 13:19:22 -05:00
Alan Jeffrey
bf7f4eae31 Update WebXR Layer IDL, and matching changes to the Rust code. 2020-08-03 12:37:01 -05:00
Kunal Mohan
ce6e09a3aa Change ErrorScopeId type to NonZeroU64
And extract it from WebGPURequest
2020-08-03 01:45:29 +05:30
Kunal Mohan
8eff1d74de Record validation error in mapAsync() 2020-08-02 14:25:18 +05:30
Kunal Mohan
cd8d9162e6 Error handling for promise returning operations 2020-08-02 12:45:22 +05:30
Kunal Mohan
8cb5fad828 Report errors from void returning operations 2020-08-01 16:32:37 +05:30
bors-servo
0021a82cb2
Auto merge of #27413 - utsavoza:ugo/issue-26958/26-07-2020, r=nox
Fire mouseenter and mouseleave events

The PR primarily consists of changes for:
- Fixing the order in which `mousemove` events are fired.
- Firing `mouseenter` and `mouseleave` events.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #26958
- [ ] There are tests for these changes
2020-07-31 06:14:24 -04:00
bors-servo
9b6b7935e6
Auto merge of #26607 - nosark:master, r=gterzian
Use ExtendableMessageEvent for messageerror in service workers #25241

<!-- Please describe your changes on the following line: -->
added function dispatch_error to the ExtendableMessageEvent implmentation and replaced the MessageEvent dispatch error call with the ExtendableMessageEvent dispatch error call in serviceworkerglobalscope.rs

---
<!-- 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 #25241 (GitHub issue number if applicable)

<!-- Either: -->
- [x] There are tests for these changes OR
- [x] These changes do not require tests because ___

<!-- 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-31 00:58:04 -04:00
bors-servo
f0ba895c68
Auto merge of #27447 - kunalmohan:gpu-error, r=kvark
Refactor and improve GPUErrorScopes

- Remove use of equivalent BGLs
- Capture errors from more `Createxxx` operations
- Address crashes on macOS in #27402

Improved ErrorScope model attempts to-

1. Identify and report `OutOfMemoryError` separately.
1. Match `GPUErrorFilter` and pass on uncaptured errors to parent scope.

r?@kvark

<!-- 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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- 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-30 14:26:05 -04:00
Kunal Mohan
4e38633009 Refactor and improve GPUErrorScopes
Remove use of equivalent BGLs
2020-07-30 23:36:58 +05:30
Kyle Nosar
95ddcf5d4d Use ExtendableMessageEvent for messageerror in service workers 2020-07-30 05:56:29 -07:00
Utsav Oza
962e620529 Do not panic on navigating across documents 2020-07-30 16:34:30 +05:30
Utsav Oza
da45522085 Fix comments for handle_mouse_move_event method 2020-07-30 16:34:30 +05:30
Utsav Oza
c235e1ee43 Fire mouseenter and mouseleave events 2020-07-30 16:34:29 +05:30
Utsav Oza
5fe54b8003 Fix ordering of mousemove event 2020-07-30 16:34:29 +05:30
bors-servo
5831ab8221
Auto merge of #27448 - asajeffrey:script-webgl-texture-ownership, r=jdm
Don't delete GL textures created by WebXR

<!-- Please describe your changes on the following line: -->

Currently WebGL assumes it owns any WebGLTexture, and deletes the backing GL texture when the object is GC'd. This isn't valid for textures created by a webxr layer manager, which can result in textures being used after they're deleted.

---
<!-- 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 #27427
- [x] These changes do not require tests because we don't reftest webxr

<!-- 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-29 19:23:52 -04:00
bors-servo
c26a803fee
Auto merge of #27429 - asajeffrey:webxr-user-intent-pref, r=Manishearth
Add a pref to indicate user intent to enter webxr

<!-- Please describe your changes on the following line: -->

Add a pref to indicate that the user has indicated intent to enter webxr.

---
<!-- 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 do not require tests because it's a command-line pref

<!-- 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-29 18:25:12 -04:00
Alan Jeffrey
dfc641d648 Don't delete GL textures created by WebXR 2020-07-29 17:14:51 -05:00
Alan Jeffrey
4894e8f2c4 Add a pref to indicate user intent to enter webxr 2020-07-29 16:42:48 -05:00
mustafapc19
d8b6755a8d Console.Clear implemented 2020-07-29 22:19:18 +05:30
bors-servo
582a7a7afa
Auto merge of #27420 - avr1254:master, r=jdm
Removed unnecessary conversion from UTF-8 to UTF-16

<!-- Please describe your changes on the following line: -->
Changed Spidermonkey API calls to remove need for UTF-16 conversion.

---
<!-- 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 #27331 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they simply optimize existing code for speed.

<!-- 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-28 09:20:26 -04:00
Manish Goregaokar
9fe70e6b71 Move secondary view support into a pref 2020-07-27 20:45:42 -07:00
Arjun Ramachandrula
6014710538 Removed unnecessary conversion from UTF-8 to UTF-16 2020-07-27 21:45:20 -04:00
bors-servo
b83433fb14
Auto merge of #27299 - avr1254:master, r=jdm
Implemented get element target algorithm

Added check for area and anchor element

Finished issue: Implemented get target and no opener algorithm

Implemented get element target and get element noopener algorithms.

<!-- Please describe your changes on the following line: -->
Used the algorithms in html spec to implement target and no opener algorithms.

---
<!-- 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 #27253 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- 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-24 17:30:38 -04:00
Arjun Ramachandrula
2d5c30d042 Implemented get element target and get element noopener algorithms
and refactored into functions.
2020-07-24 16:50:46 -04:00
bors-servo
ebec798263
Auto merge of #27389 - kunalmohan:update-wgpu, r=kvark
Implement GPURenderBundles

<!-- Please describe your changes on the following line: -->
1. Implement `GPURenderBundleEncoder` and `GPURenderBundle`.
2. Update wgpu to use serializable descriptors.
3. Set user-defined labels on object creation.

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

<!-- 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-24 14:55:09 -04:00
Kunal Mohan
aff22db33f Implement GPURenderBundleEncoder and GPURenderBundle 2020-07-24 12:45:23 +05:30
Kunal Mohan
75abccb16b update wgpu, use serializable descriptors 2020-07-22 23:22:13 +05:30
Josh Matthews
e3f0989e1c Ensure scripts compiled off-thread can import modules. 2020-07-22 13:10:03 -04:00
Josh Matthews
a271ed9150 Pass C string pointer to CompileOptionsWrapper. 2020-07-22 12:30:27 -04:00
bors-servo
a242913629
Auto merge of #26710 - AbhishekSharma102:issue_26571, r=jdm,gterzian
Compile external scripts off the main thread

<!-- 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
- [ ] These changes fix #26571  (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- 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-21 18:29:47 -04:00
AbhishekSharma102
1119dd119e Added off thread compilation
Co-authored-by: Gregory Terzian <2792687+gterzian@users.noreply.github.com>
Co-authored-by: Abhishek Sharma <20724848+AbhishekSharma102@users.noreply.github.com>
2020-07-21 16:20:51 -04:00
bors-servo
ac37078af8
Auto merge of #27348 - kunalmohan:gpu-copy, r=kvark
Implement GPUCommandEncoder.copy commands

<!-- Please describe your changes on the following line: -->
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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- 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-21 15:13:08 -04:00
Kunal Mohan
5285c07f1f Implement GPUCommandEncoder.copy commands 2020-07-21 21:00:23 +05:30
bors-servo
c0778ff3c5
Auto merge of #27313 - jdm:layer-idl, r=asajeffrey
Update XRWebGLLayer to match specification.

This unbreaks most of the webxr WPT tests.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #27312
- [x] There are tests for these changes
2020-07-21 01:38:08 -04:00
bors-servo
59841377c2
Auto merge of #27329 - kunalmohan:gpu-label, r=kvark
Update GPUObjectBase webidl and cleanup valid flags

<!-- Please describe your changes on the following line: -->
Update labels to be `USVString`
Remove `valid` flags in WebGPU resources. The only place where we still have that is `GPUCommandEncoder` (Only to validate the GPUCommandEncoder state. Not sure how errors would be handled/reported by server for copy commands).

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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- 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-20 20:43:56 -04:00