mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Implement GPURenderPassEncoder
Add webidls for GPURenderPassEncoder and GPURenderEncoderBase and implement relevant methods.
This commit is contained in:
parent
e452570be0
commit
1d4efb48ba
11 changed files with 524 additions and 35 deletions
|
@ -5,7 +5,7 @@
|
|||
// https://gpuweb.github.io/gpuweb/#gpucommandencoder
|
||||
[Exposed=(Window, DedicatedWorker), Serializable, Pref="dom.webgpu.enabled"]
|
||||
interface GPUCommandEncoder {
|
||||
// GPURenderPassEncoder beginRenderPass(GPURenderPassDescriptor descriptor);
|
||||
GPURenderPassEncoder beginRenderPass(GPURenderPassDescriptor descriptor);
|
||||
GPUComputePassEncoder beginComputePass(optional GPUComputePassDescriptor descriptor = {});
|
||||
|
||||
void copyBufferToBuffer(
|
||||
|
@ -43,3 +43,48 @@ dictionary GPUComputePassDescriptor : GPUObjectDescriptorBase {
|
|||
|
||||
dictionary GPUCommandBufferDescriptor : GPUObjectDescriptorBase {
|
||||
};
|
||||
|
||||
dictionary GPURenderPassDescriptor : GPUObjectDescriptorBase {
|
||||
required sequence<GPURenderPassColorAttachmentDescriptor> colorAttachments;
|
||||
GPURenderPassDepthStencilAttachmentDescriptor depthStencilAttachment;
|
||||
//GPUQuerySet occlusionQuerySet;
|
||||
};
|
||||
|
||||
dictionary GPURenderPassColorAttachmentDescriptor {
|
||||
required GPUTextureView attachment;
|
||||
GPUTextureView resolveTarget;
|
||||
|
||||
required (GPULoadOp or GPUColor) loadValue;
|
||||
GPUStoreOp storeOp = "store";
|
||||
};
|
||||
|
||||
dictionary GPURenderPassDepthStencilAttachmentDescriptor {
|
||||
required GPUTextureView attachment;
|
||||
|
||||
required (GPULoadOp or float) depthLoadValue;
|
||||
required GPUStoreOp depthStoreOp;
|
||||
boolean depthReadOnly = false;
|
||||
|
||||
required GPUStencilLoadValue stencilLoadValue;
|
||||
required GPUStoreOp stencilStoreOp;
|
||||
boolean stencilReadOnly = false;
|
||||
};
|
||||
|
||||
typedef (GPULoadOp or GPUStencilValue) GPUStencilLoadValue;
|
||||
|
||||
enum GPULoadOp {
|
||||
"load"
|
||||
};
|
||||
|
||||
enum GPUStoreOp {
|
||||
"store",
|
||||
"clear"
|
||||
};
|
||||
|
||||
dictionary GPUColorDict {
|
||||
required double r;
|
||||
required double g;
|
||||
required double b;
|
||||
required double a;
|
||||
};
|
||||
typedef (sequence<double> or GPUColorDict) GPUColor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue