mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Implement GPUComputePassEncoder functions
Implement the `dispatch`, `endPass`, `setBindGroup`, `setPipeline` functions of `GPUComputePassEncoder`.
This commit is contained in:
parent
5597ccf57d
commit
170e9971ac
10 changed files with 109 additions and 83 deletions
|
@ -5,11 +5,13 @@
|
|||
// https://gpuweb.github.io/gpuweb/#gpucomputepassencoder
|
||||
[Exposed=(Window, DedicatedWorker), Serializable, Pref="dom.webgpu.enabled"]
|
||||
interface GPUComputePassEncoder {
|
||||
// void setPipeline(GPUComputePipeline pipeline);
|
||||
// void dispatch(unsigned long x, optional unsigned long y = 1, optional unsigned long z = 1);
|
||||
void setPipeline(GPUComputePipeline pipeline);
|
||||
void dispatch(GPUSize32 x, optional GPUSize32 y = 1, optional GPUSize32 z = 1);
|
||||
// void dispatchIndirect(GPUBuffer indirectBuffer, GPUBufferSize indirectOffset);
|
||||
|
||||
// void endPass();
|
||||
void endPass();
|
||||
};
|
||||
GPUComputePassEncoder includes GPUObjectBase;
|
||||
GPUComputePassEncoder includes GPUProgrammablePassEncoder;
|
||||
|
||||
typedef [EnforceRange] unsigned long GPUSize32;
|
||||
|
|
|
@ -5,15 +5,18 @@
|
|||
// https://gpuweb.github.io/gpuweb/#gpuprogrammablepassencoder
|
||||
[Exposed=(Window, DedicatedWorker)]
|
||||
interface mixin GPUProgrammablePassEncoder {
|
||||
// void setBindGroup(unsigned long index, GPUBindGroup bindGroup,
|
||||
// optional sequence<unsigned long> dynamicOffsets = []);
|
||||
void setBindGroup(GPUIndex32 index, GPUBindGroup bindGroup,
|
||||
optional sequence<GPUBufferDynamicOffset> dynamicOffsets = []);
|
||||
|
||||
// void setBindGroup(unsigned long index, GPUBindGroup bindGroup,
|
||||
// void setBindGroup(GPUIndex32 index, GPUBindGroup bindGroup,
|
||||
// Uint32Array dynamicOffsetsData,
|
||||
// unsigned long long dynamicOffsetsDataStart,
|
||||
// unsigned long long dynamicOffsetsDataLength);
|
||||
// GPUSize64 dynamicOffsetsDataStart,
|
||||
// GPUSize64 dynamicOffsetsDataLength);
|
||||
|
||||
// void pushDebugGroup(DOMString groupLabel);
|
||||
// void popDebugGroup();
|
||||
// void insertDebugMarker(DOMString markerLabel);
|
||||
};
|
||||
|
||||
typedef [EnforceRange] unsigned long GPUBufferDynamicOffset;
|
||||
typedef [EnforceRange] unsigned long GPUIndex32;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue