mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +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,7 +3,6 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom_struct::dom_struct;
|
||||
use webgpu::wgt;
|
||||
use webgpu_traits::{RenderCommand, WebGPU, WebGPURenderPass, WebGPURequest};
|
||||
|
||||
use crate::conversions::TryConvert;
|
||||
|
@ -171,11 +170,11 @@ impl GPURenderPassEncoderMethods<crate::DomTypeHolder> for GPURenderPassEncoder
|
|||
self.send_render_command(RenderCommand::SetIndexBuffer {
|
||||
buffer_id: buffer.id().0,
|
||||
index_format: match index_format {
|
||||
GPUIndexFormat::Uint16 => wgt::IndexFormat::Uint16,
|
||||
GPUIndexFormat::Uint32 => wgt::IndexFormat::Uint32,
|
||||
GPUIndexFormat::Uint16 => wgpu_types::IndexFormat::Uint16,
|
||||
GPUIndexFormat::Uint32 => wgpu_types::IndexFormat::Uint32,
|
||||
},
|
||||
offset,
|
||||
size: wgt::BufferSize::new(size),
|
||||
size: wgpu_types::BufferSize::new(size),
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -185,7 +184,7 @@ impl GPURenderPassEncoderMethods<crate::DomTypeHolder> for GPURenderPassEncoder
|
|||
slot,
|
||||
buffer_id: buffer.id().0,
|
||||
offset,
|
||||
size: wgt::BufferSize::new(size),
|
||||
size: wgpu_types::BufferSize::new(size),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue