@@ -815,6 +815,20 @@ interface GPUBindGroupEntry {
815815 resource: GPUBindingResource;
816816}
817817
818+ interface GPUBindGroupLayoutDescriptor extends GPUObjectDescriptorBase {
819+ entries: GPUBindGroupLayoutEntry[];
820+ }
821+
822+ interface GPUBindGroupLayoutEntry {
823+ binding: GPUIndex32;
824+ buffer?: GPUBufferBindingLayout;
825+ externalTexture?: GPUExternalTextureBindingLayout;
826+ sampler?: GPUSamplerBindingLayout;
827+ storageTexture?: GPUStorageTextureBindingLayout;
828+ texture?: GPUTextureBindingLayout;
829+ visibility: GPUShaderStageFlags;
830+ }
831+
818832interface GPUBlendComponent {
819833 dstFactor?: GPUBlendFactor;
820834 operation?: GPUBlendOperation;
@@ -832,6 +846,12 @@ interface GPUBufferBinding {
832846 size?: GPUSize64;
833847}
834848
849+ interface GPUBufferBindingLayout {
850+ hasDynamicOffset?: boolean;
851+ minBindingSize?: GPUSize64;
852+ type?: GPUBufferBindingType;
853+ }
854+
835855interface GPUBufferDescriptor extends GPUObjectDescriptorBase {
836856 mappedAtCreation?: boolean;
837857 size: GPUSize64;
@@ -915,6 +935,9 @@ interface GPUExtent3DDict {
915935 width: GPUIntegerCoordinate;
916936}
917937
938+ interface GPUExternalTextureBindingLayout {
939+ }
940+
918941interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
919942 colorSpace?: PredefinedColorSpace;
920943 source: HTMLVideoElement | VideoFrame;
@@ -1033,6 +1056,10 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
10331056 vertex: GPUVertexState;
10341057}
10351058
1059+ interface GPUSamplerBindingLayout {
1060+ type?: GPUSamplerBindingType;
1061+ }
1062+
10361063interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
10371064 addressModeU?: GPUAddressMode;
10381065 addressModeV?: GPUAddressMode;
@@ -1057,6 +1084,12 @@ interface GPUStencilFaceState {
10571084 passOp?: GPUStencilOperation;
10581085}
10591086
1087+ interface GPUStorageTextureBindingLayout {
1088+ access?: GPUStorageTextureAccess;
1089+ format: GPUTextureFormat;
1090+ viewDimension?: GPUTextureViewDimension;
1091+ }
1092+
10601093interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
10611094 buffer: GPUBuffer;
10621095}
@@ -1074,6 +1107,12 @@ interface GPUTexelCopyTextureInfo {
10741107 texture: GPUTexture;
10751108}
10761109
1110+ interface GPUTextureBindingLayout {
1111+ multisampled?: boolean;
1112+ sampleType?: GPUTextureSampleType;
1113+ viewDimension?: GPUTextureViewDimension;
1114+ }
1115+
10771116interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
10781117 dimension?: GPUTextureDimension;
10791118 format: GPUTextureFormat;
@@ -15497,6 +15536,12 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
1549715536 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup)
1549815537 */
1549915538 createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
15539+ /**
15540+ * The **`createBindGroupLayout()`** method of the GPUDevice interface creates a GPUBindGroupLayout that defines the structure and purpose of related GPU resources such as buffers that will be used in a pipeline, and is used as a template when creating GPUBindGroups.
15541+ *
15542+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroupLayout)
15543+ */
15544+ createBindGroupLayout(descriptor: GPUBindGroupLayoutDescriptor): GPUBindGroupLayout;
1550015545 /**
1550115546 * The **`createBuffer()`** method of the GPUDevice interface creates a GPUBuffer in which to store raw data to use in GPU operations.
1550215547 *
@@ -44033,6 +44078,7 @@ type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
4403344078type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
4403444079type GPUPipelineConstantValue = number;
4403544080type GPUSampleMask = number;
44081+ type GPUShaderStageFlags = number;
4403644082type GPUSignedOffset32 = number;
4403744083type GPUSize32 = number;
4403844084type GPUSize32Out = number;
@@ -44150,6 +44196,7 @@ type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
4415044196type GPUAutoLayoutMode = "auto";
4415144197type 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";
4415244198type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract";
44199+ type GPUBufferBindingType = "read-only-storage" | "storage" | "uniform";
4415344200type GPUBufferMapState = "mapped" | "pending" | "unmapped";
4415444201type GPUCanvasAlphaMode = "opaque" | "premultiplied";
4415544202type GPUCanvasToneMappingMode = "extended" | "standard";
@@ -44166,11 +44213,14 @@ type GPUMipmapFilterMode = "linear" | "nearest";
4416644213type GPUPipelineErrorReason = "internal" | "validation";
4416744214type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip";
4416844215type GPUQueryType = "occlusion" | "timestamp";
44216+ type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering";
4416944217type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero";
44218+ type GPUStorageTextureAccess = "read-only" | "read-write" | "write-only";
4417044219type GPUStoreOp = "discard" | "store";
4417144220type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
4417244221type GPUTextureDimension = "1d" | "2d" | "3d";
4417344222type 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";
44223+ type GPUTextureSampleType = "depth" | "float" | "sint" | "uint" | "unfilterable-float";
4417444224type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array";
4417544225type 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";
4417644226type GPUVertexStepMode = "instance" | "vertex";
0 commit comments