mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Upgrade whole webgpu stack (#29795)
* Allow noidl files in script/dom/webidls * Upgrade wgpu to 0.16 and refresh whole webgpu implementation * Update WebGPU test expectations * misc * MutNullableDom -> DomRefCell<Option<Dom for GPUTexture * Direct use of GPUTextureDescriptor * Remove config from GPUCanvasContext * misc * finally blue color * gpubuffer "handle" error * GPU object have non-null label * gpu limits and info * use buffer_size * fix warnings * Cleanup * device destroy * fallback adapter * mach update-webgpu write webgpu commit hash in file * Mising deps in CI for webgpu tests * Updated expectations * Fixups * early reject * DomRefCell<Option<Dom -> MutNullableDom for GPUTexture
This commit is contained in:
parent
fed3491f23
commit
71e0372ac1
96 changed files with 15612 additions and 4023 deletions
|
@ -269,9 +269,8 @@ impl HTMLCanvasElement {
|
|||
.script_to_constellation_chan()
|
||||
.send(ScriptMsg::GetWebGPUChan(sender));
|
||||
let window = window_from_node(self);
|
||||
let size = self.get_size();
|
||||
let channel = receiver.recv().expect("Failed to get WebGPU channel");
|
||||
let context = GPUCanvasContext::new(window.upcast::<GlobalScope>(), self, size, channel);
|
||||
let context = GPUCanvasContext::new(window.upcast::<GlobalScope>(), self, channel);
|
||||
*self.context.borrow_mut() = Some(CanvasContext::WebGPU(Dom::from_ref(&*context)));
|
||||
Some(context)
|
||||
}
|
||||
|
@ -374,7 +373,7 @@ impl HTMLCanvasElementMethods for HTMLCanvasElement {
|
|||
"webgl2" | "experimental-webgl2" => self
|
||||
.get_or_init_webgl2_context(cx, options)
|
||||
.map(RenderingContext::WebGL2RenderingContext),
|
||||
"gpupresent" => self
|
||||
"webgpu" => self
|
||||
.get_or_init_webgpu_context()
|
||||
.map(RenderingContext::GPUCanvasContext),
|
||||
_ => None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue