mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Initial implementation of GPUCommandEncoder
Added WebIDL bindings for `GPUCommandEncoder`, `GPUCommandBuffer`, `GPUComputePassEncoder`, `GPUProgrammablePassEncoder`. Implemented the `beginComputePass`, `copyBufferToBuffer` and `finish` functions of `GPUCommandEncoder`. Implemented the `createCommandEncoder` function of `GPUDevice`.
This commit is contained in:
parent
9031369c19
commit
4facd3d4d2
14 changed files with 443 additions and 13 deletions
|
@ -99,8 +99,8 @@ use time::{get_time, Timespec};
|
|||
use uuid::Uuid;
|
||||
use webgpu::wgpu::{
|
||||
id::{
|
||||
AdapterId, BindGroupId, BindGroupLayoutId, BufferId, ComputePipelineId, DeviceId,
|
||||
PipelineLayoutId, ShaderModuleId,
|
||||
AdapterId, BindGroupId, BindGroupLayoutId, BufferId, CommandEncoderId, ComputePipelineId,
|
||||
DeviceId, PipelineLayoutId, ShaderModuleId,
|
||||
},
|
||||
Backend,
|
||||
};
|
||||
|
@ -2137,11 +2137,18 @@ impl GlobalScope {
|
|||
.borrow_mut()
|
||||
.create_shader_module_id(backend)
|
||||
}
|
||||
|
||||
pub fn wgpu_create_compute_pipeline_id(&self, backend: Backend) -> ComputePipelineId {
|
||||
self.gpu_id_hub
|
||||
.borrow_mut()
|
||||
.create_compute_pipeline_id(backend)
|
||||
}
|
||||
|
||||
pub fn wgpu_create_command_encoder_id(&self, backend: Backend) -> CommandEncoderId {
|
||||
self.gpu_id_hub
|
||||
.borrow_mut()
|
||||
.create_command_encoder_id(backend)
|
||||
}
|
||||
}
|
||||
|
||||
fn timestamp_in_ms(time: Timespec) -> u64 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue