mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
script: Remove dependency on webgpu
(#36332)
After #36320, `script` only depends on `webgpu` for its type aliases to `wgpu_core` and `wgpu_types`. This change removes the dependency on `webgpu` in favor of depending directly on the upstream crates. This makes it so that you can change `webgpu` without recompiling `script`. Testing: This change is covered by existing WebGPU tests and is mainly just changing the way dependencies are accessed. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
1f928252e3
commit
49d48b897a
24 changed files with 354 additions and 348 deletions
|
@ -3,12 +3,11 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom_struct::dom_struct;
|
||||
use webgpu::wgc::command as wgpu_com;
|
||||
use webgpu::wgt;
|
||||
use webgpu_traits::{
|
||||
WebGPU, WebGPUCommandBuffer, WebGPUCommandEncoder, WebGPUComputePass, WebGPUDevice,
|
||||
WebGPURenderPass, WebGPURequest,
|
||||
};
|
||||
use wgpu_core::command as wgpu_com;
|
||||
|
||||
use crate::conversions::{Convert, TryConvert};
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
|
@ -98,7 +97,7 @@ impl GPUCommandEncoder {
|
|||
.send(WebGPURequest::CreateCommandEncoder {
|
||||
device_id: device.id().0,
|
||||
command_encoder_id,
|
||||
desc: wgt::CommandEncoderDescriptor {
|
||||
desc: wgpu_types::CommandEncoderDescriptor {
|
||||
label: (&descriptor.parent).convert(),
|
||||
},
|
||||
})
|
||||
|
@ -313,7 +312,7 @@ impl GPUCommandEncoderMethods<crate::DomTypeHolder> for GPUCommandEncoder {
|
|||
.send(WebGPURequest::CommandEncoderFinish {
|
||||
command_encoder_id: self.encoder.0,
|
||||
device_id: self.device.id().0,
|
||||
desc: wgt::CommandBufferDescriptor {
|
||||
desc: wgpu_types::CommandBufferDescriptor {
|
||||
label: (&descriptor.parent).convert(),
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue