From d29861b0da58ffd3d76534e482a91f0169ea9b8b Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Wed, 24 Oct 2018 21:13:59 -0400 Subject: [PATCH] Pass attachments state by value --- design/sketch.webidl | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/design/sketch.webidl b/design/sketch.webidl index 0ad4a02cc7..b0641e2f78 100644 --- a/design/sketch.webidl +++ b/design/sketch.webidl @@ -402,13 +402,20 @@ dictionary WebGPUShaderModuleDescriptor { interface WebGPUShaderModule { }; -// Description of the framebuffer attachments -dictionary WebGPUAttachmentsStateDescriptor { - sequence formats; - // TODO other stuff like sample count etc. +// Description of a single attachment +dictionary WebGPUAttachment { + // Attachment data format + WebGPUTextureFormatEnum format; + // Number of MSAA samples + u32 samples; }; -interface WebGPUAttachmentsState { +// Description of the framebuffer attachments +dictionary WebGPUAttachmentsState { + // Array of color attachments + sequence colorAttachments; + // Optional depth/stencil attachment + WebGPUAttachment? depthStencilAttachment; }; // Common stuff for ComputePipeline and RenderPipeline @@ -431,7 +438,7 @@ dictionary WebGPUPipelineDescriptorBase { sequence stages; }; -// ComputePipeline +// WebGPUComputePipeline dictionary WebGPUComputePipelineDescriptor : WebGPUPipelineDescriptorBase { }; @@ -642,7 +649,6 @@ interface WebGPUDevice { WebGPUDepthStencilState createDepthStencilState(WebGPUDepthStencilStateDescriptor descriptor); WebGPUInputState createInputState(WebGPUInputStateDescriptor descriptor); WebGPUShaderModule createShaderModule(WebGPUShaderModuleDescriptor descriptor); - WebGPUAttachmentsState createAttachmentsState(WebGPUAttachmentsStateDescriptor descriptor); WebGPUComputePipeline createComputePipeline(WebGPUComputePipelineDescriptor descriptor); WebGPURenderPipeline createRenderPipeline(WebGPURenderPipelineDescriptor descriptor);