diff --git a/README.md b/README.md index 43e6901..ebd919e 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,7 @@ Most or all of these should be fixed in the generator over time. - `Array` changed to `Iterable` for WebIDL `sequence`s in argument positions (but not in return positions). - `any` changed to `object` for WebIDL `object`. - `| SharedArrayBuffer` added for `[AllowShared] BufferSource`. +- `| null` changed to `| null | undefined` for WebIDL nullable items (`T?`). The following differences are TODO: should be changed in the final result. diff --git a/dist/index.d.ts b/dist/index.d.ts index 7530f67..93d113b 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -655,6 +655,7 @@ interface GPUCanvasConfiguration { /** * The tone mapping determines how the content of textures returned by * {@link GPUCanvasContext#getCurrentTexture} are to be displayed. + * Note: If an implementation doesn't support HDR WebGPU canvases, it should also not expose this member, to allow for feature detection. See {@link GPUCanvasContext#getConfiguration}. */ toneMapping?: GPUCanvasToneMapping; /** @@ -927,7 +928,11 @@ interface GPUFragmentState * A list of {@link GPUColorTargetState} defining the formats and behaviors of the color targets * this pipeline writes to. */ - targets: Iterable; + targets: Iterable< + | GPUColorTargetState + | null + | undefined + >; } interface GPUMultisampleState { @@ -991,7 +996,11 @@ interface GPUPipelineLayoutDescriptor * to a @group attribute in the {@link GPUShaderModule}, with the `N`th element corresponding * with `@group(N)`. */ - bindGroupLayouts: Iterable; + bindGroupLayouts: Iterable< + | GPUBindGroupLayout + | null + | undefined + >; } interface GPUPrimitiveState { @@ -1202,7 +1211,11 @@ interface GPURenderPassDescriptor * Due to compatible usage list|usage compatibility, no color attachment * may alias another attachment or any resource used inside the render pass. */ - colorAttachments: Iterable; + colorAttachments: Iterable< + | GPURenderPassColorAttachment + | null + | undefined + >; /** * The {@link GPURenderPassDepthStencilAttachment} value that defines the depth/stencil * attachment that will be output to and tested against when executing this render pass. @@ -1231,7 +1244,11 @@ interface GPURenderPassLayout /** * A list of the {@link GPUTextureFormat}s of the color attachments for this pass or bundle. */ - colorFormats: Iterable; + colorFormats: Iterable< + | GPUTextureFormat + | null + | undefined + >; /** * The {@link GPUTextureFormat} of the depth/stencil attachment for this pass or bundle. */ @@ -1329,6 +1346,7 @@ interface GPURequestAdapterOptions { * attribute prior to requesting a {@link GPUDevice}. */ forceFallbackAdapter?: boolean; + xrCompatible?: boolean; } interface GPUSamplerBindingLayout { @@ -1690,7 +1708,11 @@ interface GPUVertexState * A list of {@link GPUVertexBufferLayout}s, each defining the layout of vertex attribute data in a * vertex buffer used by this pipeline. */ - buffers?: Iterable; + buffers?: Iterable< + | GPUVertexBufferLayout + | null + | undefined + >; } interface GPUBindingCommandsMixin { @@ -1708,7 +1730,10 @@ interface GPUBindingCommandsMixin { */ setBindGroup( index: GPUIndex32, - bindGroup: GPUBindGroup | null, + bindGroup: + | GPUBindGroup + | null + | undefined, dynamicOffsets?: Iterable ): undefined; /** @@ -1724,7 +1749,10 @@ interface GPUBindingCommandsMixin { */ setBindGroup( index: GPUIndex32, - bindGroup: GPUBindGroup | null, + bindGroup: + | GPUBindGroup + | null + | undefined, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32 @@ -1802,7 +1830,10 @@ interface GPURenderCommandsMixin { */ setVertexBuffer( slot: GPUIndex32, - buffer: GPUBuffer | null, + buffer: + | GPUBuffer + | null + | undefined, offset?: GPUSize64, size?: GPUSize64 ): undefined; diff --git a/generated/index.d.ts b/generated/index.d.ts index 4689b0f..af8f520 100644 --- a/generated/index.d.ts +++ b/generated/index.d.ts @@ -601,6 +601,7 @@ interface GPUCanvasConfiguration { /** * The tone mapping determines how the content of textures returned by * {@link GPUCanvasContext#getCurrentTexture} are to be displayed. + * Note: If an implementation doesn't support HDR WebGPU canvases, it should also not expose this member, to allow for feature detection. See {@link GPUCanvasContext#getConfiguration}. */ toneMapping?: GPUCanvasToneMapping; /** @@ -1274,6 +1275,7 @@ interface GPURequestAdapterOptions { featureLevel?: string; powerPreference?: GPUPowerPreference; forceFallbackAdapter?: boolean; + xrCompatible?: boolean; } interface GPUSamplerBindingLayout { diff --git a/gpuweb b/gpuweb index 8e44e1b..a87657b 160000 --- a/gpuweb +++ b/gpuweb @@ -1 +1 @@ -Subproject commit 8e44e1b7d733ed56b6bf4f3797bd43450f6fe6e5 +Subproject commit a87657b2115925db17c43486d1fb37856b56c2cc