{"ast":null,"code":"import { ILog2 } from \"../../Maths/math.scalar.functions.js\";\n\n/** @internal */\nexport class WebGPUTextureHelper {\n static ComputeNumMipmapLevels(width, height) {\n return ILog2(Math.max(width, height)) + 1;\n }\n static GetTextureTypeFromFormat(format) {\n switch (format) {\n // One Component = 8 bits unsigned\n case \"r8unorm\" /* WebGPUConstants.TextureFormat.R8Unorm */:\n case \"r8uint\" /* WebGPUConstants.TextureFormat.R8Uint */:\n case \"rg8unorm\" /* WebGPUConstants.TextureFormat.RG8Unorm */:\n case \"rg8uint\" /* WebGPUConstants.TextureFormat.RG8Uint */:\n case \"rgba8unorm\" /* WebGPUConstants.TextureFormat.RGBA8Unorm */:\n case \"rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.RGBA8UnormSRGB */:\n case \"rgba8uint\" /* WebGPUConstants.TextureFormat.RGBA8Uint */:\n case \"bgra8unorm\" /* WebGPUConstants.TextureFormat.BGRA8Unorm */:\n case \"bgra8unorm-srgb\" /* WebGPUConstants.TextureFormat.BGRA8UnormSRGB */:\n case \"rgb10a2uint\" /* WebGPUConstants.TextureFormat.RGB10A2UINT */: // composite format - let's say it's byte...\n case \"rgb10a2unorm\" /* WebGPUConstants.TextureFormat.RGB10A2Unorm */: // composite format - let's say it's byte...\n case \"rgb9e5ufloat\" /* WebGPUConstants.TextureFormat.RGB9E5UFloat */: // composite format - let's say it's byte...\n case \"rg11b10ufloat\" /* WebGPUConstants.TextureFormat.RG11B10UFloat */: // composite format - let's say it's byte...\n case \"bc7-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC7RGBAUnorm */:\n case \"bc7-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC7RGBAUnormSRGB */:\n case \"bc6h-rgb-ufloat\" /* WebGPUConstants.TextureFormat.BC6HRGBUFloat */:\n case \"bc5-rg-unorm\" /* WebGPUConstants.TextureFormat.BC5RGUnorm */:\n case \"bc3-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC3RGBAUnorm */:\n case \"bc3-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC3RGBAUnormSRGB */:\n case \"bc2-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC2RGBAUnorm */:\n case \"bc2-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC2RGBAUnormSRGB */:\n case \"bc4-r-unorm\" /* WebGPUConstants.TextureFormat.BC4RUnorm */:\n case \"bc1-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC1RGBAUnorm */:\n case \"bc1-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC1RGBAUnormSRGB */:\n case \"etc2-rgb8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGB8Unorm */:\n case \"etc2-rgb8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGB8UnormSRGB */:\n case \"etc2-rgb8a1unorm\" /* WebGPUConstants.TextureFormat.ETC2RGB8A1Unorm */:\n case \"etc2-rgb8a1unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGB8A1UnormSRGB */:\n case \"etc2-rgba8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGBA8Unorm */:\n case \"etc2-rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGBA8UnormSRGB */:\n case \"eac-r11unorm\" /* WebGPUConstants.TextureFormat.EACR11Unorm */:\n case \"eac-rg11unorm\" /* WebGPUConstants.TextureFormat.EACRG11Unorm */:\n case \"astc-4x4-unorm\" /* WebGPUConstants.TextureFormat.ASTC4x4Unorm */:\n case \"astc-4x4-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC4x4UnormSRGB */:\n case \"astc-5x4-unorm\" /* WebGPUConstants.TextureFormat.ASTC5x4Unorm */:\n case \"astc-5x4-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC5x4UnormSRGB */:\n case \"astc-5x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC5x5Unorm */:\n case \"astc-5x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC5x5UnormSRGB */:\n case \"astc-6x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC6x5Unorm */:\n case \"astc-6x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC6x5UnormSRGB */:\n case \"astc-6x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC6x6Unorm */:\n case \"astc-6x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC6x6UnormSRGB */:\n case \"astc-8x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x5Unorm */:\n case \"astc-8x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x5UnormSRGB */:\n case \"astc-8x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x6Unorm */:\n case \"astc-8x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x6UnormSRGB */:\n case \"astc-8x8-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x8Unorm */:\n case \"astc-8x8-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x8UnormSRGB */:\n case \"astc-10x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x5Unorm */:\n case \"astc-10x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x5UnormSRGB */:\n case \"astc-10x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x6Unorm */:\n case \"astc-10x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x6UnormSRGB */:\n case \"astc-10x8-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x8Unorm */:\n case \"astc-10x8-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x8UnormSRGB */:\n case \"astc-10x10-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x10Unorm */:\n case \"astc-10x10-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x10UnormSRGB */:\n case \"astc-12x10-unorm\" /* WebGPUConstants.TextureFormat.ASTC12x10Unorm */:\n case \"astc-12x10-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC12x10UnormSRGB */:\n case \"astc-12x12-unorm\" /* WebGPUConstants.TextureFormat.ASTC12x12Unorm */:\n case \"astc-12x12-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC12x12UnormSRGB */:\n case \"stencil8\" /* WebGPUConstants.TextureFormat.Stencil8 */:\n return 0;\n // One Component = 8 bits signed\n case \"r8snorm\" /* WebGPUConstants.TextureFormat.R8Snorm */:\n case \"r8sint\" /* WebGPUConstants.TextureFormat.R8Sint */:\n case \"rg8snorm\" /* WebGPUConstants.TextureFormat.RG8Snorm */:\n case \"rg8sint\" /* WebGPUConstants.TextureFormat.RG8Sint */:\n case \"rgba8snorm\" /* WebGPUConstants.TextureFormat.RGBA8Snorm */:\n case \"rgba8sint\" /* WebGPUConstants.TextureFormat.RGBA8Sint */:\n case \"bc6h-rgb-float\" /* WebGPUConstants.TextureFormat.BC6HRGBFloat */:\n case \"bc5-rg-snorm\" /* WebGPUConstants.TextureFormat.BC5RGSnorm */:\n case \"bc4-r-snorm\" /* WebGPUConstants.TextureFormat.BC4RSnorm */:\n case \"eac-r11snorm\" /* WebGPUConstants.TextureFormat.EACR11Snorm */:\n case \"eac-rg11snorm\" /* WebGPUConstants.TextureFormat.EACRG11Snorm */:\n return 3;\n // One component = 16 bits unsigned\n case \"r16uint\" /* WebGPUConstants.TextureFormat.R16Uint */:\n case \"r16unorm\" /* WebGPUConstants.TextureFormat.R16Unorm */:\n case \"rg16unorm\" /* WebGPUConstants.TextureFormat.RG16Unorm */:\n case \"rgba16unorm\" /* WebGPUConstants.TextureFormat.RGBA16Unorm */:\n case \"rg16uint\" /* WebGPUConstants.TextureFormat.RG16Uint */:\n case \"rgba16uint\" /* WebGPUConstants.TextureFormat.RGBA16Uint */:\n case \"depth16unorm\" /* WebGPUConstants.TextureFormat.Depth16Unorm */:\n return 5;\n // One component = 16 bits signed\n case \"r16sint\" /* WebGPUConstants.TextureFormat.R16Sint */:\n case \"r16snorm\" /* WebGPUConstants.TextureFormat.R16Snorm */:\n case \"rg16snorm\" /* WebGPUConstants.TextureFormat.RG16Snorm */:\n case \"rgba16snorm\" /* WebGPUConstants.TextureFormat.RGBA16Snorm */:\n case \"rg16sint\" /* WebGPUConstants.TextureFormat.RG16Sint */:\n case \"rgba16sint\" /* WebGPUConstants.TextureFormat.RGBA16Sint */:\n return 4;\n case \"r16float\" /* WebGPUConstants.TextureFormat.R16Float */:\n case \"rg16float\" /* WebGPUConstants.TextureFormat.RG16Float */:\n case \"rgba16float\" /* WebGPUConstants.TextureFormat.RGBA16Float */:\n return 2;\n // One component = 32 bits unsigned\n case \"r32uint\" /* WebGPUConstants.TextureFormat.R32Uint */:\n case \"rg32uint\" /* WebGPUConstants.TextureFormat.RG32Uint */:\n case \"rgba32uint\" /* WebGPUConstants.TextureFormat.RGBA32Uint */:\n return 7;\n // One component = 32 bits signed\n case \"r32sint\" /* WebGPUConstants.TextureFormat.R32Sint */:\n case \"rg32sint\" /* WebGPUConstants.TextureFormat.RG32Sint */:\n case \"rgba32sint\" /* WebGPUConstants.TextureFormat.RGBA32Sint */:\n return 7;\n case \"r32float\" /* WebGPUConstants.TextureFormat.R32Float */:\n case \"rg32float\" /* WebGPUConstants.TextureFormat.RG32Float */:\n case \"rgba32float\" /* WebGPUConstants.TextureFormat.RGBA32Float */:\n case \"depth32float\" /* WebGPUConstants.TextureFormat.Depth32Float */:\n case \"depth32float-stencil8\" /* WebGPUConstants.TextureFormat.Depth32FloatStencil8 */:\n case \"depth24plus\" /* WebGPUConstants.TextureFormat.Depth24Plus */:\n case \"depth24plus-stencil8\" /* WebGPUConstants.TextureFormat.Depth24PlusStencil8 */:\n return 1;\n }\n return 0;\n }\n static GetBlockInformationFromFormat(format) {\n switch (format) {\n // 8 bits formats\n case \"r8unorm\" /* WebGPUConstants.TextureFormat.R8Unorm */:\n case \"r8snorm\" /* WebGPUConstants.TextureFormat.R8Snorm */:\n case \"r8uint\" /* WebGPUConstants.TextureFormat.R8Uint */:\n case \"r8sint\" /* WebGPUConstants.TextureFormat.R8Sint */:\n return {\n width: 1,\n height: 1,\n length: 1\n };\n // 16 bits formats\n case \"r16uint\" /* WebGPUConstants.TextureFormat.R16Uint */:\n case \"r16sint\" /* WebGPUConstants.TextureFormat.R16Sint */:\n case \"r16unorm\" /* WebGPUConstants.TextureFormat.R16Unorm */:\n case \"rg16unorm\" /* WebGPUConstants.TextureFormat.RG16Unorm */:\n case \"rgba16unorm\" /* WebGPUConstants.TextureFormat.RGBA16Unorm */:\n case \"r16snorm\" /* WebGPUConstants.TextureFormat.R16Snorm */:\n case \"rg16snorm\" /* WebGPUConstants.TextureFormat.RG16Snorm */:\n case \"rgba16snorm\" /* WebGPUConstants.TextureFormat.RGBA16Snorm */:\n case \"r16float\" /* WebGPUConstants.TextureFormat.R16Float */:\n case \"rg8unorm\" /* WebGPUConstants.TextureFormat.RG8Unorm */:\n case \"rg8snorm\" /* WebGPUConstants.TextureFormat.RG8Snorm */:\n case \"rg8uint\" /* WebGPUConstants.TextureFormat.RG8Uint */:\n case \"rg8sint\" /* WebGPUConstants.TextureFormat.RG8Sint */:\n return {\n width: 1,\n height: 1,\n length: 2\n };\n // 32 bits formats\n case \"r32uint\" /* WebGPUConstants.TextureFormat.R32Uint */:\n case \"r32sint\" /* WebGPUConstants.TextureFormat.R32Sint */:\n case \"r32float\" /* WebGPUConstants.TextureFormat.R32Float */:\n case \"rg16uint\" /* WebGPUConstants.TextureFormat.RG16Uint */:\n case \"rg16sint\" /* WebGPUConstants.TextureFormat.RG16Sint */:\n case \"rg16float\" /* WebGPUConstants.TextureFormat.RG16Float */:\n case \"rgba8unorm\" /* WebGPUConstants.TextureFormat.RGBA8Unorm */:\n case \"rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.RGBA8UnormSRGB */:\n case \"rgba8snorm\" /* WebGPUConstants.TextureFormat.RGBA8Snorm */:\n case \"rgba8uint\" /* WebGPUConstants.TextureFormat.RGBA8Uint */:\n case \"rgba8sint\" /* WebGPUConstants.TextureFormat.RGBA8Sint */:\n case \"bgra8unorm\" /* WebGPUConstants.TextureFormat.BGRA8Unorm */:\n case \"bgra8unorm-srgb\" /* WebGPUConstants.TextureFormat.BGRA8UnormSRGB */:\n case \"rgb9e5ufloat\" /* WebGPUConstants.TextureFormat.RGB9E5UFloat */:\n case \"rgb10a2uint\" /* WebGPUConstants.TextureFormat.RGB10A2UINT */:\n case \"rgb10a2unorm\" /* WebGPUConstants.TextureFormat.RGB10A2Unorm */:\n case \"rg11b10ufloat\" /* WebGPUConstants.TextureFormat.RG11B10UFloat */:\n return {\n width: 1,\n height: 1,\n length: 4\n };\n // 64 bits formats\n case \"rg32uint\" /* WebGPUConstants.TextureFormat.RG32Uint */:\n case \"rg32sint\" /* WebGPUConstants.TextureFormat.RG32Sint */:\n case \"rg32float\" /* WebGPUConstants.TextureFormat.RG32Float */:\n case \"rgba16uint\" /* WebGPUConstants.TextureFormat.RGBA16Uint */:\n case \"rgba16sint\" /* WebGPUConstants.TextureFormat.RGBA16Sint */:\n case \"rgba16float\" /* WebGPUConstants.TextureFormat.RGBA16Float */:\n return {\n width: 1,\n height: 1,\n length: 8\n };\n // 128 bits formats\n case \"rgba32uint\" /* WebGPUConstants.TextureFormat.RGBA32Uint */:\n case \"rgba32sint\" /* WebGPUConstants.TextureFormat.RGBA32Sint */:\n case \"rgba32float\" /* WebGPUConstants.TextureFormat.RGBA32Float */:\n return {\n width: 1,\n height: 1,\n length: 16\n };\n // Depth and stencil formats\n case \"stencil8\" /* WebGPUConstants.TextureFormat.Stencil8 */:\n // eslint-disable-next-line no-throw-literal\n throw \"No fixed size for Stencil8 format!\";\n case \"depth16unorm\" /* WebGPUConstants.TextureFormat.Depth16Unorm */:\n return {\n width: 1,\n height: 1,\n length: 2\n };\n case \"depth24plus\" /* WebGPUConstants.TextureFormat.Depth24Plus */:\n // eslint-disable-next-line no-throw-literal\n throw \"No fixed size for Depth24Plus format!\";\n case \"depth24plus-stencil8\" /* WebGPUConstants.TextureFormat.Depth24PlusStencil8 */:\n // eslint-disable-next-line no-throw-literal\n throw \"No fixed size for Depth24PlusStencil8 format!\";\n case \"depth32float\" /* WebGPUConstants.TextureFormat.Depth32Float */:\n return {\n width: 1,\n height: 1,\n length: 4\n };\n case \"depth32float-stencil8\" /* WebGPUConstants.TextureFormat.Depth32FloatStencil8 */:\n return {\n width: 1,\n height: 1,\n length: 5\n };\n // BC compressed formats usable if \"texture-compression-bc\" is both\n // supported by the device/user agent and enabled in requestDevice.\n case \"bc7-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC7RGBAUnorm */:\n case \"bc7-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC7RGBAUnormSRGB */:\n case \"bc6h-rgb-ufloat\" /* WebGPUConstants.TextureFormat.BC6HRGBUFloat */:\n case \"bc6h-rgb-float\" /* WebGPUConstants.TextureFormat.BC6HRGBFloat */:\n case \"bc5-rg-unorm\" /* WebGPUConstants.TextureFormat.BC5RGUnorm */:\n case \"bc5-rg-snorm\" /* WebGPUConstants.TextureFormat.BC5RGSnorm */:\n case \"bc3-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC3RGBAUnorm */:\n case \"bc3-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC3RGBAUnormSRGB */:\n case \"bc2-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC2RGBAUnorm */:\n case \"bc2-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC2RGBAUnormSRGB */:\n return {\n width: 4,\n height: 4,\n length: 16\n };\n case \"bc4-r-unorm\" /* WebGPUConstants.TextureFormat.BC4RUnorm */:\n case \"bc4-r-snorm\" /* WebGPUConstants.TextureFormat.BC4RSnorm */:\n case \"bc1-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC1RGBAUnorm */:\n case \"bc1-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC1RGBAUnormSRGB */:\n return {\n width: 4,\n height: 4,\n length: 8\n };\n // ETC2 compressed formats usable if \"texture-compression-etc2\" is both\n // supported by the device/user agent and enabled in requestDevice.\n case \"etc2-rgb8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGB8Unorm */:\n case \"etc2-rgb8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGB8UnormSRGB */:\n case \"etc2-rgb8a1unorm\" /* WebGPUConstants.TextureFormat.ETC2RGB8A1Unorm */:\n case \"etc2-rgb8a1unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGB8A1UnormSRGB */:\n case \"eac-r11unorm\" /* WebGPUConstants.TextureFormat.EACR11Unorm */:\n case \"eac-r11snorm\" /* WebGPUConstants.TextureFormat.EACR11Snorm */:\n return {\n width: 4,\n height: 4,\n length: 8\n };\n case \"etc2-rgba8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGBA8Unorm */:\n case \"etc2-rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGBA8UnormSRGB */:\n case \"eac-rg11unorm\" /* WebGPUConstants.TextureFormat.EACRG11Unorm */:\n case \"eac-rg11snorm\" /* WebGPUConstants.TextureFormat.EACRG11Snorm */:\n return {\n width: 4,\n height: 4,\n length: 16\n };\n // ASTC compressed formats usable if \"texture-compression-astc\" is both\n // supported by the device/user agent and enabled in requestDevice.\n case \"astc-4x4-unorm\" /* WebGPUConstants.TextureFormat.ASTC4x4Unorm */:\n case \"astc-4x4-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC4x4UnormSRGB */:\n return {\n width: 4,\n height: 4,\n length: 16\n };\n case \"astc-5x4-unorm\" /* WebGPUConstants.TextureFormat.ASTC5x4Unorm */:\n case \"astc-5x4-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC5x4UnormSRGB */:\n return {\n width: 5,\n height: 4,\n length: 16\n };\n case \"astc-5x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC5x5Unorm */:\n case \"astc-5x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC5x5UnormSRGB */:\n return {\n width: 5,\n height: 5,\n length: 16\n };\n case \"astc-6x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC6x5Unorm */:\n case \"astc-6x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC6x5UnormSRGB */:\n return {\n width: 6,\n height: 5,\n length: 16\n };\n case \"astc-6x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC6x6Unorm */:\n case \"astc-6x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC6x6UnormSRGB */:\n return {\n width: 6,\n height: 6,\n length: 16\n };\n case \"astc-8x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x5Unorm */:\n case \"astc-8x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x5UnormSRGB */:\n return {\n width: 8,\n height: 5,\n length: 16\n };\n case \"astc-8x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x6Unorm */:\n case \"astc-8x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x6UnormSRGB */:\n return {\n width: 8,\n height: 6,\n length: 16\n };\n case \"astc-8x8-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x8Unorm */:\n case \"astc-8x8-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x8UnormSRGB */:\n return {\n width: 8,\n height: 8,\n length: 16\n };\n case \"astc-10x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x5Unorm */:\n case \"astc-10x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x5UnormSRGB */:\n return {\n width: 10,\n height: 5,\n length: 16\n };\n case \"astc-10x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x6Unorm */:\n case \"astc-10x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x6UnormSRGB */:\n return {\n width: 10,\n height: 6,\n length: 16\n };\n case \"astc-10x8-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x8Unorm */:\n case \"astc-10x8-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x8UnormSRGB */:\n return {\n width: 10,\n height: 8,\n length: 16\n };\n case \"astc-10x10-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x10Unorm */:\n case \"astc-10x10-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x10UnormSRGB */:\n return {\n width: 10,\n height: 10,\n length: 16\n };\n case \"astc-12x10-unorm\" /* WebGPUConstants.TextureFormat.ASTC12x10Unorm */:\n case \"astc-12x10-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC12x10UnormSRGB */:\n return {\n width: 12,\n height: 10,\n length: 16\n };\n case \"astc-12x12-unorm\" /* WebGPUConstants.TextureFormat.ASTC12x12Unorm */:\n case \"astc-12x12-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC12x12UnormSRGB */:\n return {\n width: 12,\n height: 12,\n length: 16\n };\n }\n return {\n width: 1,\n height: 1,\n length: 4\n };\n }\n static IsHardwareTexture(texture) {\n return !!texture.release;\n }\n static IsInternalTexture(texture) {\n return !!texture.dispose;\n }\n static IsImageBitmap(imageBitmap) {\n return imageBitmap.close !== undefined;\n }\n static IsImageBitmapArray(imageBitmap) {\n return Array.isArray(imageBitmap) && imageBitmap[0].close !== undefined;\n }\n static IsCompressedFormat(format) {\n switch (format) {\n case \"bc7-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC7RGBAUnormSRGB */:\n case \"bc7-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC7RGBAUnorm */:\n case \"bc6h-rgb-float\" /* WebGPUConstants.TextureFormat.BC6HRGBFloat */:\n case \"bc6h-rgb-ufloat\" /* WebGPUConstants.TextureFormat.BC6HRGBUFloat */:\n case \"bc5-rg-snorm\" /* WebGPUConstants.TextureFormat.BC5RGSnorm */:\n case \"bc5-rg-unorm\" /* WebGPUConstants.TextureFormat.BC5RGUnorm */:\n case \"bc4-r-snorm\" /* WebGPUConstants.TextureFormat.BC4RSnorm */:\n case \"bc4-r-unorm\" /* WebGPUConstants.TextureFormat.BC4RUnorm */:\n case \"bc3-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC3RGBAUnormSRGB */:\n case \"bc3-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC3RGBAUnorm */:\n case \"bc2-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC2RGBAUnormSRGB */:\n case \"bc2-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC2RGBAUnorm */:\n case \"bc1-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC1RGBAUnormSRGB */:\n case \"bc1-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC1RGBAUnorm */:\n case \"etc2-rgb8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGB8Unorm */:\n case \"etc2-rgb8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGB8UnormSRGB */:\n case \"etc2-rgb8a1unorm\" /* WebGPUConstants.TextureFormat.ETC2RGB8A1Unorm */:\n case \"etc2-rgb8a1unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGB8A1UnormSRGB */:\n case \"etc2-rgba8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGBA8Unorm */:\n case \"etc2-rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGBA8UnormSRGB */:\n case \"eac-r11unorm\" /* WebGPUConstants.TextureFormat.EACR11Unorm */:\n case \"eac-r11snorm\" /* WebGPUConstants.TextureFormat.EACR11Snorm */:\n case \"eac-rg11unorm\" /* WebGPUConstants.TextureFormat.EACRG11Unorm */:\n case \"eac-rg11snorm\" /* WebGPUConstants.TextureFormat.EACRG11Snorm */:\n case \"astc-4x4-unorm\" /* WebGPUConstants.TextureFormat.ASTC4x4Unorm */:\n case \"astc-4x4-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC4x4UnormSRGB */:\n case \"astc-5x4-unorm\" /* WebGPUConstants.TextureFormat.ASTC5x4Unorm */:\n case \"astc-5x4-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC5x4UnormSRGB */:\n case \"astc-5x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC5x5Unorm */:\n case \"astc-5x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC5x5UnormSRGB */:\n case \"astc-6x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC6x5Unorm */:\n case \"astc-6x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC6x5UnormSRGB */:\n case \"astc-6x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC6x6Unorm */:\n case \"astc-6x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC6x6UnormSRGB */:\n case \"astc-8x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x5Unorm */:\n case \"astc-8x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x5UnormSRGB */:\n case \"astc-8x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x6Unorm */:\n case \"astc-8x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x6UnormSRGB */:\n case \"astc-8x8-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x8Unorm */:\n case \"astc-8x8-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x8UnormSRGB */:\n case \"astc-10x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x5Unorm */:\n case \"astc-10x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x5UnormSRGB */:\n case \"astc-10x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x6Unorm */:\n case \"astc-10x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x6UnormSRGB */:\n case \"astc-10x8-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x8Unorm */:\n case \"astc-10x8-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x8UnormSRGB */:\n case \"astc-10x10-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x10Unorm */:\n case \"astc-10x10-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x10UnormSRGB */:\n case \"astc-12x10-unorm\" /* WebGPUConstants.TextureFormat.ASTC12x10Unorm */:\n case \"astc-12x10-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC12x10UnormSRGB */:\n case \"astc-12x12-unorm\" /* WebGPUConstants.TextureFormat.ASTC12x12Unorm */:\n case \"astc-12x12-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC12x12UnormSRGB */:\n return true;\n }\n return false;\n }\n static GetWebGPUTextureFormat(type, format, useSRGBBuffer = false) {\n switch (format) {\n case 15:\n return \"depth16unorm\" /* WebGPUConstants.TextureFormat.Depth16Unorm */;\n case 16:\n return \"depth24plus\" /* WebGPUConstants.TextureFormat.Depth24Plus */;\n case 13:\n return \"depth24plus-stencil8\" /* WebGPUConstants.TextureFormat.Depth24PlusStencil8 */;\n case 14:\n return \"depth32float\" /* WebGPUConstants.TextureFormat.Depth32Float */;\n case 18:\n return \"depth32float-stencil8\" /* WebGPUConstants.TextureFormat.Depth32FloatStencil8 */;\n case 19:\n return \"stencil8\" /* WebGPUConstants.TextureFormat.Stencil8 */;\n case 36492:\n return useSRGBBuffer ? \"bc7-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC7RGBAUnormSRGB */ : \"bc7-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC7RGBAUnorm */;\n case 36495:\n return \"bc6h-rgb-ufloat\" /* WebGPUConstants.TextureFormat.BC6HRGBUFloat */;\n case 36494:\n return \"bc6h-rgb-float\" /* WebGPUConstants.TextureFormat.BC6HRGBFloat */;\n case 33779:\n return useSRGBBuffer ? \"bc3-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC3RGBAUnormSRGB */ : \"bc3-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC3RGBAUnorm */;\n case 33778:\n return useSRGBBuffer ? \"bc2-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC2RGBAUnormSRGB */ : \"bc2-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC2RGBAUnorm */;\n case 33777:\n case 33776:\n return useSRGBBuffer ? \"bc1-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC1RGBAUnormSRGB */ : \"bc1-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC1RGBAUnorm */;\n case 37808:\n return useSRGBBuffer ? \"astc-4x4-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC4x4UnormSRGB */ : \"astc-4x4-unorm\" /* WebGPUConstants.TextureFormat.ASTC4x4Unorm */;\n case 36196:\n case 37492:\n return useSRGBBuffer ? \"etc2-rgb8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGB8UnormSRGB */ : \"etc2-rgb8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGB8Unorm */;\n case 37496:\n return useSRGBBuffer ? \"etc2-rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGBA8UnormSRGB */ : \"etc2-rgba8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGBA8Unorm */;\n }\n switch (type) {\n case 3:\n switch (format) {\n case 6:\n return \"r8snorm\" /* WebGPUConstants.TextureFormat.R8Snorm */;\n case 7:\n return \"rg8snorm\" /* WebGPUConstants.TextureFormat.RG8Snorm */;\n case 4:\n // eslint-disable-next-line no-throw-literal\n throw \"RGB format not supported in WebGPU\";\n case 8:\n return \"r8sint\" /* WebGPUConstants.TextureFormat.R8Sint */;\n case 9:\n return \"rg8sint\" /* WebGPUConstants.TextureFormat.RG8Sint */;\n case 10:\n // eslint-disable-next-line no-throw-literal\n throw \"RGB_INTEGER format not supported in WebGPU\";\n case 11:\n return \"rgba8sint\" /* WebGPUConstants.TextureFormat.RGBA8Sint */;\n default:\n return \"rgba8snorm\" /* WebGPUConstants.TextureFormat.RGBA8Snorm */;\n }\n case 0:\n switch (format) {\n case 6:\n return \"r8unorm\" /* WebGPUConstants.TextureFormat.R8Unorm */;\n case 7:\n return \"rg8unorm\" /* WebGPUConstants.TextureFormat.RG8Unorm */;\n case 4:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_RGB format not supported in WebGPU\";\n case 5:\n return useSRGBBuffer ? \"rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.RGBA8UnormSRGB */ : \"rgba8unorm\" /* WebGPUConstants.TextureFormat.RGBA8Unorm */;\n case 12:\n return useSRGBBuffer ? \"bgra8unorm-srgb\" /* WebGPUConstants.TextureFormat.BGRA8UnormSRGB */ : \"bgra8unorm\" /* WebGPUConstants.TextureFormat.BGRA8Unorm */;\n case 8:\n return \"r8uint\" /* WebGPUConstants.TextureFormat.R8Uint */;\n case 9:\n return \"rg8uint\" /* WebGPUConstants.TextureFormat.RG8Uint */;\n case 10:\n // eslint-disable-next-line no-throw-literal\n throw \"RGB_INTEGER format not supported in WebGPU\";\n case 11:\n return \"rgba8uint\" /* WebGPUConstants.TextureFormat.RGBA8Uint */;\n case 0:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_ALPHA format not supported in WebGPU\";\n case 1:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_LUMINANCE format not supported in WebGPU\";\n case 2:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_LUMINANCE_ALPHA format not supported in WebGPU\";\n default:\n return \"rgba8unorm\" /* WebGPUConstants.TextureFormat.RGBA8Unorm */;\n }\n case 4:\n switch (format) {\n case 8:\n return \"r16sint\" /* WebGPUConstants.TextureFormat.R16Sint */;\n case 9:\n return \"rg16sint\" /* WebGPUConstants.TextureFormat.RG16Sint */;\n case 10:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU\";\n case 11:\n return \"rgba16sint\" /* WebGPUConstants.TextureFormat.RGBA16Sint */;\n default:\n return \"rgba16sint\" /* WebGPUConstants.TextureFormat.RGBA16Sint */;\n }\n case 5:\n switch (format) {\n case 8:\n return \"r16uint\" /* WebGPUConstants.TextureFormat.R16Uint */;\n case 9:\n return \"rg16uint\" /* WebGPUConstants.TextureFormat.RG16Uint */;\n case 10:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU\";\n case 11:\n return \"rgba16uint\" /* WebGPUConstants.TextureFormat.RGBA16Uint */;\n default:\n return \"rgba16uint\" /* WebGPUConstants.TextureFormat.RGBA16Uint */;\n }\n case 6:\n switch (format) {\n case 8:\n return \"r32sint\" /* WebGPUConstants.TextureFormat.R32Sint */;\n case 9:\n return \"rg32sint\" /* WebGPUConstants.TextureFormat.RG32Sint */;\n case 10:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU\";\n case 11:\n return \"rgba32sint\" /* WebGPUConstants.TextureFormat.RGBA32Sint */;\n default:\n return \"rgba32sint\" /* WebGPUConstants.TextureFormat.RGBA32Sint */;\n }\n case 7:\n // Refers to UNSIGNED_INT\n switch (format) {\n case 8:\n return \"r32uint\" /* WebGPUConstants.TextureFormat.R32Uint */;\n case 9:\n return \"rg32uint\" /* WebGPUConstants.TextureFormat.RG32Uint */;\n case 10:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU\";\n case 11:\n return \"rgba32uint\" /* WebGPUConstants.TextureFormat.RGBA32Uint */;\n default:\n return \"rgba32uint\" /* WebGPUConstants.TextureFormat.RGBA32Uint */;\n }\n case 1:\n switch (format) {\n case 6:\n return \"r32float\" /* WebGPUConstants.TextureFormat.R32Float */;\n // By default. Other possibility is R16Float.\n case 7:\n return \"rg32float\" /* WebGPUConstants.TextureFormat.RG32Float */;\n // By default. Other possibility is RG16Float.\n case 4:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_RGB format not supported in WebGPU\";\n case 5:\n return \"rgba32float\" /* WebGPUConstants.TextureFormat.RGBA32Float */;\n // By default. Other possibility is RGBA16Float.\n default:\n return \"rgba32float\" /* WebGPUConstants.TextureFormat.RGBA32Float */;\n }\n case 2:\n switch (format) {\n case 6:\n return \"r16float\" /* WebGPUConstants.TextureFormat.R16Float */;\n case 7:\n return \"rg16float\" /* WebGPUConstants.TextureFormat.RG16Float */;\n case 4:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_RGB format not supported in WebGPU\";\n case 5:\n return \"rgba16float\" /* WebGPUConstants.TextureFormat.RGBA16Float */;\n default:\n return \"rgba16float\" /* WebGPUConstants.TextureFormat.RGBA16Float */;\n }\n case 10:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTURETYPE_UNSIGNED_SHORT_5_6_5 format not supported in WebGPU\";\n case 13:\n switch (format) {\n case 5:\n return \"rg11b10ufloat\" /* WebGPUConstants.TextureFormat.RG11B10UFloat */;\n case 11:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_RGBA_INTEGER format not supported in WebGPU when type is TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV\";\n default:\n return \"rg11b10ufloat\" /* WebGPUConstants.TextureFormat.RG11B10UFloat */;\n }\n case 14:\n switch (format) {\n case 5:\n return \"rgb9e5ufloat\" /* WebGPUConstants.TextureFormat.RGB9E5UFloat */;\n case 11:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_RGBA_INTEGER format not supported in WebGPU when type is TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV\";\n default:\n return \"rgb9e5ufloat\" /* WebGPUConstants.TextureFormat.RGB9E5UFloat */;\n }\n case 8:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4 format not supported in WebGPU\";\n case 9:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1 format not supported in WebGPU\";\n case 11:\n switch (format) {\n case 5:\n return \"rgb10a2unorm\" /* WebGPUConstants.TextureFormat.RGB10A2Unorm */;\n case 11:\n return \"rgb10a2uint\" /* WebGPUConstants.TextureFormat.RGB10A2UINT */;\n default:\n return \"rgb10a2unorm\" /* WebGPUConstants.TextureFormat.RGB10A2Unorm */;\n }\n }\n return useSRGBBuffer ? \"rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.RGBA8UnormSRGB */ : \"rgba8unorm\" /* WebGPUConstants.TextureFormat.RGBA8Unorm */;\n }\n static GetNumChannelsFromWebGPUTextureFormat(format) {\n switch (format) {\n case \"r8unorm\" /* WebGPUConstants.TextureFormat.R8Unorm */:\n case \"r8snorm\" /* WebGPUConstants.TextureFormat.R8Snorm */:\n case \"r8uint\" /* WebGPUConstants.TextureFormat.R8Uint */:\n case \"r8sint\" /* WebGPUConstants.TextureFormat.R8Sint */:\n case \"bc4-r-unorm\" /* WebGPUConstants.TextureFormat.BC4RUnorm */:\n case \"bc4-r-snorm\" /* WebGPUConstants.TextureFormat.BC4RSnorm */:\n case \"r16uint\" /* WebGPUConstants.TextureFormat.R16Uint */:\n case \"r16sint\" /* WebGPUConstants.TextureFormat.R16Sint */:\n case \"depth16unorm\" /* WebGPUConstants.TextureFormat.Depth16Unorm */:\n case \"r16float\" /* WebGPUConstants.TextureFormat.R16Float */:\n case \"r16unorm\" /* WebGPUConstants.TextureFormat.R16Unorm */:\n case \"r16snorm\" /* WebGPUConstants.TextureFormat.R16Snorm */:\n case \"r32uint\" /* WebGPUConstants.TextureFormat.R32Uint */:\n case \"r32sint\" /* WebGPUConstants.TextureFormat.R32Sint */:\n case \"r32float\" /* WebGPUConstants.TextureFormat.R32Float */:\n case \"depth32float\" /* WebGPUConstants.TextureFormat.Depth32Float */:\n case \"stencil8\" /* WebGPUConstants.TextureFormat.Stencil8 */:\n case \"depth24plus\" /* WebGPUConstants.TextureFormat.Depth24Plus */:\n case \"eac-r11unorm\" /* WebGPUConstants.TextureFormat.EACR11Unorm */:\n case \"eac-r11snorm\" /* WebGPUConstants.TextureFormat.EACR11Snorm */:\n return 1;\n case \"rg8unorm\" /* WebGPUConstants.TextureFormat.RG8Unorm */:\n case \"rg8snorm\" /* WebGPUConstants.TextureFormat.RG8Snorm */:\n case \"rg8uint\" /* WebGPUConstants.TextureFormat.RG8Uint */:\n case \"rg8sint\" /* WebGPUConstants.TextureFormat.RG8Sint */:\n case \"depth32float-stencil8\" /* WebGPUConstants.TextureFormat.Depth32FloatStencil8 */:\n case \"bc5-rg-unorm\" /* WebGPUConstants.TextureFormat.BC5RGUnorm */:\n case \"bc5-rg-snorm\" /* WebGPUConstants.TextureFormat.BC5RGSnorm */:\n case \"rg16uint\" /* WebGPUConstants.TextureFormat.RG16Uint */:\n case \"rg16sint\" /* WebGPUConstants.TextureFormat.RG16Sint */:\n case \"rg16float\" /* WebGPUConstants.TextureFormat.RG16Float */:\n case \"rg16unorm\" /* WebGPUConstants.TextureFormat.RG16Unorm */:\n case \"rg16snorm\" /* WebGPUConstants.TextureFormat.RG16Snorm */:\n case \"rg32uint\" /* WebGPUConstants.TextureFormat.RG32Uint */:\n case \"rg32sint\" /* WebGPUConstants.TextureFormat.RG32Sint */:\n case \"rg32float\" /* WebGPUConstants.TextureFormat.RG32Float */:\n case \"depth24plus-stencil8\" /* WebGPUConstants.TextureFormat.Depth24PlusStencil8 */:\n case \"eac-rg11unorm\" /* WebGPUConstants.TextureFormat.EACRG11Unorm */:\n case \"eac-rg11snorm\" /* WebGPUConstants.TextureFormat.EACRG11Snorm */:\n return 2;\n case \"rgb9e5ufloat\" /* WebGPUConstants.TextureFormat.RGB9E5UFloat */:\n case \"rg11b10ufloat\" /* WebGPUConstants.TextureFormat.RG11B10UFloat */:\n case \"bc6h-rgb-ufloat\" /* WebGPUConstants.TextureFormat.BC6HRGBUFloat */:\n case \"bc6h-rgb-float\" /* WebGPUConstants.TextureFormat.BC6HRGBFloat */:\n case \"etc2-rgb8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGB8Unorm */:\n case \"etc2-rgb8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGB8UnormSRGB */:\n return 3;\n case \"rgba8unorm\" /* WebGPUConstants.TextureFormat.RGBA8Unorm */:\n case \"rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.RGBA8UnormSRGB */:\n case \"rgba8snorm\" /* WebGPUConstants.TextureFormat.RGBA8Snorm */:\n case \"rgba8uint\" /* WebGPUConstants.TextureFormat.RGBA8Uint */:\n case \"rgba8sint\" /* WebGPUConstants.TextureFormat.RGBA8Sint */:\n case \"bgra8unorm\" /* WebGPUConstants.TextureFormat.BGRA8Unorm */:\n case \"bgra8unorm-srgb\" /* WebGPUConstants.TextureFormat.BGRA8UnormSRGB */:\n case \"rgba16unorm\" /* WebGPUConstants.TextureFormat.RGBA16Unorm */:\n case \"rgba16snorm\" /* WebGPUConstants.TextureFormat.RGBA16Snorm */:\n case \"rgb10a2uint\" /* WebGPUConstants.TextureFormat.RGB10A2UINT */:\n case \"rgb10a2unorm\" /* WebGPUConstants.TextureFormat.RGB10A2Unorm */:\n case \"bc7-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC7RGBAUnorm */:\n case \"bc7-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC7RGBAUnormSRGB */:\n case \"bc3-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC3RGBAUnorm */:\n case \"bc3-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC3RGBAUnormSRGB */:\n case \"bc2-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC2RGBAUnorm */:\n case \"bc2-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC2RGBAUnormSRGB */:\n case \"bc1-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC1RGBAUnorm */:\n case \"bc1-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC1RGBAUnormSRGB */:\n case \"rgba16uint\" /* WebGPUConstants.TextureFormat.RGBA16Uint */:\n case \"rgba16sint\" /* WebGPUConstants.TextureFormat.RGBA16Sint */:\n case \"rgba16float\" /* WebGPUConstants.TextureFormat.RGBA16Float */:\n case \"rgba32uint\" /* WebGPUConstants.TextureFormat.RGBA32Uint */:\n case \"rgba32sint\" /* WebGPUConstants.TextureFormat.RGBA32Sint */:\n case \"rgba32float\" /* WebGPUConstants.TextureFormat.RGBA32Float */:\n case \"etc2-rgb8a1unorm\" /* WebGPUConstants.TextureFormat.ETC2RGB8A1Unorm */:\n case \"etc2-rgb8a1unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGB8A1UnormSRGB */:\n case \"etc2-rgba8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGBA8Unorm */:\n case \"etc2-rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGBA8UnormSRGB */:\n case \"astc-4x4-unorm\" /* WebGPUConstants.TextureFormat.ASTC4x4Unorm */:\n case \"astc-4x4-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC4x4UnormSRGB */:\n case \"astc-5x4-unorm\" /* WebGPUConstants.TextureFormat.ASTC5x4Unorm */:\n case \"astc-5x4-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC5x4UnormSRGB */:\n case \"astc-5x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC5x5Unorm */:\n case \"astc-5x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC5x5UnormSRGB */:\n case \"astc-6x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC6x5Unorm */:\n case \"astc-6x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC6x5UnormSRGB */:\n case \"astc-6x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC6x6Unorm */:\n case \"astc-6x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC6x6UnormSRGB */:\n case \"astc-8x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x5Unorm */:\n case \"astc-8x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x5UnormSRGB */:\n case \"astc-8x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x6Unorm */:\n case \"astc-8x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x6UnormSRGB */:\n case \"astc-8x8-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x8Unorm */:\n case \"astc-8x8-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x8UnormSRGB */:\n case \"astc-10x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x5Unorm */:\n case \"astc-10x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x5UnormSRGB */:\n case \"astc-10x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x6Unorm */:\n case \"astc-10x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x6UnormSRGB */:\n case \"astc-10x8-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x8Unorm */:\n case \"astc-10x8-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x8UnormSRGB */:\n case \"astc-10x10-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x10Unorm */:\n case \"astc-10x10-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x10UnormSRGB */:\n case \"astc-12x10-unorm\" /* WebGPUConstants.TextureFormat.ASTC12x10Unorm */:\n case \"astc-12x10-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC12x10UnormSRGB */:\n case \"astc-12x12-unorm\" /* WebGPUConstants.TextureFormat.ASTC12x12Unorm */:\n case \"astc-12x12-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC12x12UnormSRGB */:\n return 4;\n }\n // eslint-disable-next-line no-throw-literal\n throw `Unknown format ${format}!`;\n }\n static HasStencilAspect(format) {\n switch (format) {\n case \"stencil8\" /* WebGPUConstants.TextureFormat.Stencil8 */:\n case \"depth32float-stencil8\" /* WebGPUConstants.TextureFormat.Depth32FloatStencil8 */:\n case \"depth24plus-stencil8\" /* WebGPUConstants.TextureFormat.Depth24PlusStencil8 */:\n return true;\n }\n return false;\n }\n static HasDepthAndStencilAspects(format) {\n switch (format) {\n case \"depth32float-stencil8\" /* WebGPUConstants.TextureFormat.Depth32FloatStencil8 */:\n case \"depth24plus-stencil8\" /* WebGPUConstants.TextureFormat.Depth24PlusStencil8 */:\n return true;\n }\n return false;\n }\n static GetDepthFormatOnly(format) {\n switch (format) {\n case \"depth16unorm\" /* WebGPUConstants.TextureFormat.Depth16Unorm */:\n return \"depth16unorm\" /* WebGPUConstants.TextureFormat.Depth16Unorm */;\n case \"depth24plus\" /* WebGPUConstants.TextureFormat.Depth24Plus */:\n return \"depth24plus\" /* WebGPUConstants.TextureFormat.Depth24Plus */;\n case \"depth24plus-stencil8\" /* WebGPUConstants.TextureFormat.Depth24PlusStencil8 */:\n return \"depth24plus\" /* WebGPUConstants.TextureFormat.Depth24Plus */;\n case \"depth32float\" /* WebGPUConstants.TextureFormat.Depth32Float */:\n return \"depth32float\" /* WebGPUConstants.TextureFormat.Depth32Float */;\n case \"depth32float-stencil8\" /* WebGPUConstants.TextureFormat.Depth32FloatStencil8 */:\n return \"depth32float\" /* WebGPUConstants.TextureFormat.Depth32Float */;\n }\n return format;\n }\n static GetSample(sampleCount) {\n // WebGPU only supports 1 or 4\n return sampleCount > 1 ? 4 : 1;\n }\n}","map":{"version":3,"names":["ILog2","WebGPUTextureHelper","ComputeNumMipmapLevels","width","height","Math","max","GetTextureTypeFromFormat","format","GetBlockInformationFromFormat","length","IsHardwareTexture","texture","release","IsInternalTexture","dispose","IsImageBitmap","imageBitmap","close","undefined","IsImageBitmapArray","Array","isArray","IsCompressedFormat","GetWebGPUTextureFormat","type","useSRGBBuffer","GetNumChannelsFromWebGPUTextureFormat","HasStencilAspect","HasDepthAndStencilAspects","GetDepthFormatOnly","GetSample","sampleCount"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Engines/WebGPU/webgpuTextureHelper.js"],"sourcesContent":["import { ILog2 } from \"../../Maths/math.scalar.functions.js\";\n\n/** @internal */\nexport class WebGPUTextureHelper {\n static ComputeNumMipmapLevels(width, height) {\n return ILog2(Math.max(width, height)) + 1;\n }\n static GetTextureTypeFromFormat(format) {\n switch (format) {\n // One Component = 8 bits unsigned\n case \"r8unorm\" /* WebGPUConstants.TextureFormat.R8Unorm */:\n case \"r8uint\" /* WebGPUConstants.TextureFormat.R8Uint */:\n case \"rg8unorm\" /* WebGPUConstants.TextureFormat.RG8Unorm */:\n case \"rg8uint\" /* WebGPUConstants.TextureFormat.RG8Uint */:\n case \"rgba8unorm\" /* WebGPUConstants.TextureFormat.RGBA8Unorm */:\n case \"rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.RGBA8UnormSRGB */:\n case \"rgba8uint\" /* WebGPUConstants.TextureFormat.RGBA8Uint */:\n case \"bgra8unorm\" /* WebGPUConstants.TextureFormat.BGRA8Unorm */:\n case \"bgra8unorm-srgb\" /* WebGPUConstants.TextureFormat.BGRA8UnormSRGB */:\n case \"rgb10a2uint\" /* WebGPUConstants.TextureFormat.RGB10A2UINT */: // composite format - let's say it's byte...\n case \"rgb10a2unorm\" /* WebGPUConstants.TextureFormat.RGB10A2Unorm */: // composite format - let's say it's byte...\n case \"rgb9e5ufloat\" /* WebGPUConstants.TextureFormat.RGB9E5UFloat */: // composite format - let's say it's byte...\n case \"rg11b10ufloat\" /* WebGPUConstants.TextureFormat.RG11B10UFloat */: // composite format - let's say it's byte...\n case \"bc7-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC7RGBAUnorm */:\n case \"bc7-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC7RGBAUnormSRGB */:\n case \"bc6h-rgb-ufloat\" /* WebGPUConstants.TextureFormat.BC6HRGBUFloat */:\n case \"bc5-rg-unorm\" /* WebGPUConstants.TextureFormat.BC5RGUnorm */:\n case \"bc3-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC3RGBAUnorm */:\n case \"bc3-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC3RGBAUnormSRGB */:\n case \"bc2-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC2RGBAUnorm */:\n case \"bc2-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC2RGBAUnormSRGB */:\n case \"bc4-r-unorm\" /* WebGPUConstants.TextureFormat.BC4RUnorm */:\n case \"bc1-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC1RGBAUnorm */:\n case \"bc1-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC1RGBAUnormSRGB */:\n case \"etc2-rgb8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGB8Unorm */:\n case \"etc2-rgb8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGB8UnormSRGB */:\n case \"etc2-rgb8a1unorm\" /* WebGPUConstants.TextureFormat.ETC2RGB8A1Unorm */:\n case \"etc2-rgb8a1unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGB8A1UnormSRGB */:\n case \"etc2-rgba8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGBA8Unorm */:\n case \"etc2-rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGBA8UnormSRGB */:\n case \"eac-r11unorm\" /* WebGPUConstants.TextureFormat.EACR11Unorm */:\n case \"eac-rg11unorm\" /* WebGPUConstants.TextureFormat.EACRG11Unorm */:\n case \"astc-4x4-unorm\" /* WebGPUConstants.TextureFormat.ASTC4x4Unorm */:\n case \"astc-4x4-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC4x4UnormSRGB */:\n case \"astc-5x4-unorm\" /* WebGPUConstants.TextureFormat.ASTC5x4Unorm */:\n case \"astc-5x4-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC5x4UnormSRGB */:\n case \"astc-5x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC5x5Unorm */:\n case \"astc-5x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC5x5UnormSRGB */:\n case \"astc-6x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC6x5Unorm */:\n case \"astc-6x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC6x5UnormSRGB */:\n case \"astc-6x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC6x6Unorm */:\n case \"astc-6x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC6x6UnormSRGB */:\n case \"astc-8x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x5Unorm */:\n case \"astc-8x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x5UnormSRGB */:\n case \"astc-8x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x6Unorm */:\n case \"astc-8x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x6UnormSRGB */:\n case \"astc-8x8-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x8Unorm */:\n case \"astc-8x8-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x8UnormSRGB */:\n case \"astc-10x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x5Unorm */:\n case \"astc-10x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x5UnormSRGB */:\n case \"astc-10x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x6Unorm */:\n case \"astc-10x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x6UnormSRGB */:\n case \"astc-10x8-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x8Unorm */:\n case \"astc-10x8-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x8UnormSRGB */:\n case \"astc-10x10-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x10Unorm */:\n case \"astc-10x10-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x10UnormSRGB */:\n case \"astc-12x10-unorm\" /* WebGPUConstants.TextureFormat.ASTC12x10Unorm */:\n case \"astc-12x10-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC12x10UnormSRGB */:\n case \"astc-12x12-unorm\" /* WebGPUConstants.TextureFormat.ASTC12x12Unorm */:\n case \"astc-12x12-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC12x12UnormSRGB */:\n case \"stencil8\" /* WebGPUConstants.TextureFormat.Stencil8 */:\n return 0;\n // One Component = 8 bits signed\n case \"r8snorm\" /* WebGPUConstants.TextureFormat.R8Snorm */:\n case \"r8sint\" /* WebGPUConstants.TextureFormat.R8Sint */:\n case \"rg8snorm\" /* WebGPUConstants.TextureFormat.RG8Snorm */:\n case \"rg8sint\" /* WebGPUConstants.TextureFormat.RG8Sint */:\n case \"rgba8snorm\" /* WebGPUConstants.TextureFormat.RGBA8Snorm */:\n case \"rgba8sint\" /* WebGPUConstants.TextureFormat.RGBA8Sint */:\n case \"bc6h-rgb-float\" /* WebGPUConstants.TextureFormat.BC6HRGBFloat */:\n case \"bc5-rg-snorm\" /* WebGPUConstants.TextureFormat.BC5RGSnorm */:\n case \"bc4-r-snorm\" /* WebGPUConstants.TextureFormat.BC4RSnorm */:\n case \"eac-r11snorm\" /* WebGPUConstants.TextureFormat.EACR11Snorm */:\n case \"eac-rg11snorm\" /* WebGPUConstants.TextureFormat.EACRG11Snorm */:\n return 3;\n // One component = 16 bits unsigned\n case \"r16uint\" /* WebGPUConstants.TextureFormat.R16Uint */:\n case \"r16unorm\" /* WebGPUConstants.TextureFormat.R16Unorm */:\n case \"rg16unorm\" /* WebGPUConstants.TextureFormat.RG16Unorm */:\n case \"rgba16unorm\" /* WebGPUConstants.TextureFormat.RGBA16Unorm */:\n case \"rg16uint\" /* WebGPUConstants.TextureFormat.RG16Uint */:\n case \"rgba16uint\" /* WebGPUConstants.TextureFormat.RGBA16Uint */:\n case \"depth16unorm\" /* WebGPUConstants.TextureFormat.Depth16Unorm */:\n return 5;\n // One component = 16 bits signed\n case \"r16sint\" /* WebGPUConstants.TextureFormat.R16Sint */:\n case \"r16snorm\" /* WebGPUConstants.TextureFormat.R16Snorm */:\n case \"rg16snorm\" /* WebGPUConstants.TextureFormat.RG16Snorm */:\n case \"rgba16snorm\" /* WebGPUConstants.TextureFormat.RGBA16Snorm */:\n case \"rg16sint\" /* WebGPUConstants.TextureFormat.RG16Sint */:\n case \"rgba16sint\" /* WebGPUConstants.TextureFormat.RGBA16Sint */:\n return 4;\n case \"r16float\" /* WebGPUConstants.TextureFormat.R16Float */:\n case \"rg16float\" /* WebGPUConstants.TextureFormat.RG16Float */:\n case \"rgba16float\" /* WebGPUConstants.TextureFormat.RGBA16Float */:\n return 2;\n // One component = 32 bits unsigned\n case \"r32uint\" /* WebGPUConstants.TextureFormat.R32Uint */:\n case \"rg32uint\" /* WebGPUConstants.TextureFormat.RG32Uint */:\n case \"rgba32uint\" /* WebGPUConstants.TextureFormat.RGBA32Uint */:\n return 7;\n // One component = 32 bits signed\n case \"r32sint\" /* WebGPUConstants.TextureFormat.R32Sint */:\n case \"rg32sint\" /* WebGPUConstants.TextureFormat.RG32Sint */:\n case \"rgba32sint\" /* WebGPUConstants.TextureFormat.RGBA32Sint */:\n return 7;\n case \"r32float\" /* WebGPUConstants.TextureFormat.R32Float */:\n case \"rg32float\" /* WebGPUConstants.TextureFormat.RG32Float */:\n case \"rgba32float\" /* WebGPUConstants.TextureFormat.RGBA32Float */:\n case \"depth32float\" /* WebGPUConstants.TextureFormat.Depth32Float */:\n case \"depth32float-stencil8\" /* WebGPUConstants.TextureFormat.Depth32FloatStencil8 */:\n case \"depth24plus\" /* WebGPUConstants.TextureFormat.Depth24Plus */:\n case \"depth24plus-stencil8\" /* WebGPUConstants.TextureFormat.Depth24PlusStencil8 */:\n return 1;\n }\n return 0;\n }\n static GetBlockInformationFromFormat(format) {\n switch (format) {\n // 8 bits formats\n case \"r8unorm\" /* WebGPUConstants.TextureFormat.R8Unorm */:\n case \"r8snorm\" /* WebGPUConstants.TextureFormat.R8Snorm */:\n case \"r8uint\" /* WebGPUConstants.TextureFormat.R8Uint */:\n case \"r8sint\" /* WebGPUConstants.TextureFormat.R8Sint */:\n return { width: 1, height: 1, length: 1 };\n // 16 bits formats\n case \"r16uint\" /* WebGPUConstants.TextureFormat.R16Uint */:\n case \"r16sint\" /* WebGPUConstants.TextureFormat.R16Sint */:\n case \"r16unorm\" /* WebGPUConstants.TextureFormat.R16Unorm */:\n case \"rg16unorm\" /* WebGPUConstants.TextureFormat.RG16Unorm */:\n case \"rgba16unorm\" /* WebGPUConstants.TextureFormat.RGBA16Unorm */:\n case \"r16snorm\" /* WebGPUConstants.TextureFormat.R16Snorm */:\n case \"rg16snorm\" /* WebGPUConstants.TextureFormat.RG16Snorm */:\n case \"rgba16snorm\" /* WebGPUConstants.TextureFormat.RGBA16Snorm */:\n case \"r16float\" /* WebGPUConstants.TextureFormat.R16Float */:\n case \"rg8unorm\" /* WebGPUConstants.TextureFormat.RG8Unorm */:\n case \"rg8snorm\" /* WebGPUConstants.TextureFormat.RG8Snorm */:\n case \"rg8uint\" /* WebGPUConstants.TextureFormat.RG8Uint */:\n case \"rg8sint\" /* WebGPUConstants.TextureFormat.RG8Sint */:\n return { width: 1, height: 1, length: 2 };\n // 32 bits formats\n case \"r32uint\" /* WebGPUConstants.TextureFormat.R32Uint */:\n case \"r32sint\" /* WebGPUConstants.TextureFormat.R32Sint */:\n case \"r32float\" /* WebGPUConstants.TextureFormat.R32Float */:\n case \"rg16uint\" /* WebGPUConstants.TextureFormat.RG16Uint */:\n case \"rg16sint\" /* WebGPUConstants.TextureFormat.RG16Sint */:\n case \"rg16float\" /* WebGPUConstants.TextureFormat.RG16Float */:\n case \"rgba8unorm\" /* WebGPUConstants.TextureFormat.RGBA8Unorm */:\n case \"rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.RGBA8UnormSRGB */:\n case \"rgba8snorm\" /* WebGPUConstants.TextureFormat.RGBA8Snorm */:\n case \"rgba8uint\" /* WebGPUConstants.TextureFormat.RGBA8Uint */:\n case \"rgba8sint\" /* WebGPUConstants.TextureFormat.RGBA8Sint */:\n case \"bgra8unorm\" /* WebGPUConstants.TextureFormat.BGRA8Unorm */:\n case \"bgra8unorm-srgb\" /* WebGPUConstants.TextureFormat.BGRA8UnormSRGB */:\n case \"rgb9e5ufloat\" /* WebGPUConstants.TextureFormat.RGB9E5UFloat */:\n case \"rgb10a2uint\" /* WebGPUConstants.TextureFormat.RGB10A2UINT */:\n case \"rgb10a2unorm\" /* WebGPUConstants.TextureFormat.RGB10A2Unorm */:\n case \"rg11b10ufloat\" /* WebGPUConstants.TextureFormat.RG11B10UFloat */:\n return { width: 1, height: 1, length: 4 };\n // 64 bits formats\n case \"rg32uint\" /* WebGPUConstants.TextureFormat.RG32Uint */:\n case \"rg32sint\" /* WebGPUConstants.TextureFormat.RG32Sint */:\n case \"rg32float\" /* WebGPUConstants.TextureFormat.RG32Float */:\n case \"rgba16uint\" /* WebGPUConstants.TextureFormat.RGBA16Uint */:\n case \"rgba16sint\" /* WebGPUConstants.TextureFormat.RGBA16Sint */:\n case \"rgba16float\" /* WebGPUConstants.TextureFormat.RGBA16Float */:\n return { width: 1, height: 1, length: 8 };\n // 128 bits formats\n case \"rgba32uint\" /* WebGPUConstants.TextureFormat.RGBA32Uint */:\n case \"rgba32sint\" /* WebGPUConstants.TextureFormat.RGBA32Sint */:\n case \"rgba32float\" /* WebGPUConstants.TextureFormat.RGBA32Float */:\n return { width: 1, height: 1, length: 16 };\n // Depth and stencil formats\n case \"stencil8\" /* WebGPUConstants.TextureFormat.Stencil8 */:\n // eslint-disable-next-line no-throw-literal\n throw \"No fixed size for Stencil8 format!\";\n case \"depth16unorm\" /* WebGPUConstants.TextureFormat.Depth16Unorm */:\n return { width: 1, height: 1, length: 2 };\n case \"depth24plus\" /* WebGPUConstants.TextureFormat.Depth24Plus */:\n // eslint-disable-next-line no-throw-literal\n throw \"No fixed size for Depth24Plus format!\";\n case \"depth24plus-stencil8\" /* WebGPUConstants.TextureFormat.Depth24PlusStencil8 */:\n // eslint-disable-next-line no-throw-literal\n throw \"No fixed size for Depth24PlusStencil8 format!\";\n case \"depth32float\" /* WebGPUConstants.TextureFormat.Depth32Float */:\n return { width: 1, height: 1, length: 4 };\n case \"depth32float-stencil8\" /* WebGPUConstants.TextureFormat.Depth32FloatStencil8 */:\n return { width: 1, height: 1, length: 5 };\n // BC compressed formats usable if \"texture-compression-bc\" is both\n // supported by the device/user agent and enabled in requestDevice.\n case \"bc7-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC7RGBAUnorm */:\n case \"bc7-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC7RGBAUnormSRGB */:\n case \"bc6h-rgb-ufloat\" /* WebGPUConstants.TextureFormat.BC6HRGBUFloat */:\n case \"bc6h-rgb-float\" /* WebGPUConstants.TextureFormat.BC6HRGBFloat */:\n case \"bc5-rg-unorm\" /* WebGPUConstants.TextureFormat.BC5RGUnorm */:\n case \"bc5-rg-snorm\" /* WebGPUConstants.TextureFormat.BC5RGSnorm */:\n case \"bc3-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC3RGBAUnorm */:\n case \"bc3-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC3RGBAUnormSRGB */:\n case \"bc2-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC2RGBAUnorm */:\n case \"bc2-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC2RGBAUnormSRGB */:\n return { width: 4, height: 4, length: 16 };\n case \"bc4-r-unorm\" /* WebGPUConstants.TextureFormat.BC4RUnorm */:\n case \"bc4-r-snorm\" /* WebGPUConstants.TextureFormat.BC4RSnorm */:\n case \"bc1-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC1RGBAUnorm */:\n case \"bc1-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC1RGBAUnormSRGB */:\n return { width: 4, height: 4, length: 8 };\n // ETC2 compressed formats usable if \"texture-compression-etc2\" is both\n // supported by the device/user agent and enabled in requestDevice.\n case \"etc2-rgb8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGB8Unorm */:\n case \"etc2-rgb8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGB8UnormSRGB */:\n case \"etc2-rgb8a1unorm\" /* WebGPUConstants.TextureFormat.ETC2RGB8A1Unorm */:\n case \"etc2-rgb8a1unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGB8A1UnormSRGB */:\n case \"eac-r11unorm\" /* WebGPUConstants.TextureFormat.EACR11Unorm */:\n case \"eac-r11snorm\" /* WebGPUConstants.TextureFormat.EACR11Snorm */:\n return { width: 4, height: 4, length: 8 };\n case \"etc2-rgba8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGBA8Unorm */:\n case \"etc2-rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGBA8UnormSRGB */:\n case \"eac-rg11unorm\" /* WebGPUConstants.TextureFormat.EACRG11Unorm */:\n case \"eac-rg11snorm\" /* WebGPUConstants.TextureFormat.EACRG11Snorm */:\n return { width: 4, height: 4, length: 16 };\n // ASTC compressed formats usable if \"texture-compression-astc\" is both\n // supported by the device/user agent and enabled in requestDevice.\n case \"astc-4x4-unorm\" /* WebGPUConstants.TextureFormat.ASTC4x4Unorm */:\n case \"astc-4x4-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC4x4UnormSRGB */:\n return { width: 4, height: 4, length: 16 };\n case \"astc-5x4-unorm\" /* WebGPUConstants.TextureFormat.ASTC5x4Unorm */:\n case \"astc-5x4-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC5x4UnormSRGB */:\n return { width: 5, height: 4, length: 16 };\n case \"astc-5x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC5x5Unorm */:\n case \"astc-5x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC5x5UnormSRGB */:\n return { width: 5, height: 5, length: 16 };\n case \"astc-6x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC6x5Unorm */:\n case \"astc-6x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC6x5UnormSRGB */:\n return { width: 6, height: 5, length: 16 };\n case \"astc-6x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC6x6Unorm */:\n case \"astc-6x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC6x6UnormSRGB */:\n return { width: 6, height: 6, length: 16 };\n case \"astc-8x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x5Unorm */:\n case \"astc-8x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x5UnormSRGB */:\n return { width: 8, height: 5, length: 16 };\n case \"astc-8x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x6Unorm */:\n case \"astc-8x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x6UnormSRGB */:\n return { width: 8, height: 6, length: 16 };\n case \"astc-8x8-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x8Unorm */:\n case \"astc-8x8-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x8UnormSRGB */:\n return { width: 8, height: 8, length: 16 };\n case \"astc-10x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x5Unorm */:\n case \"astc-10x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x5UnormSRGB */:\n return { width: 10, height: 5, length: 16 };\n case \"astc-10x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x6Unorm */:\n case \"astc-10x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x6UnormSRGB */:\n return { width: 10, height: 6, length: 16 };\n case \"astc-10x8-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x8Unorm */:\n case \"astc-10x8-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x8UnormSRGB */:\n return { width: 10, height: 8, length: 16 };\n case \"astc-10x10-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x10Unorm */:\n case \"astc-10x10-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x10UnormSRGB */:\n return { width: 10, height: 10, length: 16 };\n case \"astc-12x10-unorm\" /* WebGPUConstants.TextureFormat.ASTC12x10Unorm */:\n case \"astc-12x10-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC12x10UnormSRGB */:\n return { width: 12, height: 10, length: 16 };\n case \"astc-12x12-unorm\" /* WebGPUConstants.TextureFormat.ASTC12x12Unorm */:\n case \"astc-12x12-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC12x12UnormSRGB */:\n return { width: 12, height: 12, length: 16 };\n }\n return { width: 1, height: 1, length: 4 };\n }\n static IsHardwareTexture(texture) {\n return !!texture.release;\n }\n static IsInternalTexture(texture) {\n return !!texture.dispose;\n }\n static IsImageBitmap(imageBitmap) {\n return imageBitmap.close !== undefined;\n }\n static IsImageBitmapArray(imageBitmap) {\n return Array.isArray(imageBitmap) && imageBitmap[0].close !== undefined;\n }\n static IsCompressedFormat(format) {\n switch (format) {\n case \"bc7-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC7RGBAUnormSRGB */:\n case \"bc7-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC7RGBAUnorm */:\n case \"bc6h-rgb-float\" /* WebGPUConstants.TextureFormat.BC6HRGBFloat */:\n case \"bc6h-rgb-ufloat\" /* WebGPUConstants.TextureFormat.BC6HRGBUFloat */:\n case \"bc5-rg-snorm\" /* WebGPUConstants.TextureFormat.BC5RGSnorm */:\n case \"bc5-rg-unorm\" /* WebGPUConstants.TextureFormat.BC5RGUnorm */:\n case \"bc4-r-snorm\" /* WebGPUConstants.TextureFormat.BC4RSnorm */:\n case \"bc4-r-unorm\" /* WebGPUConstants.TextureFormat.BC4RUnorm */:\n case \"bc3-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC3RGBAUnormSRGB */:\n case \"bc3-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC3RGBAUnorm */:\n case \"bc2-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC2RGBAUnormSRGB */:\n case \"bc2-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC2RGBAUnorm */:\n case \"bc1-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC1RGBAUnormSRGB */:\n case \"bc1-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC1RGBAUnorm */:\n case \"etc2-rgb8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGB8Unorm */:\n case \"etc2-rgb8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGB8UnormSRGB */:\n case \"etc2-rgb8a1unorm\" /* WebGPUConstants.TextureFormat.ETC2RGB8A1Unorm */:\n case \"etc2-rgb8a1unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGB8A1UnormSRGB */:\n case \"etc2-rgba8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGBA8Unorm */:\n case \"etc2-rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGBA8UnormSRGB */:\n case \"eac-r11unorm\" /* WebGPUConstants.TextureFormat.EACR11Unorm */:\n case \"eac-r11snorm\" /* WebGPUConstants.TextureFormat.EACR11Snorm */:\n case \"eac-rg11unorm\" /* WebGPUConstants.TextureFormat.EACRG11Unorm */:\n case \"eac-rg11snorm\" /* WebGPUConstants.TextureFormat.EACRG11Snorm */:\n case \"astc-4x4-unorm\" /* WebGPUConstants.TextureFormat.ASTC4x4Unorm */:\n case \"astc-4x4-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC4x4UnormSRGB */:\n case \"astc-5x4-unorm\" /* WebGPUConstants.TextureFormat.ASTC5x4Unorm */:\n case \"astc-5x4-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC5x4UnormSRGB */:\n case \"astc-5x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC5x5Unorm */:\n case \"astc-5x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC5x5UnormSRGB */:\n case \"astc-6x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC6x5Unorm */:\n case \"astc-6x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC6x5UnormSRGB */:\n case \"astc-6x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC6x6Unorm */:\n case \"astc-6x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC6x6UnormSRGB */:\n case \"astc-8x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x5Unorm */:\n case \"astc-8x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x5UnormSRGB */:\n case \"astc-8x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x6Unorm */:\n case \"astc-8x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x6UnormSRGB */:\n case \"astc-8x8-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x8Unorm */:\n case \"astc-8x8-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x8UnormSRGB */:\n case \"astc-10x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x5Unorm */:\n case \"astc-10x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x5UnormSRGB */:\n case \"astc-10x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x6Unorm */:\n case \"astc-10x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x6UnormSRGB */:\n case \"astc-10x8-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x8Unorm */:\n case \"astc-10x8-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x8UnormSRGB */:\n case \"astc-10x10-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x10Unorm */:\n case \"astc-10x10-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x10UnormSRGB */:\n case \"astc-12x10-unorm\" /* WebGPUConstants.TextureFormat.ASTC12x10Unorm */:\n case \"astc-12x10-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC12x10UnormSRGB */:\n case \"astc-12x12-unorm\" /* WebGPUConstants.TextureFormat.ASTC12x12Unorm */:\n case \"astc-12x12-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC12x12UnormSRGB */:\n return true;\n }\n return false;\n }\n static GetWebGPUTextureFormat(type, format, useSRGBBuffer = false) {\n switch (format) {\n case 15:\n return \"depth16unorm\" /* WebGPUConstants.TextureFormat.Depth16Unorm */;\n case 16:\n return \"depth24plus\" /* WebGPUConstants.TextureFormat.Depth24Plus */;\n case 13:\n return \"depth24plus-stencil8\" /* WebGPUConstants.TextureFormat.Depth24PlusStencil8 */;\n case 14:\n return \"depth32float\" /* WebGPUConstants.TextureFormat.Depth32Float */;\n case 18:\n return \"depth32float-stencil8\" /* WebGPUConstants.TextureFormat.Depth32FloatStencil8 */;\n case 19:\n return \"stencil8\" /* WebGPUConstants.TextureFormat.Stencil8 */;\n case 36492:\n return useSRGBBuffer ? \"bc7-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC7RGBAUnormSRGB */ : \"bc7-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC7RGBAUnorm */;\n case 36495:\n return \"bc6h-rgb-ufloat\" /* WebGPUConstants.TextureFormat.BC6HRGBUFloat */;\n case 36494:\n return \"bc6h-rgb-float\" /* WebGPUConstants.TextureFormat.BC6HRGBFloat */;\n case 33779:\n return useSRGBBuffer ? \"bc3-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC3RGBAUnormSRGB */ : \"bc3-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC3RGBAUnorm */;\n case 33778:\n return useSRGBBuffer ? \"bc2-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC2RGBAUnormSRGB */ : \"bc2-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC2RGBAUnorm */;\n case 33777:\n case 33776:\n return useSRGBBuffer ? \"bc1-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC1RGBAUnormSRGB */ : \"bc1-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC1RGBAUnorm */;\n case 37808:\n return useSRGBBuffer ? \"astc-4x4-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC4x4UnormSRGB */ : \"astc-4x4-unorm\" /* WebGPUConstants.TextureFormat.ASTC4x4Unorm */;\n case 36196:\n case 37492:\n return useSRGBBuffer ? \"etc2-rgb8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGB8UnormSRGB */ : \"etc2-rgb8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGB8Unorm */;\n case 37496:\n return useSRGBBuffer ? \"etc2-rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGBA8UnormSRGB */ : \"etc2-rgba8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGBA8Unorm */;\n }\n switch (type) {\n case 3:\n switch (format) {\n case 6:\n return \"r8snorm\" /* WebGPUConstants.TextureFormat.R8Snorm */;\n case 7:\n return \"rg8snorm\" /* WebGPUConstants.TextureFormat.RG8Snorm */;\n case 4:\n // eslint-disable-next-line no-throw-literal\n throw \"RGB format not supported in WebGPU\";\n case 8:\n return \"r8sint\" /* WebGPUConstants.TextureFormat.R8Sint */;\n case 9:\n return \"rg8sint\" /* WebGPUConstants.TextureFormat.RG8Sint */;\n case 10:\n // eslint-disable-next-line no-throw-literal\n throw \"RGB_INTEGER format not supported in WebGPU\";\n case 11:\n return \"rgba8sint\" /* WebGPUConstants.TextureFormat.RGBA8Sint */;\n default:\n return \"rgba8snorm\" /* WebGPUConstants.TextureFormat.RGBA8Snorm */;\n }\n case 0:\n switch (format) {\n case 6:\n return \"r8unorm\" /* WebGPUConstants.TextureFormat.R8Unorm */;\n case 7:\n return \"rg8unorm\" /* WebGPUConstants.TextureFormat.RG8Unorm */;\n case 4:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_RGB format not supported in WebGPU\";\n case 5:\n return useSRGBBuffer ? \"rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.RGBA8UnormSRGB */ : \"rgba8unorm\" /* WebGPUConstants.TextureFormat.RGBA8Unorm */;\n case 12:\n return useSRGBBuffer ? \"bgra8unorm-srgb\" /* WebGPUConstants.TextureFormat.BGRA8UnormSRGB */ : \"bgra8unorm\" /* WebGPUConstants.TextureFormat.BGRA8Unorm */;\n case 8:\n return \"r8uint\" /* WebGPUConstants.TextureFormat.R8Uint */;\n case 9:\n return \"rg8uint\" /* WebGPUConstants.TextureFormat.RG8Uint */;\n case 10:\n // eslint-disable-next-line no-throw-literal\n throw \"RGB_INTEGER format not supported in WebGPU\";\n case 11:\n return \"rgba8uint\" /* WebGPUConstants.TextureFormat.RGBA8Uint */;\n case 0:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_ALPHA format not supported in WebGPU\";\n case 1:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_LUMINANCE format not supported in WebGPU\";\n case 2:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_LUMINANCE_ALPHA format not supported in WebGPU\";\n default:\n return \"rgba8unorm\" /* WebGPUConstants.TextureFormat.RGBA8Unorm */;\n }\n case 4:\n switch (format) {\n case 8:\n return \"r16sint\" /* WebGPUConstants.TextureFormat.R16Sint */;\n case 9:\n return \"rg16sint\" /* WebGPUConstants.TextureFormat.RG16Sint */;\n case 10:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU\";\n case 11:\n return \"rgba16sint\" /* WebGPUConstants.TextureFormat.RGBA16Sint */;\n default:\n return \"rgba16sint\" /* WebGPUConstants.TextureFormat.RGBA16Sint */;\n }\n case 5:\n switch (format) {\n case 8:\n return \"r16uint\" /* WebGPUConstants.TextureFormat.R16Uint */;\n case 9:\n return \"rg16uint\" /* WebGPUConstants.TextureFormat.RG16Uint */;\n case 10:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU\";\n case 11:\n return \"rgba16uint\" /* WebGPUConstants.TextureFormat.RGBA16Uint */;\n default:\n return \"rgba16uint\" /* WebGPUConstants.TextureFormat.RGBA16Uint */;\n }\n case 6:\n switch (format) {\n case 8:\n return \"r32sint\" /* WebGPUConstants.TextureFormat.R32Sint */;\n case 9:\n return \"rg32sint\" /* WebGPUConstants.TextureFormat.RG32Sint */;\n case 10:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU\";\n case 11:\n return \"rgba32sint\" /* WebGPUConstants.TextureFormat.RGBA32Sint */;\n default:\n return \"rgba32sint\" /* WebGPUConstants.TextureFormat.RGBA32Sint */;\n }\n case 7: // Refers to UNSIGNED_INT\n switch (format) {\n case 8:\n return \"r32uint\" /* WebGPUConstants.TextureFormat.R32Uint */;\n case 9:\n return \"rg32uint\" /* WebGPUConstants.TextureFormat.RG32Uint */;\n case 10:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU\";\n case 11:\n return \"rgba32uint\" /* WebGPUConstants.TextureFormat.RGBA32Uint */;\n default:\n return \"rgba32uint\" /* WebGPUConstants.TextureFormat.RGBA32Uint */;\n }\n case 1:\n switch (format) {\n case 6:\n return \"r32float\" /* WebGPUConstants.TextureFormat.R32Float */; // By default. Other possibility is R16Float.\n case 7:\n return \"rg32float\" /* WebGPUConstants.TextureFormat.RG32Float */; // By default. Other possibility is RG16Float.\n case 4:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_RGB format not supported in WebGPU\";\n case 5:\n return \"rgba32float\" /* WebGPUConstants.TextureFormat.RGBA32Float */; // By default. Other possibility is RGBA16Float.\n default:\n return \"rgba32float\" /* WebGPUConstants.TextureFormat.RGBA32Float */;\n }\n case 2:\n switch (format) {\n case 6:\n return \"r16float\" /* WebGPUConstants.TextureFormat.R16Float */;\n case 7:\n return \"rg16float\" /* WebGPUConstants.TextureFormat.RG16Float */;\n case 4:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_RGB format not supported in WebGPU\";\n case 5:\n return \"rgba16float\" /* WebGPUConstants.TextureFormat.RGBA16Float */;\n default:\n return \"rgba16float\" /* WebGPUConstants.TextureFormat.RGBA16Float */;\n }\n case 10:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTURETYPE_UNSIGNED_SHORT_5_6_5 format not supported in WebGPU\";\n case 13:\n switch (format) {\n case 5:\n return \"rg11b10ufloat\" /* WebGPUConstants.TextureFormat.RG11B10UFloat */;\n case 11:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_RGBA_INTEGER format not supported in WebGPU when type is TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV\";\n default:\n return \"rg11b10ufloat\" /* WebGPUConstants.TextureFormat.RG11B10UFloat */;\n }\n case 14:\n switch (format) {\n case 5:\n return \"rgb9e5ufloat\" /* WebGPUConstants.TextureFormat.RGB9E5UFloat */;\n case 11:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTUREFORMAT_RGBA_INTEGER format not supported in WebGPU when type is TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV\";\n default:\n return \"rgb9e5ufloat\" /* WebGPUConstants.TextureFormat.RGB9E5UFloat */;\n }\n case 8:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4 format not supported in WebGPU\";\n case 9:\n // eslint-disable-next-line no-throw-literal\n throw \"TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1 format not supported in WebGPU\";\n case 11:\n switch (format) {\n case 5:\n return \"rgb10a2unorm\" /* WebGPUConstants.TextureFormat.RGB10A2Unorm */;\n case 11:\n return \"rgb10a2uint\" /* WebGPUConstants.TextureFormat.RGB10A2UINT */;\n default:\n return \"rgb10a2unorm\" /* WebGPUConstants.TextureFormat.RGB10A2Unorm */;\n }\n }\n return useSRGBBuffer ? \"rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.RGBA8UnormSRGB */ : \"rgba8unorm\" /* WebGPUConstants.TextureFormat.RGBA8Unorm */;\n }\n static GetNumChannelsFromWebGPUTextureFormat(format) {\n switch (format) {\n case \"r8unorm\" /* WebGPUConstants.TextureFormat.R8Unorm */:\n case \"r8snorm\" /* WebGPUConstants.TextureFormat.R8Snorm */:\n case \"r8uint\" /* WebGPUConstants.TextureFormat.R8Uint */:\n case \"r8sint\" /* WebGPUConstants.TextureFormat.R8Sint */:\n case \"bc4-r-unorm\" /* WebGPUConstants.TextureFormat.BC4RUnorm */:\n case \"bc4-r-snorm\" /* WebGPUConstants.TextureFormat.BC4RSnorm */:\n case \"r16uint\" /* WebGPUConstants.TextureFormat.R16Uint */:\n case \"r16sint\" /* WebGPUConstants.TextureFormat.R16Sint */:\n case \"depth16unorm\" /* WebGPUConstants.TextureFormat.Depth16Unorm */:\n case \"r16float\" /* WebGPUConstants.TextureFormat.R16Float */:\n case \"r16unorm\" /* WebGPUConstants.TextureFormat.R16Unorm */:\n case \"r16snorm\" /* WebGPUConstants.TextureFormat.R16Snorm */:\n case \"r32uint\" /* WebGPUConstants.TextureFormat.R32Uint */:\n case \"r32sint\" /* WebGPUConstants.TextureFormat.R32Sint */:\n case \"r32float\" /* WebGPUConstants.TextureFormat.R32Float */:\n case \"depth32float\" /* WebGPUConstants.TextureFormat.Depth32Float */:\n case \"stencil8\" /* WebGPUConstants.TextureFormat.Stencil8 */:\n case \"depth24plus\" /* WebGPUConstants.TextureFormat.Depth24Plus */:\n case \"eac-r11unorm\" /* WebGPUConstants.TextureFormat.EACR11Unorm */:\n case \"eac-r11snorm\" /* WebGPUConstants.TextureFormat.EACR11Snorm */:\n return 1;\n case \"rg8unorm\" /* WebGPUConstants.TextureFormat.RG8Unorm */:\n case \"rg8snorm\" /* WebGPUConstants.TextureFormat.RG8Snorm */:\n case \"rg8uint\" /* WebGPUConstants.TextureFormat.RG8Uint */:\n case \"rg8sint\" /* WebGPUConstants.TextureFormat.RG8Sint */:\n case \"depth32float-stencil8\" /* WebGPUConstants.TextureFormat.Depth32FloatStencil8 */:\n case \"bc5-rg-unorm\" /* WebGPUConstants.TextureFormat.BC5RGUnorm */:\n case \"bc5-rg-snorm\" /* WebGPUConstants.TextureFormat.BC5RGSnorm */:\n case \"rg16uint\" /* WebGPUConstants.TextureFormat.RG16Uint */:\n case \"rg16sint\" /* WebGPUConstants.TextureFormat.RG16Sint */:\n case \"rg16float\" /* WebGPUConstants.TextureFormat.RG16Float */:\n case \"rg16unorm\" /* WebGPUConstants.TextureFormat.RG16Unorm */:\n case \"rg16snorm\" /* WebGPUConstants.TextureFormat.RG16Snorm */:\n case \"rg32uint\" /* WebGPUConstants.TextureFormat.RG32Uint */:\n case \"rg32sint\" /* WebGPUConstants.TextureFormat.RG32Sint */:\n case \"rg32float\" /* WebGPUConstants.TextureFormat.RG32Float */:\n case \"depth24plus-stencil8\" /* WebGPUConstants.TextureFormat.Depth24PlusStencil8 */:\n case \"eac-rg11unorm\" /* WebGPUConstants.TextureFormat.EACRG11Unorm */:\n case \"eac-rg11snorm\" /* WebGPUConstants.TextureFormat.EACRG11Snorm */:\n return 2;\n case \"rgb9e5ufloat\" /* WebGPUConstants.TextureFormat.RGB9E5UFloat */:\n case \"rg11b10ufloat\" /* WebGPUConstants.TextureFormat.RG11B10UFloat */:\n case \"bc6h-rgb-ufloat\" /* WebGPUConstants.TextureFormat.BC6HRGBUFloat */:\n case \"bc6h-rgb-float\" /* WebGPUConstants.TextureFormat.BC6HRGBFloat */:\n case \"etc2-rgb8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGB8Unorm */:\n case \"etc2-rgb8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGB8UnormSRGB */:\n return 3;\n case \"rgba8unorm\" /* WebGPUConstants.TextureFormat.RGBA8Unorm */:\n case \"rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.RGBA8UnormSRGB */:\n case \"rgba8snorm\" /* WebGPUConstants.TextureFormat.RGBA8Snorm */:\n case \"rgba8uint\" /* WebGPUConstants.TextureFormat.RGBA8Uint */:\n case \"rgba8sint\" /* WebGPUConstants.TextureFormat.RGBA8Sint */:\n case \"bgra8unorm\" /* WebGPUConstants.TextureFormat.BGRA8Unorm */:\n case \"bgra8unorm-srgb\" /* WebGPUConstants.TextureFormat.BGRA8UnormSRGB */:\n case \"rgba16unorm\" /* WebGPUConstants.TextureFormat.RGBA16Unorm */:\n case \"rgba16snorm\" /* WebGPUConstants.TextureFormat.RGBA16Snorm */:\n case \"rgb10a2uint\" /* WebGPUConstants.TextureFormat.RGB10A2UINT */:\n case \"rgb10a2unorm\" /* WebGPUConstants.TextureFormat.RGB10A2Unorm */:\n case \"bc7-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC7RGBAUnorm */:\n case \"bc7-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC7RGBAUnormSRGB */:\n case \"bc3-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC3RGBAUnorm */:\n case \"bc3-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC3RGBAUnormSRGB */:\n case \"bc2-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC2RGBAUnorm */:\n case \"bc2-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC2RGBAUnormSRGB */:\n case \"bc1-rgba-unorm\" /* WebGPUConstants.TextureFormat.BC1RGBAUnorm */:\n case \"bc1-rgba-unorm-srgb\" /* WebGPUConstants.TextureFormat.BC1RGBAUnormSRGB */:\n case \"rgba16uint\" /* WebGPUConstants.TextureFormat.RGBA16Uint */:\n case \"rgba16sint\" /* WebGPUConstants.TextureFormat.RGBA16Sint */:\n case \"rgba16float\" /* WebGPUConstants.TextureFormat.RGBA16Float */:\n case \"rgba32uint\" /* WebGPUConstants.TextureFormat.RGBA32Uint */:\n case \"rgba32sint\" /* WebGPUConstants.TextureFormat.RGBA32Sint */:\n case \"rgba32float\" /* WebGPUConstants.TextureFormat.RGBA32Float */:\n case \"etc2-rgb8a1unorm\" /* WebGPUConstants.TextureFormat.ETC2RGB8A1Unorm */:\n case \"etc2-rgb8a1unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGB8A1UnormSRGB */:\n case \"etc2-rgba8unorm\" /* WebGPUConstants.TextureFormat.ETC2RGBA8Unorm */:\n case \"etc2-rgba8unorm-srgb\" /* WebGPUConstants.TextureFormat.ETC2RGBA8UnormSRGB */:\n case \"astc-4x4-unorm\" /* WebGPUConstants.TextureFormat.ASTC4x4Unorm */:\n case \"astc-4x4-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC4x4UnormSRGB */:\n case \"astc-5x4-unorm\" /* WebGPUConstants.TextureFormat.ASTC5x4Unorm */:\n case \"astc-5x4-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC5x4UnormSRGB */:\n case \"astc-5x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC5x5Unorm */:\n case \"astc-5x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC5x5UnormSRGB */:\n case \"astc-6x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC6x5Unorm */:\n case \"astc-6x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC6x5UnormSRGB */:\n case \"astc-6x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC6x6Unorm */:\n case \"astc-6x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC6x6UnormSRGB */:\n case \"astc-8x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x5Unorm */:\n case \"astc-8x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x5UnormSRGB */:\n case \"astc-8x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x6Unorm */:\n case \"astc-8x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x6UnormSRGB */:\n case \"astc-8x8-unorm\" /* WebGPUConstants.TextureFormat.ASTC8x8Unorm */:\n case \"astc-8x8-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC8x8UnormSRGB */:\n case \"astc-10x5-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x5Unorm */:\n case \"astc-10x5-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x5UnormSRGB */:\n case \"astc-10x6-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x6Unorm */:\n case \"astc-10x6-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x6UnormSRGB */:\n case \"astc-10x8-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x8Unorm */:\n case \"astc-10x8-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x8UnormSRGB */:\n case \"astc-10x10-unorm\" /* WebGPUConstants.TextureFormat.ASTC10x10Unorm */:\n case \"astc-10x10-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC10x10UnormSRGB */:\n case \"astc-12x10-unorm\" /* WebGPUConstants.TextureFormat.ASTC12x10Unorm */:\n case \"astc-12x10-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC12x10UnormSRGB */:\n case \"astc-12x12-unorm\" /* WebGPUConstants.TextureFormat.ASTC12x12Unorm */:\n case \"astc-12x12-unorm-srgb\" /* WebGPUConstants.TextureFormat.ASTC12x12UnormSRGB */:\n return 4;\n }\n // eslint-disable-next-line no-throw-literal\n throw `Unknown format ${format}!`;\n }\n static HasStencilAspect(format) {\n switch (format) {\n case \"stencil8\" /* WebGPUConstants.TextureFormat.Stencil8 */:\n case \"depth32float-stencil8\" /* WebGPUConstants.TextureFormat.Depth32FloatStencil8 */:\n case \"depth24plus-stencil8\" /* WebGPUConstants.TextureFormat.Depth24PlusStencil8 */:\n return true;\n }\n return false;\n }\n static HasDepthAndStencilAspects(format) {\n switch (format) {\n case \"depth32float-stencil8\" /* WebGPUConstants.TextureFormat.Depth32FloatStencil8 */:\n case \"depth24plus-stencil8\" /* WebGPUConstants.TextureFormat.Depth24PlusStencil8 */:\n return true;\n }\n return false;\n }\n static GetDepthFormatOnly(format) {\n switch (format) {\n case \"depth16unorm\" /* WebGPUConstants.TextureFormat.Depth16Unorm */:\n return \"depth16unorm\" /* WebGPUConstants.TextureFormat.Depth16Unorm */;\n case \"depth24plus\" /* WebGPUConstants.TextureFormat.Depth24Plus */:\n return \"depth24plus\" /* WebGPUConstants.TextureFormat.Depth24Plus */;\n case \"depth24plus-stencil8\" /* WebGPUConstants.TextureFormat.Depth24PlusStencil8 */:\n return \"depth24plus\" /* WebGPUConstants.TextureFormat.Depth24Plus */;\n case \"depth32float\" /* WebGPUConstants.TextureFormat.Depth32Float */:\n return \"depth32float\" /* WebGPUConstants.TextureFormat.Depth32Float */;\n case \"depth32float-stencil8\" /* WebGPUConstants.TextureFormat.Depth32FloatStencil8 */:\n return \"depth32float\" /* WebGPUConstants.TextureFormat.Depth32Float */;\n }\n return format;\n }\n static GetSample(sampleCount) {\n // WebGPU only supports 1 or 4\n return sampleCount > 1 ? 4 : 1;\n }\n}\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,sCAAsC;;AAE5D;AACA,OAAO,MAAMC,mBAAmB,CAAC;EAC7B,OAAOC,sBAAsBA,CAACC,KAAK,EAAEC,MAAM,EAAE;IACzC,OAAOJ,KAAK,CAACK,IAAI,CAACC,GAAG,CAACH,KAAK,EAAEC,MAAM,CAAC,CAAC,GAAG,CAAC;EAC7C;EACA,OAAOG,wBAAwBA,CAACC,MAAM,EAAE;IACpC,QAAQA,MAAM;MACV;MACA,KAAK,SAAS,CAAC;MACf,KAAK,QAAQ,CAAC;MACd,KAAK,UAAU,CAAC;MAChB,KAAK,SAAS,CAAC;MACf,KAAK,YAAY,CAAC;MAClB,KAAK,iBAAiB,CAAC;MACvB,KAAK,WAAW,CAAC;MACjB,KAAK,YAAY,CAAC;MAClB,KAAK,iBAAiB,CAAC;MACvB,KAAK,aAAa,CAAC,gDAAgD,CAAC;MACpE,KAAK,cAAc,CAAC,iDAAiD,CAAC;MACtE,KAAK,cAAc,CAAC,iDAAiD,CAAC;MACtE,KAAK,eAAe,CAAC,kDAAkD,CAAC;MACxE,KAAK,gBAAgB,CAAC;MACtB,KAAK,qBAAqB,CAAC;MAC3B,KAAK,iBAAiB,CAAC;MACvB,KAAK,cAAc,CAAC;MACpB,KAAK,gBAAgB,CAAC;MACtB,KAAK,qBAAqB,CAAC;MAC3B,KAAK,gBAAgB,CAAC;MACtB,KAAK,qBAAqB,CAAC;MAC3B,KAAK,aAAa,CAAC;MACnB,KAAK,gBAAgB,CAAC;MACtB,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