From 03252ade094508ae0c2c1a345544d5e3a563d2a5 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sat, 14 Feb 2026 19:48:23 +0100 Subject: [PATCH] Add GPUDevice.createRenderPipeline[Async] --- baselines/dom.generated.d.ts | 102 +++++++++++++++++++ baselines/serviceworker.generated.d.ts | 102 +++++++++++++++++++ baselines/sharedworker.generated.d.ts | 102 +++++++++++++++++++ baselines/ts5.5/dom.generated.d.ts | 102 +++++++++++++++++++ baselines/ts5.5/serviceworker.generated.d.ts | 102 +++++++++++++++++++ baselines/ts5.5/sharedworker.generated.d.ts | 102 +++++++++++++++++++ baselines/ts5.5/webworker.generated.d.ts | 102 +++++++++++++++++++ baselines/ts5.6/dom.generated.d.ts | 102 +++++++++++++++++++ baselines/ts5.6/serviceworker.generated.d.ts | 102 +++++++++++++++++++ baselines/ts5.6/sharedworker.generated.d.ts | 102 +++++++++++++++++++ baselines/ts5.6/webworker.generated.d.ts | 102 +++++++++++++++++++ baselines/ts5.9/dom.generated.d.ts | 102 +++++++++++++++++++ baselines/ts5.9/serviceworker.generated.d.ts | 102 +++++++++++++++++++ baselines/ts5.9/sharedworker.generated.d.ts | 102 +++++++++++++++++++ baselines/ts5.9/webworker.generated.d.ts | 102 +++++++++++++++++++ baselines/webworker.generated.d.ts | 102 +++++++++++++++++++ inputfiles/overridingTypes.jsonc | 2 - inputfiles/patches/webgpu.kdl | 13 --- 18 files changed, 1632 insertions(+), 15 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 272b3654a..dfaf26be5 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -815,6 +815,17 @@ interface GPUBindGroupEntry { resource: GPUBindingResource; } +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + interface GPUBufferBinding { buffer: GPUBuffer; offset?: GPUSize64; @@ -848,6 +859,12 @@ interface GPUColorDict { r: number; } +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { } @@ -879,6 +896,19 @@ interface GPUCopyExternalImageSourceInfo { source: GPUCopyExternalImageSource; } +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + interface GPUExtent3DDict { depthOrArrayLayers?: GPUIntegerCoordinate; height?: GPUIntegerCoordinate; @@ -890,6 +920,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { source: HTMLVideoElement | VideoFrame; } +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + interface GPUObjectDescriptorBase { label?: string; } @@ -917,6 +957,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { bindGroupLayouts: (GPUBindGroupLayout | null)[]; } +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + interface GPUProgrammableStage { constants?: Record; entryPoint?: string; @@ -977,6 +1025,14 @@ interface GPURenderPassTimestampWrites { querySet: GPUQuerySet; } +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { addressModeU?: GPUAddressMode; addressModeV?: GPUAddressMode; @@ -994,6 +1050,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { code: string; } +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { buffer: GPUBuffer; } @@ -1036,6 +1099,22 @@ interface GPUUncapturedErrorEventInit extends EventInit { error: GPUError; } +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GainOptions extends AudioNodeOptions { gain?: number; } @@ -15457,6 +15536,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** + * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) + */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** + * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) + */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; /** * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data. * @@ -43919,7 +44010,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | type GPUBufferDynamicOffset = number; type GPUBufferUsageFlags = number; type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; type GPUCopyExternalImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas; +type GPUDepthBias = number; type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; type GPUFlagsConstant = number; type GPUIndex32 = number; @@ -43929,6 +44022,7 @@ type GPUMapModeFlags = number; type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; type GPUPipelineConstantValue = number; +type GPUSampleMask = number; type GPUSignedOffset32 = number; type GPUSize32 = number; type GPUSize32Out = number; @@ -44044,24 +44138,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading"; type FullscreenNavigationUI = "auto" | "hide" | "show"; type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; type GPUAutoLayoutMode = "auto"; +type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCanvasAlphaMode = "opaque" | "premultiplied"; type GPUCanvasToneMappingMode = "extended" | "standard"; type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; type GPUStoreOp = "discard" | "store"; type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; type GPUTextureDimension = "1d" | "2d" | "3d"; type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8"; type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra"; +type GPUVertexStepMode = "instance" | "vertex"; type GamepadHapticEffectType = "dual-rumble" | "trigger-rumble"; type GamepadHapticsResult = "complete" | "preempted"; type GamepadMappingType = "" | "standard" | "xr-standard"; diff --git a/baselines/serviceworker.generated.d.ts b/baselines/serviceworker.generated.d.ts index 2feebcc83..12465501d 100644 --- a/baselines/serviceworker.generated.d.ts +++ b/baselines/serviceworker.generated.d.ts @@ -282,6 +282,17 @@ interface GPUBindGroupEntry { resource: GPUBindingResource; } +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + interface GPUBufferBinding { buffer: GPUBuffer; offset?: GPUSize64; @@ -315,6 +326,12 @@ interface GPUColorDict { r: number; } +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { } @@ -346,6 +363,19 @@ interface GPUCopyExternalImageSourceInfo { source: GPUCopyExternalImageSource; } +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + interface GPUExtent3DDict { depthOrArrayLayers?: GPUIntegerCoordinate; height?: GPUIntegerCoordinate; @@ -356,6 +386,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { colorSpace?: PredefinedColorSpace; } +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + interface GPUObjectDescriptorBase { label?: string; } @@ -383,6 +423,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { bindGroupLayouts: (GPUBindGroupLayout | null)[]; } +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + interface GPUProgrammableStage { constants?: Record; entryPoint?: string; @@ -443,6 +491,14 @@ interface GPURenderPassTimestampWrites { querySet: GPUQuerySet; } +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { addressModeU?: GPUAddressMode; addressModeV?: GPUAddressMode; @@ -460,6 +516,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { code: string; } +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { buffer: GPUBuffer; } @@ -502,6 +565,22 @@ interface GPUUncapturedErrorEventInit extends EventInit { error: GPUError; } +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GetNotificationOptions { tag?: string; } @@ -4899,6 +4978,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** + * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) + */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** + * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) + */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; /** * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data. * @@ -13109,7 +13200,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | type GPUBufferDynamicOffset = number; type GPUBufferUsageFlags = number; type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas; +type GPUDepthBias = number; type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; type GPUFlagsConstant = number; type GPUIndex32 = number; @@ -13119,6 +13212,7 @@ type GPUMapModeFlags = number; type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; type GPUPipelineConstantValue = number; +type GPUSampleMask = number; type GPUSignedOffset32 = number; type GPUSize32 = number; type GPUSize32Out = number; @@ -13176,24 +13270,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; type GPUAutoLayoutMode = "auto"; +type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCanvasAlphaMode = "opaque" | "premultiplied"; type GPUCanvasToneMappingMode = "extended" | "standard"; type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; type GPUStoreOp = "discard" | "store"; type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; type GPUTextureDimension = "1d" | "2d" | "3d"; type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8"; type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra"; +type GPUVertexStepMode = "instance" | "vertex"; type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; diff --git a/baselines/sharedworker.generated.d.ts b/baselines/sharedworker.generated.d.ts index 5c6405673..7b4f59c07 100644 --- a/baselines/sharedworker.generated.d.ts +++ b/baselines/sharedworker.generated.d.ts @@ -226,6 +226,17 @@ interface GPUBindGroupEntry { resource: GPUBindingResource; } +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + interface GPUBufferBinding { buffer: GPUBuffer; offset?: GPUSize64; @@ -259,6 +270,12 @@ interface GPUColorDict { r: number; } +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { } @@ -290,6 +307,19 @@ interface GPUCopyExternalImageSourceInfo { source: GPUCopyExternalImageSource; } +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + interface GPUExtent3DDict { depthOrArrayLayers?: GPUIntegerCoordinate; height?: GPUIntegerCoordinate; @@ -300,6 +330,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { colorSpace?: PredefinedColorSpace; } +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + interface GPUObjectDescriptorBase { label?: string; } @@ -327,6 +367,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { bindGroupLayouts: (GPUBindGroupLayout | null)[]; } +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + interface GPUProgrammableStage { constants?: Record; entryPoint?: string; @@ -387,6 +435,14 @@ interface GPURenderPassTimestampWrites { querySet: GPUQuerySet; } +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { addressModeU?: GPUAddressMode; addressModeV?: GPUAddressMode; @@ -404,6 +460,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { code: string; } +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { buffer: GPUBuffer; } @@ -446,6 +509,22 @@ interface GPUUncapturedErrorEventInit extends EventInit { error: GPUError; } +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GetNotificationOptions { tag?: string; } @@ -4582,6 +4661,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** + * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) + */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** + * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) + */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; /** * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data. * @@ -12785,7 +12876,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | type GPUBufferDynamicOffset = number; type GPUBufferUsageFlags = number; type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas; +type GPUDepthBias = number; type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; type GPUFlagsConstant = number; type GPUIndex32 = number; @@ -12795,6 +12888,7 @@ type GPUMapModeFlags = number; type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; type GPUPipelineConstantValue = number; +type GPUSampleMask = number; type GPUSignedOffset32 = number; type GPUSize32 = number; type GPUSize32Out = number; @@ -12848,24 +12942,32 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; type GPUAutoLayoutMode = "auto"; +type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCanvasAlphaMode = "opaque" | "premultiplied"; type GPUCanvasToneMappingMode = "extended" | "standard"; type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; type GPUStoreOp = "discard" | "store"; type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; type GPUTextureDimension = "1d" | "2d" | "3d"; type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8"; type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra"; +type GPUVertexStepMode = "instance" | "vertex"; type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; diff --git a/baselines/ts5.5/dom.generated.d.ts b/baselines/ts5.5/dom.generated.d.ts index 089479c82..1ce53a2c8 100644 --- a/baselines/ts5.5/dom.generated.d.ts +++ b/baselines/ts5.5/dom.generated.d.ts @@ -812,6 +812,17 @@ interface GPUBindGroupEntry { resource: GPUBindingResource; } +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + interface GPUBufferBinding { buffer: GPUBuffer; offset?: GPUSize64; @@ -845,6 +856,12 @@ interface GPUColorDict { r: number; } +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { } @@ -876,6 +893,19 @@ interface GPUCopyExternalImageSourceInfo { source: GPUCopyExternalImageSource; } +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + interface GPUExtent3DDict { depthOrArrayLayers?: GPUIntegerCoordinate; height?: GPUIntegerCoordinate; @@ -887,6 +917,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { source: HTMLVideoElement | VideoFrame; } +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + interface GPUObjectDescriptorBase { label?: string; } @@ -914,6 +954,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { bindGroupLayouts: (GPUBindGroupLayout | null)[]; } +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + interface GPUProgrammableStage { constants?: Record; entryPoint?: string; @@ -974,6 +1022,14 @@ interface GPURenderPassTimestampWrites { querySet: GPUQuerySet; } +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { addressModeU?: GPUAddressMode; addressModeV?: GPUAddressMode; @@ -991,6 +1047,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { code: string; } +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { buffer: GPUBuffer; } @@ -1033,6 +1096,22 @@ interface GPUUncapturedErrorEventInit extends EventInit { error: GPUError; } +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GainOptions extends AudioNodeOptions { gain?: number; } @@ -15443,6 +15522,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** + * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) + */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** + * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) + */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; /** * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data. * @@ -43893,7 +43984,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | type GPUBufferDynamicOffset = number; type GPUBufferUsageFlags = number; type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; type GPUCopyExternalImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas; +type GPUDepthBias = number; type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; type GPUFlagsConstant = number; type GPUIndex32 = number; @@ -43903,6 +43996,7 @@ type GPUMapModeFlags = number; type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; type GPUPipelineConstantValue = number; +type GPUSampleMask = number; type GPUSignedOffset32 = number; type GPUSize32 = number; type GPUSize32Out = number; @@ -44018,24 +44112,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading"; type FullscreenNavigationUI = "auto" | "hide" | "show"; type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; type GPUAutoLayoutMode = "auto"; +type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCanvasAlphaMode = "opaque" | "premultiplied"; type GPUCanvasToneMappingMode = "extended" | "standard"; type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; type GPUStoreOp = "discard" | "store"; type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; type GPUTextureDimension = "1d" | "2d" | "3d"; type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8"; type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra"; +type GPUVertexStepMode = "instance" | "vertex"; type GamepadHapticEffectType = "dual-rumble" | "trigger-rumble"; type GamepadHapticsResult = "complete" | "preempted"; type GamepadMappingType = "" | "standard" | "xr-standard"; diff --git a/baselines/ts5.5/serviceworker.generated.d.ts b/baselines/ts5.5/serviceworker.generated.d.ts index aca95649d..bc350b781 100644 --- a/baselines/ts5.5/serviceworker.generated.d.ts +++ b/baselines/ts5.5/serviceworker.generated.d.ts @@ -279,6 +279,17 @@ interface GPUBindGroupEntry { resource: GPUBindingResource; } +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + interface GPUBufferBinding { buffer: GPUBuffer; offset?: GPUSize64; @@ -312,6 +323,12 @@ interface GPUColorDict { r: number; } +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { } @@ -343,6 +360,19 @@ interface GPUCopyExternalImageSourceInfo { source: GPUCopyExternalImageSource; } +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + interface GPUExtent3DDict { depthOrArrayLayers?: GPUIntegerCoordinate; height?: GPUIntegerCoordinate; @@ -353,6 +383,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { colorSpace?: PredefinedColorSpace; } +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + interface GPUObjectDescriptorBase { label?: string; } @@ -380,6 +420,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { bindGroupLayouts: (GPUBindGroupLayout | null)[]; } +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + interface GPUProgrammableStage { constants?: Record; entryPoint?: string; @@ -440,6 +488,14 @@ interface GPURenderPassTimestampWrites { querySet: GPUQuerySet; } +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { addressModeU?: GPUAddressMode; addressModeV?: GPUAddressMode; @@ -457,6 +513,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { code: string; } +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { buffer: GPUBuffer; } @@ -499,6 +562,22 @@ interface GPUUncapturedErrorEventInit extends EventInit { error: GPUError; } +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GetNotificationOptions { tag?: string; } @@ -4896,6 +4975,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** + * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) + */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** + * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) + */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; /** * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data. * @@ -13106,7 +13197,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | type GPUBufferDynamicOffset = number; type GPUBufferUsageFlags = number; type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas; +type GPUDepthBias = number; type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; type GPUFlagsConstant = number; type GPUIndex32 = number; @@ -13116,6 +13209,7 @@ type GPUMapModeFlags = number; type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; type GPUPipelineConstantValue = number; +type GPUSampleMask = number; type GPUSignedOffset32 = number; type GPUSize32 = number; type GPUSize32Out = number; @@ -13173,24 +13267,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; type GPUAutoLayoutMode = "auto"; +type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCanvasAlphaMode = "opaque" | "premultiplied"; type GPUCanvasToneMappingMode = "extended" | "standard"; type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; type GPUStoreOp = "discard" | "store"; type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; type GPUTextureDimension = "1d" | "2d" | "3d"; type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8"; type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra"; +type GPUVertexStepMode = "instance" | "vertex"; type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; diff --git a/baselines/ts5.5/sharedworker.generated.d.ts b/baselines/ts5.5/sharedworker.generated.d.ts index 3f69bed6b..9ee1cdd38 100644 --- a/baselines/ts5.5/sharedworker.generated.d.ts +++ b/baselines/ts5.5/sharedworker.generated.d.ts @@ -223,6 +223,17 @@ interface GPUBindGroupEntry { resource: GPUBindingResource; } +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + interface GPUBufferBinding { buffer: GPUBuffer; offset?: GPUSize64; @@ -256,6 +267,12 @@ interface GPUColorDict { r: number; } +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { } @@ -287,6 +304,19 @@ interface GPUCopyExternalImageSourceInfo { source: GPUCopyExternalImageSource; } +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + interface GPUExtent3DDict { depthOrArrayLayers?: GPUIntegerCoordinate; height?: GPUIntegerCoordinate; @@ -297,6 +327,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { colorSpace?: PredefinedColorSpace; } +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + interface GPUObjectDescriptorBase { label?: string; } @@ -324,6 +364,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { bindGroupLayouts: (GPUBindGroupLayout | null)[]; } +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + interface GPUProgrammableStage { constants?: Record; entryPoint?: string; @@ -384,6 +432,14 @@ interface GPURenderPassTimestampWrites { querySet: GPUQuerySet; } +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { addressModeU?: GPUAddressMode; addressModeV?: GPUAddressMode; @@ -401,6 +457,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { code: string; } +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { buffer: GPUBuffer; } @@ -443,6 +506,22 @@ interface GPUUncapturedErrorEventInit extends EventInit { error: GPUError; } +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GetNotificationOptions { tag?: string; } @@ -4579,6 +4658,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** + * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) + */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** + * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) + */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; /** * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data. * @@ -12782,7 +12873,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | type GPUBufferDynamicOffset = number; type GPUBufferUsageFlags = number; type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas; +type GPUDepthBias = number; type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; type GPUFlagsConstant = number; type GPUIndex32 = number; @@ -12792,6 +12885,7 @@ type GPUMapModeFlags = number; type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; type GPUPipelineConstantValue = number; +type GPUSampleMask = number; type GPUSignedOffset32 = number; type GPUSize32 = number; type GPUSize32Out = number; @@ -12845,24 +12939,32 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; type GPUAutoLayoutMode = "auto"; +type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCanvasAlphaMode = "opaque" | "premultiplied"; type GPUCanvasToneMappingMode = "extended" | "standard"; type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; type GPUStoreOp = "discard" | "store"; type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; type GPUTextureDimension = "1d" | "2d" | "3d"; type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8"; type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra"; +type GPUVertexStepMode = "instance" | "vertex"; type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; diff --git a/baselines/ts5.5/webworker.generated.d.ts b/baselines/ts5.5/webworker.generated.d.ts index a227cd3e7..f7144dfe0 100644 --- a/baselines/ts5.5/webworker.generated.d.ts +++ b/baselines/ts5.5/webworker.generated.d.ts @@ -369,6 +369,17 @@ interface GPUBindGroupEntry { resource: GPUBindingResource; } +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + interface GPUBufferBinding { buffer: GPUBuffer; offset?: GPUSize64; @@ -402,6 +413,12 @@ interface GPUColorDict { r: number; } +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { } @@ -433,6 +450,19 @@ interface GPUCopyExternalImageSourceInfo { source: GPUCopyExternalImageSource; } +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + interface GPUExtent3DDict { depthOrArrayLayers?: GPUIntegerCoordinate; height?: GPUIntegerCoordinate; @@ -444,6 +474,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { source: VideoFrame; } +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + interface GPUObjectDescriptorBase { label?: string; } @@ -471,6 +511,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { bindGroupLayouts: (GPUBindGroupLayout | null)[]; } +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + interface GPUProgrammableStage { constants?: Record; entryPoint?: string; @@ -531,6 +579,14 @@ interface GPURenderPassTimestampWrites { querySet: GPUQuerySet; } +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { addressModeU?: GPUAddressMode; addressModeV?: GPUAddressMode; @@ -548,6 +604,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { code: string; } +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { buffer: GPUBuffer; } @@ -590,6 +653,22 @@ interface GPUUncapturedErrorEventInit extends EventInit { error: GPUError; } +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GetNotificationOptions { tag?: string; } @@ -5599,6 +5678,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** + * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) + */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** + * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) + */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; /** * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data. * @@ -14784,7 +14875,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | type GPUBufferDynamicOffset = number; type GPUBufferUsageFlags = number; type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; type GPUCopyExternalImageSource = ImageBitmap | ImageData | VideoFrame | OffscreenCanvas; +type GPUDepthBias = number; type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; type GPUFlagsConstant = number; type GPUIndex32 = number; @@ -14794,6 +14887,7 @@ type GPUMapModeFlags = number; type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; type GPUPipelineConstantValue = number; +type GPUSampleMask = number; type GPUSignedOffset32 = number; type GPUSize32 = number; type GPUSize32Out = number; @@ -14860,24 +14954,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; type GPUAutoLayoutMode = "auto"; +type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCanvasAlphaMode = "opaque" | "premultiplied"; type GPUCanvasToneMappingMode = "extended" | "standard"; type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; type GPUStoreOp = "discard" | "store"; type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; type GPUTextureDimension = "1d" | "2d" | "3d"; type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8"; type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra"; +type GPUVertexStepMode = "instance" | "vertex"; type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor"; type HardwareAcceleration = "no-preference" | "prefer-hardware" | "prefer-software"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; diff --git a/baselines/ts5.6/dom.generated.d.ts b/baselines/ts5.6/dom.generated.d.ts index b07ef220e..cf928b92c 100644 --- a/baselines/ts5.6/dom.generated.d.ts +++ b/baselines/ts5.6/dom.generated.d.ts @@ -812,6 +812,17 @@ interface GPUBindGroupEntry { resource: GPUBindingResource; } +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + interface GPUBufferBinding { buffer: GPUBuffer; offset?: GPUSize64; @@ -845,6 +856,12 @@ interface GPUColorDict { r: number; } +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { } @@ -876,6 +893,19 @@ interface GPUCopyExternalImageSourceInfo { source: GPUCopyExternalImageSource; } +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + interface GPUExtent3DDict { depthOrArrayLayers?: GPUIntegerCoordinate; height?: GPUIntegerCoordinate; @@ -887,6 +917,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { source: HTMLVideoElement | VideoFrame; } +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + interface GPUObjectDescriptorBase { label?: string; } @@ -914,6 +954,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { bindGroupLayouts: (GPUBindGroupLayout | null)[]; } +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + interface GPUProgrammableStage { constants?: Record; entryPoint?: string; @@ -974,6 +1022,14 @@ interface GPURenderPassTimestampWrites { querySet: GPUQuerySet; } +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { addressModeU?: GPUAddressMode; addressModeV?: GPUAddressMode; @@ -991,6 +1047,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { code: string; } +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { buffer: GPUBuffer; } @@ -1033,6 +1096,22 @@ interface GPUUncapturedErrorEventInit extends EventInit { error: GPUError; } +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GainOptions extends AudioNodeOptions { gain?: number; } @@ -15454,6 +15533,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** + * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) + */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** + * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) + */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; /** * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data. * @@ -43916,7 +44007,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | type GPUBufferDynamicOffset = number; type GPUBufferUsageFlags = number; type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; type GPUCopyExternalImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas; +type GPUDepthBias = number; type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; type GPUFlagsConstant = number; type GPUIndex32 = number; @@ -43926,6 +44019,7 @@ type GPUMapModeFlags = number; type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; type GPUPipelineConstantValue = number; +type GPUSampleMask = number; type GPUSignedOffset32 = number; type GPUSize32 = number; type GPUSize32Out = number; @@ -44041,24 +44135,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading"; type FullscreenNavigationUI = "auto" | "hide" | "show"; type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; type GPUAutoLayoutMode = "auto"; +type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCanvasAlphaMode = "opaque" | "premultiplied"; type GPUCanvasToneMappingMode = "extended" | "standard"; type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; type GPUStoreOp = "discard" | "store"; type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; type GPUTextureDimension = "1d" | "2d" | "3d"; type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8"; type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra"; +type GPUVertexStepMode = "instance" | "vertex"; type GamepadHapticEffectType = "dual-rumble" | "trigger-rumble"; type GamepadHapticsResult = "complete" | "preempted"; type GamepadMappingType = "" | "standard" | "xr-standard"; diff --git a/baselines/ts5.6/serviceworker.generated.d.ts b/baselines/ts5.6/serviceworker.generated.d.ts index aca95649d..bc350b781 100644 --- a/baselines/ts5.6/serviceworker.generated.d.ts +++ b/baselines/ts5.6/serviceworker.generated.d.ts @@ -279,6 +279,17 @@ interface GPUBindGroupEntry { resource: GPUBindingResource; } +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + interface GPUBufferBinding { buffer: GPUBuffer; offset?: GPUSize64; @@ -312,6 +323,12 @@ interface GPUColorDict { r: number; } +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { } @@ -343,6 +360,19 @@ interface GPUCopyExternalImageSourceInfo { source: GPUCopyExternalImageSource; } +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + interface GPUExtent3DDict { depthOrArrayLayers?: GPUIntegerCoordinate; height?: GPUIntegerCoordinate; @@ -353,6 +383,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { colorSpace?: PredefinedColorSpace; } +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + interface GPUObjectDescriptorBase { label?: string; } @@ -380,6 +420,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { bindGroupLayouts: (GPUBindGroupLayout | null)[]; } +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + interface GPUProgrammableStage { constants?: Record; entryPoint?: string; @@ -440,6 +488,14 @@ interface GPURenderPassTimestampWrites { querySet: GPUQuerySet; } +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { addressModeU?: GPUAddressMode; addressModeV?: GPUAddressMode; @@ -457,6 +513,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { code: string; } +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { buffer: GPUBuffer; } @@ -499,6 +562,22 @@ interface GPUUncapturedErrorEventInit extends EventInit { error: GPUError; } +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GetNotificationOptions { tag?: string; } @@ -4896,6 +4975,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** + * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) + */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** + * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) + */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; /** * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data. * @@ -13106,7 +13197,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | type GPUBufferDynamicOffset = number; type GPUBufferUsageFlags = number; type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas; +type GPUDepthBias = number; type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; type GPUFlagsConstant = number; type GPUIndex32 = number; @@ -13116,6 +13209,7 @@ type GPUMapModeFlags = number; type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; type GPUPipelineConstantValue = number; +type GPUSampleMask = number; type GPUSignedOffset32 = number; type GPUSize32 = number; type GPUSize32Out = number; @@ -13173,24 +13267,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; type GPUAutoLayoutMode = "auto"; +type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCanvasAlphaMode = "opaque" | "premultiplied"; type GPUCanvasToneMappingMode = "extended" | "standard"; type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; type GPUStoreOp = "discard" | "store"; type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; type GPUTextureDimension = "1d" | "2d" | "3d"; type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8"; type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra"; +type GPUVertexStepMode = "instance" | "vertex"; type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; diff --git a/baselines/ts5.6/sharedworker.generated.d.ts b/baselines/ts5.6/sharedworker.generated.d.ts index 3f69bed6b..9ee1cdd38 100644 --- a/baselines/ts5.6/sharedworker.generated.d.ts +++ b/baselines/ts5.6/sharedworker.generated.d.ts @@ -223,6 +223,17 @@ interface GPUBindGroupEntry { resource: GPUBindingResource; } +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + interface GPUBufferBinding { buffer: GPUBuffer; offset?: GPUSize64; @@ -256,6 +267,12 @@ interface GPUColorDict { r: number; } +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { } @@ -287,6 +304,19 @@ interface GPUCopyExternalImageSourceInfo { source: GPUCopyExternalImageSource; } +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + interface GPUExtent3DDict { depthOrArrayLayers?: GPUIntegerCoordinate; height?: GPUIntegerCoordinate; @@ -297,6 +327,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { colorSpace?: PredefinedColorSpace; } +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + interface GPUObjectDescriptorBase { label?: string; } @@ -324,6 +364,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { bindGroupLayouts: (GPUBindGroupLayout | null)[]; } +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + interface GPUProgrammableStage { constants?: Record; entryPoint?: string; @@ -384,6 +432,14 @@ interface GPURenderPassTimestampWrites { querySet: GPUQuerySet; } +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { addressModeU?: GPUAddressMode; addressModeV?: GPUAddressMode; @@ -401,6 +457,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { code: string; } +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { buffer: GPUBuffer; } @@ -443,6 +506,22 @@ interface GPUUncapturedErrorEventInit extends EventInit { error: GPUError; } +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GetNotificationOptions { tag?: string; } @@ -4579,6 +4658,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** + * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) + */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** + * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) + */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; /** * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data. * @@ -12782,7 +12873,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | type GPUBufferDynamicOffset = number; type GPUBufferUsageFlags = number; type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas; +type GPUDepthBias = number; type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; type GPUFlagsConstant = number; type GPUIndex32 = number; @@ -12792,6 +12885,7 @@ type GPUMapModeFlags = number; type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; type GPUPipelineConstantValue = number; +type GPUSampleMask = number; type GPUSignedOffset32 = number; type GPUSize32 = number; type GPUSize32Out = number; @@ -12845,24 +12939,32 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; type GPUAutoLayoutMode = "auto"; +type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCanvasAlphaMode = "opaque" | "premultiplied"; type GPUCanvasToneMappingMode = "extended" | "standard"; type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; type GPUStoreOp = "discard" | "store"; type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; type GPUTextureDimension = "1d" | "2d" | "3d"; type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8"; type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra"; +type GPUVertexStepMode = "instance" | "vertex"; type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; diff --git a/baselines/ts5.6/webworker.generated.d.ts b/baselines/ts5.6/webworker.generated.d.ts index a227cd3e7..f7144dfe0 100644 --- a/baselines/ts5.6/webworker.generated.d.ts +++ b/baselines/ts5.6/webworker.generated.d.ts @@ -369,6 +369,17 @@ interface GPUBindGroupEntry { resource: GPUBindingResource; } +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + interface GPUBufferBinding { buffer: GPUBuffer; offset?: GPUSize64; @@ -402,6 +413,12 @@ interface GPUColorDict { r: number; } +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { } @@ -433,6 +450,19 @@ interface GPUCopyExternalImageSourceInfo { source: GPUCopyExternalImageSource; } +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + interface GPUExtent3DDict { depthOrArrayLayers?: GPUIntegerCoordinate; height?: GPUIntegerCoordinate; @@ -444,6 +474,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { source: VideoFrame; } +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + interface GPUObjectDescriptorBase { label?: string; } @@ -471,6 +511,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { bindGroupLayouts: (GPUBindGroupLayout | null)[]; } +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + interface GPUProgrammableStage { constants?: Record; entryPoint?: string; @@ -531,6 +579,14 @@ interface GPURenderPassTimestampWrites { querySet: GPUQuerySet; } +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { addressModeU?: GPUAddressMode; addressModeV?: GPUAddressMode; @@ -548,6 +604,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { code: string; } +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { buffer: GPUBuffer; } @@ -590,6 +653,22 @@ interface GPUUncapturedErrorEventInit extends EventInit { error: GPUError; } +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GetNotificationOptions { tag?: string; } @@ -5599,6 +5678,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** + * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) + */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** + * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) + */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; /** * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data. * @@ -14784,7 +14875,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | type GPUBufferDynamicOffset = number; type GPUBufferUsageFlags = number; type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; type GPUCopyExternalImageSource = ImageBitmap | ImageData | VideoFrame | OffscreenCanvas; +type GPUDepthBias = number; type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; type GPUFlagsConstant = number; type GPUIndex32 = number; @@ -14794,6 +14887,7 @@ type GPUMapModeFlags = number; type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; type GPUPipelineConstantValue = number; +type GPUSampleMask = number; type GPUSignedOffset32 = number; type GPUSize32 = number; type GPUSize32Out = number; @@ -14860,24 +14954,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; type GPUAutoLayoutMode = "auto"; +type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCanvasAlphaMode = "opaque" | "premultiplied"; type GPUCanvasToneMappingMode = "extended" | "standard"; type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; type GPUStoreOp = "discard" | "store"; type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; type GPUTextureDimension = "1d" | "2d" | "3d"; type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8"; type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra"; +type GPUVertexStepMode = "instance" | "vertex"; type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor"; type HardwareAcceleration = "no-preference" | "prefer-hardware" | "prefer-software"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; diff --git a/baselines/ts5.9/dom.generated.d.ts b/baselines/ts5.9/dom.generated.d.ts index 2fef7af78..6768d2863 100644 --- a/baselines/ts5.9/dom.generated.d.ts +++ b/baselines/ts5.9/dom.generated.d.ts @@ -812,6 +812,17 @@ interface GPUBindGroupEntry { resource: GPUBindingResource; } +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + interface GPUBufferBinding { buffer: GPUBuffer; offset?: GPUSize64; @@ -845,6 +856,12 @@ interface GPUColorDict { r: number; } +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { } @@ -876,6 +893,19 @@ interface GPUCopyExternalImageSourceInfo { source: GPUCopyExternalImageSource; } +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + interface GPUExtent3DDict { depthOrArrayLayers?: GPUIntegerCoordinate; height?: GPUIntegerCoordinate; @@ -887,6 +917,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { source: HTMLVideoElement | VideoFrame; } +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + interface GPUObjectDescriptorBase { label?: string; } @@ -914,6 +954,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { bindGroupLayouts: (GPUBindGroupLayout | null)[]; } +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + interface GPUProgrammableStage { constants?: Record; entryPoint?: string; @@ -974,6 +1022,14 @@ interface GPURenderPassTimestampWrites { querySet: GPUQuerySet; } +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { addressModeU?: GPUAddressMode; addressModeV?: GPUAddressMode; @@ -991,6 +1047,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { code: string; } +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { buffer: GPUBuffer; } @@ -1033,6 +1096,22 @@ interface GPUUncapturedErrorEventInit extends EventInit { error: GPUError; } +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GainOptions extends AudioNodeOptions { gain?: number; } @@ -15454,6 +15533,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** + * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) + */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** + * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) + */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; /** * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data. * @@ -43916,7 +44007,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | type GPUBufferDynamicOffset = number; type GPUBufferUsageFlags = number; type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; type GPUCopyExternalImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas; +type GPUDepthBias = number; type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; type GPUFlagsConstant = number; type GPUIndex32 = number; @@ -43926,6 +44019,7 @@ type GPUMapModeFlags = number; type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; type GPUPipelineConstantValue = number; +type GPUSampleMask = number; type GPUSignedOffset32 = number; type GPUSize32 = number; type GPUSize32Out = number; @@ -44041,24 +44135,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading"; type FullscreenNavigationUI = "auto" | "hide" | "show"; type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; type GPUAutoLayoutMode = "auto"; +type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCanvasAlphaMode = "opaque" | "premultiplied"; type GPUCanvasToneMappingMode = "extended" | "standard"; type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; type GPUStoreOp = "discard" | "store"; type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; type GPUTextureDimension = "1d" | "2d" | "3d"; type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8"; type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra"; +type GPUVertexStepMode = "instance" | "vertex"; type GamepadHapticEffectType = "dual-rumble" | "trigger-rumble"; type GamepadHapticsResult = "complete" | "preempted"; type GamepadMappingType = "" | "standard" | "xr-standard"; diff --git a/baselines/ts5.9/serviceworker.generated.d.ts b/baselines/ts5.9/serviceworker.generated.d.ts index 21c93620e..aaf99f3ba 100644 --- a/baselines/ts5.9/serviceworker.generated.d.ts +++ b/baselines/ts5.9/serviceworker.generated.d.ts @@ -279,6 +279,17 @@ interface GPUBindGroupEntry { resource: GPUBindingResource; } +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + interface GPUBufferBinding { buffer: GPUBuffer; offset?: GPUSize64; @@ -312,6 +323,12 @@ interface GPUColorDict { r: number; } +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { } @@ -343,6 +360,19 @@ interface GPUCopyExternalImageSourceInfo { source: GPUCopyExternalImageSource; } +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + interface GPUExtent3DDict { depthOrArrayLayers?: GPUIntegerCoordinate; height?: GPUIntegerCoordinate; @@ -353,6 +383,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { colorSpace?: PredefinedColorSpace; } +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + interface GPUObjectDescriptorBase { label?: string; } @@ -380,6 +420,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { bindGroupLayouts: (GPUBindGroupLayout | null)[]; } +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + interface GPUProgrammableStage { constants?: Record; entryPoint?: string; @@ -440,6 +488,14 @@ interface GPURenderPassTimestampWrites { querySet: GPUQuerySet; } +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { addressModeU?: GPUAddressMode; addressModeV?: GPUAddressMode; @@ -457,6 +513,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { code: string; } +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { buffer: GPUBuffer; } @@ -499,6 +562,22 @@ interface GPUUncapturedErrorEventInit extends EventInit { error: GPUError; } +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GetNotificationOptions { tag?: string; } @@ -4896,6 +4975,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** + * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) + */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** + * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) + */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; /** * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data. * @@ -13106,7 +13197,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | type GPUBufferDynamicOffset = number; type GPUBufferUsageFlags = number; type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas; +type GPUDepthBias = number; type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; type GPUFlagsConstant = number; type GPUIndex32 = number; @@ -13116,6 +13209,7 @@ type GPUMapModeFlags = number; type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; type GPUPipelineConstantValue = number; +type GPUSampleMask = number; type GPUSignedOffset32 = number; type GPUSize32 = number; type GPUSize32Out = number; @@ -13173,24 +13267,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; type GPUAutoLayoutMode = "auto"; +type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCanvasAlphaMode = "opaque" | "premultiplied"; type GPUCanvasToneMappingMode = "extended" | "standard"; type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; type GPUStoreOp = "discard" | "store"; type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; type GPUTextureDimension = "1d" | "2d" | "3d"; type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8"; type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra"; +type GPUVertexStepMode = "instance" | "vertex"; type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; diff --git a/baselines/ts5.9/sharedworker.generated.d.ts b/baselines/ts5.9/sharedworker.generated.d.ts index 89b8836a3..07834cd08 100644 --- a/baselines/ts5.9/sharedworker.generated.d.ts +++ b/baselines/ts5.9/sharedworker.generated.d.ts @@ -223,6 +223,17 @@ interface GPUBindGroupEntry { resource: GPUBindingResource; } +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + interface GPUBufferBinding { buffer: GPUBuffer; offset?: GPUSize64; @@ -256,6 +267,12 @@ interface GPUColorDict { r: number; } +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { } @@ -287,6 +304,19 @@ interface GPUCopyExternalImageSourceInfo { source: GPUCopyExternalImageSource; } +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + interface GPUExtent3DDict { depthOrArrayLayers?: GPUIntegerCoordinate; height?: GPUIntegerCoordinate; @@ -297,6 +327,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { colorSpace?: PredefinedColorSpace; } +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + interface GPUObjectDescriptorBase { label?: string; } @@ -324,6 +364,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { bindGroupLayouts: (GPUBindGroupLayout | null)[]; } +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + interface GPUProgrammableStage { constants?: Record; entryPoint?: string; @@ -384,6 +432,14 @@ interface GPURenderPassTimestampWrites { querySet: GPUQuerySet; } +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { addressModeU?: GPUAddressMode; addressModeV?: GPUAddressMode; @@ -401,6 +457,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { code: string; } +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { buffer: GPUBuffer; } @@ -443,6 +506,22 @@ interface GPUUncapturedErrorEventInit extends EventInit { error: GPUError; } +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GetNotificationOptions { tag?: string; } @@ -4579,6 +4658,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** + * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) + */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** + * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) + */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; /** * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data. * @@ -12782,7 +12873,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | type GPUBufferDynamicOffset = number; type GPUBufferUsageFlags = number; type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas; +type GPUDepthBias = number; type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; type GPUFlagsConstant = number; type GPUIndex32 = number; @@ -12792,6 +12885,7 @@ type GPUMapModeFlags = number; type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; type GPUPipelineConstantValue = number; +type GPUSampleMask = number; type GPUSignedOffset32 = number; type GPUSize32 = number; type GPUSize32Out = number; @@ -12845,24 +12939,32 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; type GPUAutoLayoutMode = "auto"; +type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCanvasAlphaMode = "opaque" | "premultiplied"; type GPUCanvasToneMappingMode = "extended" | "standard"; type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; type GPUStoreOp = "discard" | "store"; type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; type GPUTextureDimension = "1d" | "2d" | "3d"; type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8"; type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra"; +type GPUVertexStepMode = "instance" | "vertex"; type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; diff --git a/baselines/ts5.9/webworker.generated.d.ts b/baselines/ts5.9/webworker.generated.d.ts index ddad941fc..2e78daf81 100644 --- a/baselines/ts5.9/webworker.generated.d.ts +++ b/baselines/ts5.9/webworker.generated.d.ts @@ -369,6 +369,17 @@ interface GPUBindGroupEntry { resource: GPUBindingResource; } +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + interface GPUBufferBinding { buffer: GPUBuffer; offset?: GPUSize64; @@ -402,6 +413,12 @@ interface GPUColorDict { r: number; } +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { } @@ -433,6 +450,19 @@ interface GPUCopyExternalImageSourceInfo { source: GPUCopyExternalImageSource; } +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + interface GPUExtent3DDict { depthOrArrayLayers?: GPUIntegerCoordinate; height?: GPUIntegerCoordinate; @@ -444,6 +474,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { source: VideoFrame; } +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + interface GPUObjectDescriptorBase { label?: string; } @@ -471,6 +511,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { bindGroupLayouts: (GPUBindGroupLayout | null)[]; } +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + interface GPUProgrammableStage { constants?: Record; entryPoint?: string; @@ -531,6 +579,14 @@ interface GPURenderPassTimestampWrites { querySet: GPUQuerySet; } +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { addressModeU?: GPUAddressMode; addressModeV?: GPUAddressMode; @@ -548,6 +604,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { code: string; } +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { buffer: GPUBuffer; } @@ -590,6 +653,22 @@ interface GPUUncapturedErrorEventInit extends EventInit { error: GPUError; } +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GetNotificationOptions { tag?: string; } @@ -5599,6 +5678,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** + * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) + */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** + * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) + */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; /** * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data. * @@ -14784,7 +14875,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | type GPUBufferDynamicOffset = number; type GPUBufferUsageFlags = number; type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; type GPUCopyExternalImageSource = ImageBitmap | ImageData | VideoFrame | OffscreenCanvas; +type GPUDepthBias = number; type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; type GPUFlagsConstant = number; type GPUIndex32 = number; @@ -14794,6 +14887,7 @@ type GPUMapModeFlags = number; type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; type GPUPipelineConstantValue = number; +type GPUSampleMask = number; type GPUSignedOffset32 = number; type GPUSize32 = number; type GPUSize32Out = number; @@ -14860,24 +14954,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; type GPUAutoLayoutMode = "auto"; +type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCanvasAlphaMode = "opaque" | "premultiplied"; type GPUCanvasToneMappingMode = "extended" | "standard"; type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; type GPUStoreOp = "discard" | "store"; type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; type GPUTextureDimension = "1d" | "2d" | "3d"; type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8"; type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra"; +type GPUVertexStepMode = "instance" | "vertex"; type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor"; type HardwareAcceleration = "no-preference" | "prefer-hardware" | "prefer-software"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index dd9b66e73..0933ee960 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -372,6 +372,17 @@ interface GPUBindGroupEntry { resource: GPUBindingResource; } +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + interface GPUBufferBinding { buffer: GPUBuffer; offset?: GPUSize64; @@ -405,6 +416,12 @@ interface GPUColorDict { r: number; } +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { } @@ -436,6 +453,19 @@ interface GPUCopyExternalImageSourceInfo { source: GPUCopyExternalImageSource; } +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + interface GPUExtent3DDict { depthOrArrayLayers?: GPUIntegerCoordinate; height?: GPUIntegerCoordinate; @@ -447,6 +477,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { source: VideoFrame; } +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + interface GPUObjectDescriptorBase { label?: string; } @@ -474,6 +514,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { bindGroupLayouts: (GPUBindGroupLayout | null)[]; } +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + interface GPUProgrammableStage { constants?: Record; entryPoint?: string; @@ -534,6 +582,14 @@ interface GPURenderPassTimestampWrites { querySet: GPUQuerySet; } +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { addressModeU?: GPUAddressMode; addressModeV?: GPUAddressMode; @@ -551,6 +607,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { code: string; } +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { buffer: GPUBuffer; } @@ -593,6 +656,22 @@ interface GPUUncapturedErrorEventInit extends EventInit { error: GPUError; } +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GetNotificationOptions { tag?: string; } @@ -5602,6 +5681,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** + * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) + */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** + * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) + */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; /** * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data. * @@ -14787,7 +14878,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | type GPUBufferDynamicOffset = number; type GPUBufferUsageFlags = number; type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; type GPUCopyExternalImageSource = ImageBitmap | ImageData | VideoFrame | OffscreenCanvas; +type GPUDepthBias = number; type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; type GPUFlagsConstant = number; type GPUIndex32 = number; @@ -14797,6 +14890,7 @@ type GPUMapModeFlags = number; type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; type GPUPipelineConstantValue = number; +type GPUSampleMask = number; type GPUSignedOffset32 = number; type GPUSize32 = number; type GPUSize32Out = number; @@ -14863,24 +14957,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; type GPUAutoLayoutMode = "auto"; +type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCanvasAlphaMode = "opaque" | "premultiplied"; type GPUCanvasToneMappingMode = "extended" | "standard"; type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; type GPUStoreOp = "discard" | "store"; type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; type GPUTextureDimension = "1d" | "2d" | "3d"; type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8"; type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra"; +type GPUVertexStepMode = "instance" | "vertex"; type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor"; type HardwareAcceleration = "no-preference" | "prefer-hardware" | "prefer-software"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 44bc15f57..5a40ad4d3 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -2881,8 +2881,6 @@ "methods": { "method": { "createBindGroupLayout": { "exposed": "" }, - "createRenderPipeline": { "exposed": "" }, - "createRenderPipelineAsync": { "exposed": "" }, } } }, diff --git a/inputfiles/patches/webgpu.kdl b/inputfiles/patches/webgpu.kdl index c7621221d..e4b243521 100644 --- a/inputfiles/patches/webgpu.kdl +++ b/inputfiles/patches/webgpu.kdl @@ -14,19 +14,6 @@ removals { texture-compression-bc-sliced-3d // No implementation as of 2024-11 } - enum GPUVertexFormat { - float16 // Blink only as of 2024-11 - sint16 // Blink only as of 2024-11 - sint8 // Blink only as of 2024-11 - snorm16 // Blink only as of 2024-11 - snorm8 // Blink only as of 2024-11 - uint16 // Blink only as of 2024-11 - uint8 // Blink only as of 2024-11 - unorm16 // Blink only as of 2024-11 - unorm8 // Blink only as of 2024-11 - unorm8x4-bgra // Blink only as of 2024-11 - } - dictionary GPURequestAdapterOptions { member featureLevel // Blink experimental only as of 2024-11 }