mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add pseudo async Create*PipelineAsync methods (#31695)
* Create fake CreatePipelineAsync * Update WebGPU CTS * Update expectations and disable some webgpu tests
This commit is contained in:
parent
228f4fb2fc
commit
c25069161d
167 changed files with 121466 additions and 53445 deletions
|
@ -161,7 +161,7 @@ DOMInterfaces = {
|
|||
},
|
||||
|
||||
'GPUDevice': {
|
||||
'inRealms': ['PopErrorScope', 'GetLost'],
|
||||
'inRealms': ['PopErrorScope', 'GetLost', 'CreateComputePipelineAsync', 'CreateRenderPipelineAsync'],
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -737,7 +737,18 @@ impl GPUDeviceMethods for GPUDevice {
|
|||
)
|
||||
}
|
||||
|
||||
/// <https://gpuweb.github.io/gpuweb/#dom-gpudevice-createcommandencoder>
|
||||
/// <https://gpuweb.github.io/gpuweb/#dom-gpudevice-createcomputepipelineasync>
|
||||
fn CreateComputePipelineAsync(
|
||||
&self,
|
||||
descriptor: &GPUComputePipelineDescriptor,
|
||||
comp: InRealm,
|
||||
) -> Rc<Promise> {
|
||||
let promise = Promise::new_in_current_realm(comp);
|
||||
promise.resolve_native(&self.CreateComputePipeline(descriptor));
|
||||
promise
|
||||
}
|
||||
|
||||
/// https://gpuweb.github.io/gpuweb/#dom-gpudevice-createcommandencoder
|
||||
fn CreateCommandEncoder(
|
||||
&self,
|
||||
descriptor: &GPUCommandEncoderDescriptor,
|
||||
|
@ -1040,6 +1051,17 @@ impl GPUDeviceMethods for GPUDevice {
|
|||
)
|
||||
}
|
||||
|
||||
/// <https://gpuweb.github.io/gpuweb/#dom-gpudevice-createrenderpipelineasync>
|
||||
fn CreateRenderPipelineAsync(
|
||||
&self,
|
||||
descriptor: &GPURenderPipelineDescriptor,
|
||||
comp: InRealm,
|
||||
) -> Rc<Promise> {
|
||||
let promise = Promise::new_in_current_realm(comp);
|
||||
promise.resolve_native(&self.CreateRenderPipeline(descriptor));
|
||||
promise
|
||||
}
|
||||
|
||||
/// <https://gpuweb.github.io/gpuweb/#dom-gpudevice-createrenderbundleencoder>
|
||||
fn CreateRenderBundleEncoder(
|
||||
&self,
|
||||
|
@ -1148,19 +1170,6 @@ impl GPUDeviceMethods for GPUDevice {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <https://gpuweb.github.io/gpuweb/#dom-gpudevice-createcomputepipelineasync>
|
||||
fn CreateComputePipelineAsync(
|
||||
&self,
|
||||
_descriptor: &GPUComputePipelineDescriptor,
|
||||
) -> Rc<Promise> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// <https://gpuweb.github.io/gpuweb/#dom-gpudevice-createrenderpipelineasync>
|
||||
fn CreateRenderPipelineAsync(&self, _descriptor: &GPURenderPipelineDescriptor) -> Rc<Promise> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for GPUDevice {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue