Sync changes from mozilla-central gfx/wgpu#606
Closed
moz-gfx wants to merge 23 commits intogfx-rs:masterfrom
Closed
Sync changes from mozilla-central gfx/wgpu#606moz-gfx wants to merge 23 commits intogfx-rs:masterfrom
moz-gfx wants to merge 23 commits intogfx-rs:masterfrom
Conversation
Updates `wgpu` code as well as our WebIDL bindings. The `wgpu-types` is a new component crate that has public types available to Rust applications that target the Web directly. Differential Revision: https://phabricator.services.mozilla.com/D67013 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/ea8f9dbcce019820b8871ef311534153ad4ff177
…PU process Previously, we kept the object IDs managed on content side only. The GPU side would work with given indices. When an object is destroyed, we'd free the ID on the content side and signal the GPU to delete the object. Problem is that on the GPU process the object may still be kept alive for as long as any dependants are alive. What this change is doing - hooking up the callbacks to the *actual* freeing of IDs on the GPU side. These callbacks end up in messages from WebGPUParent to WebGPUChild, and only then the IDs are freed on the content side and able to be reused. Differential Revision: https://phabricator.services.mozilla.com/D67211 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/fe3ae0a74c000139f9b4a5911efa00189a9702e2
This change adds support for CanvasContext presenting WebGPU via CPU readback. The presentation is handled mostly on GPU process side by managing a list of staging buffers and copying the contents into a WR external image (backed by an external buffer). Differential Revision: https://phabricator.services.mozilla.com/D68032 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/377a757c583d786255102a76f90813535f93f7f2
This change adds support for CanvasContext presenting WebGPU via CPU readback. The presentation is handled mostly on GPU process side by managing a list of staging buffers and copying the contents into a WR external image (backed by an external buffer). Differential Revision: https://phabricator.services.mozilla.com/D68032 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/bc6b2b003c6e741ff56f7b2c31c16b196b0f3dd0
…tages on CanvasRenderingContextHelper.cpp. [ghsync] From https://hg.mozilla.org/mozilla-central/rev/c5ea46a5f95c2f71f0da551d77b96b1068076852
This change adds support for CanvasContext presenting WebGPU via CPU readback. The presentation is handled mostly on GPU process side by managing a list of staging buffers and copying the contents into a WR external image (backed by an external buffer). Differential Revision: https://phabricator.services.mozilla.com/D68032 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/671618e0293cc7b2127f076f947a614f64768aa6
…in ServoStyleConsts.h CLOSED TREE [ghsync] From https://hg.mozilla.org/mozilla-central/rev/b21b9142dcbf850c201002672ab5cd24b2a4701e
The updated wgpu has the coordinate space fixes. Depends on - https://phabricator.services.mozilla.com/D70421 - https://phabricator.services.mozilla.com/D70432 - https://phabricator.services.mozilla.com/D70646 Differential Revision: https://phabricator.services.mozilla.com/D70140 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/bdefa164d83d5f297483f8b2cf337324d286ccdd
uses the default config with rustfmt-stable Differential Revision: https://phabricator.services.mozilla.com/D70698 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/05790c733415009b87fd4c812795e3162d9c2279
it was a bogus warning that erroneously fire when Gecko flushed mapped contents Differential Revision: https://phabricator.services.mozilla.com/D70789 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/46e90ea13e93e12a2b941f2c31054abe04d4bf9b
it wasn't matching webgpu-native or the WebIDL Differential Revision: https://phabricator.services.mozilla.com/D70942 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/7c7c220d19f1cd1e9f9dcbcf7604039fee2db475
We need to access the contents of pipeline layouts on CPU when we are recording commands. This PR adds refcounting to them and improves the destruction code path to happen once all references are gone. Differential Revision: https://phabricator.services.mozilla.com/D70868 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/5fdba2915ccf63e82198539563a0056275c3db5b
…gfx/wgpu_bindings r=jgilbert Differential Revision: https://phabricator.services.mozilla.com/D71699 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/a6ce2cb68e20c2bcb493502935aa062f75940a29
Author
|
bors r=auto |
Contributor
|
🔒 Permission denied Existing reviewers: click here to make moz-gfx a reviewer |
| resource, Epoch, FastHashMap, Index, RefCount, | ||
| }; | ||
|
|
||
| use std::{ |
Contributor
There was a problem hiding this comment.
Suggested change
| use std::{ | |
| use std::{borrow::Borrow, collections::hash_map::Entry, fmt, marker::PhantomData, ops, vec::Drain}; |
This comment was generated by: rustfmt
| marker::PhantomData, | ||
| ops, | ||
| vec::Drain, | ||
| borrow::Borrow, collections::hash_map::Entry, fmt, marker::PhantomData, ops, vec::Drain, |
Contributor
There was a problem hiding this comment.
Suggested change
| borrow::Borrow, collections::hash_map::Entry, fmt, marker::PhantomData, ops, vec::Drain, |
This comment was generated by: rustfmt
| ops, | ||
| vec::Drain, | ||
| borrow::Borrow, collections::hash_map::Entry, fmt, marker::PhantomData, ops, vec::Drain, | ||
| }; |
Contributor
There was a problem hiding this comment.
Suggested change
| }; |
This comment was generated by: rustfmt
| #define WGPU_h | ||
|
|
||
| // Prelude of types necessary before including wgpu_ffi_generated.h | ||
| namespace mozilla { |
Contributor
There was a problem hiding this comment.
Suggested change
| namespace mozilla { | |
| namespace mozilla; { |
This comment was generated by: ClangTidy
kvark
added a commit
to kvark/wgpu
that referenced
this pull request
Jun 3, 2021
606: Enable GL backend r=kvark a=kvark Replaces gfx-rs#182 Depends on gfx-rs#907 Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.