@@ -272,10 +272,25 @@ interface FontFaceSetLoadEventInit extends EventInit {
272272 fontfaces?: FontFace[];
273273}
274274
275+ interface GPUObjectDescriptorBase {
276+ label?: string;
277+ }
278+
275279interface GPUPipelineErrorInit {
276280 reason: GPUPipelineErrorReason;
277281}
278282
283+ interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
284+ arrayLayerCount?: GPUIntegerCoordinate;
285+ aspect?: GPUTextureAspect;
286+ baseArrayLayer?: GPUIntegerCoordinate;
287+ baseMipLevel?: GPUIntegerCoordinate;
288+ dimension?: GPUTextureViewDimension;
289+ format?: GPUTextureFormat;
290+ mipLevelCount?: GPUIntegerCoordinate;
291+ usage?: GPUTextureUsageFlags;
292+ }
293+
279294interface GPUUncapturedErrorEventInit extends EventInit {
280295 error: GPUError;
281296}
@@ -4503,6 +4518,80 @@ declare var GPUSupportedLimits: {
45034518 new(): GPUSupportedLimits;
45044519};
45054520
4521+ /**
4522+ * The **`GPUTexture`** interface of the WebGPU API represents a container used to store 1D, 2D, or 3D arrays of data, such as images, to use in GPU rendering operations.
4523+ * Available only in secure contexts.
4524+ *
4525+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture)
4526+ */
4527+ interface GPUTexture extends GPUObjectBase {
4528+ /**
4529+ * The **`depthOrArrayLayers`** read-only property of the GPUTexture interface represents the depth or layer count of the GPUTexture.
4530+ *
4531+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/depthOrArrayLayers)
4532+ */
4533+ readonly depthOrArrayLayers: GPUIntegerCoordinateOut;
4534+ /**
4535+ * The **`dimension`** read-only property of the GPUTexture interface represents the dimension of the set of texels for each GPUTexture subresource.
4536+ *
4537+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/dimension)
4538+ */
4539+ readonly dimension: GPUTextureDimension;
4540+ /**
4541+ * The **`format`** read-only property of the GPUTexture interface represents the format of the GPUTexture.
4542+ *
4543+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/format)
4544+ */
4545+ readonly format: GPUTextureFormat;
4546+ /**
4547+ * The **`height`** read-only property of the GPUTexture interface represents the height of the GPUTexture.
4548+ *
4549+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/height)
4550+ */
4551+ readonly height: GPUIntegerCoordinateOut;
4552+ /**
4553+ * The **`mipLevelCount`** read-only property of the GPUTexture interface represents the number of mip levels of the GPUTexture.
4554+ *
4555+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/mipLevelCount)
4556+ */
4557+ readonly mipLevelCount: GPUIntegerCoordinateOut;
4558+ /**
4559+ * The **`sampleCount`** read-only property of the GPUTexture interface represents the sample count of the GPUTexture.
4560+ *
4561+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/sampleCount)
4562+ */
4563+ readonly sampleCount: GPUSize32Out;
4564+ /**
4565+ * The **`usage`** read-only property of the GPUTexture interface is the bitwise flags representing the allowed usages of the GPUTexture.
4566+ *
4567+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/usage)
4568+ */
4569+ readonly usage: GPUFlagsConstant;
4570+ /**
4571+ * The **`width`** read-only property of the GPUTexture interface represents the width of the GPUTexture.
4572+ *
4573+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/width)
4574+ */
4575+ readonly width: GPUIntegerCoordinateOut;
4576+ /**
4577+ * The **`createView()`** method of the GPUTexture interface creates a GPUTextureView representing a specific view of the GPUTexture.
4578+ *
4579+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/createView)
4580+ */
4581+ createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView;
4582+ /**
4583+ * The **`destroy()`** method of the GPUTexture interface destroys the GPUTexture.
4584+ *
4585+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/destroy)
4586+ */
4587+ destroy(): void;
4588+ }
4589+
4590+ declare var GPUTexture: {
4591+ prototype: GPUTexture;
4592+ new(): GPUTexture;
4593+ };
4594+
45064595/**
45074596 * The **`GPUTextureView`** interface of the WebGPU API represents a view into a subset of the texture resources defined by a particular GPUTexture.
45084597 * Available only in secure contexts.
@@ -12107,6 +12196,11 @@ type GLsizei = number;
1210712196type GLsizeiptr = number;
1210812197type GLuint = number;
1210912198type GLuint64 = number;
12199+ type GPUFlagsConstant = number;
12200+ type GPUIntegerCoordinate = number;
12201+ type GPUIntegerCoordinateOut = number;
12202+ type GPUSize32Out = number;
12203+ type GPUTextureUsageFlags = number;
1211012204type HashAlgorithmIdentifier = AlgorithmIdentifier;
1211112205type HeadersInit = [string, string][] | Record<string, string> | Headers;
1211212206type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[];
@@ -12157,6 +12251,10 @@ type FontFaceSetLoadStatus = "loaded" | "loading";
1215712251type FrameType = "auxiliary" | "nested" | "none" | "top-level";
1215812252type GPUDeviceLostReason = "destroyed" | "unknown";
1215912253type GPUPipelineErrorReason = "internal" | "validation";
12254+ type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
12255+ type GPUTextureDimension = "1d" | "2d" | "3d";
12256+ 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";
12257+ type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array";
1216012258type 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";
1216112259type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
1216212260type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
0 commit comments