// GENERATED FILE - DO NOT EDIT.
// Generated by gen_angle_format_table.py using data from angle_format_data.json
//
// Copyright 2016 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// ANGLE Format table:
//   Queries for typed format information from the ANGLE format enum.

#include "libANGLE/renderer/Format.h"

#include "image_util/copyimage.h"
#include "image_util/generatemip.h"
#include "image_util/loadimage.h"

namespace angle
{

// static
const Format &Format::Get(ID id)
{
    // clang-format off
    switch (id)
    {
        case ID::A16_FLOAT:
        {
            static const Format info(ID::A16_FLOAT,
                                     GL_ALPHA16F_EXT,
                                     GL_ALPHA16F_EXT,
                                     GenerateMip<A16F>,
                                     ReadColor<A16F, GLfloat>);
            return info;
        }
        case ID::A32_FLOAT:
        {
            static const Format info(ID::A32_FLOAT,
                                     GL_ALPHA32F_EXT,
                                     GL_ALPHA32F_EXT,
                                     GenerateMip<A32F>,
                                     ReadColor<A32F, GLfloat>);
            return info;
        }
        case ID::A8_UNORM:
        {
            static const Format info(ID::A8_UNORM,
                                     GL_ALPHA8_EXT,
                                     GL_ALPHA8_EXT,
                                     GenerateMip<A8>,
                                     ReadColor<A8, GLfloat>);
            return info;
        }
        case ID::ASTC_10x10_SRGB_BLOCK:
        {
            static const Format info(ID::ASTC_10x10_SRGB_BLOCK,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_10x10_UNORM_BLOCK:
        {
            static const Format info(ID::ASTC_10x10_UNORM_BLOCK,
                                     GL_COMPRESSED_RGBA_ASTC_10x10_KHR,
                                     GL_COMPRESSED_RGBA_ASTC_10x10_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_10x5_SRGB_BLOCK:
        {
            static const Format info(ID::ASTC_10x5_SRGB_BLOCK,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_10x5_UNORM_BLOCK:
        {
            static const Format info(ID::ASTC_10x5_UNORM_BLOCK,
                                     GL_COMPRESSED_RGBA_ASTC_10x5_KHR,
                                     GL_COMPRESSED_RGBA_ASTC_10x5_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_10x6_SRGB_BLOCK:
        {
            static const Format info(ID::ASTC_10x6_SRGB_BLOCK,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_10x6_UNORM_BLOCK:
        {
            static const Format info(ID::ASTC_10x6_UNORM_BLOCK,
                                     GL_COMPRESSED_RGBA_ASTC_10x6_KHR,
                                     GL_COMPRESSED_RGBA_ASTC_10x6_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_10x8_SRGB_BLOCK:
        {
            static const Format info(ID::ASTC_10x8_SRGB_BLOCK,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_10x8_UNORM_BLOCK:
        {
            static const Format info(ID::ASTC_10x8_UNORM_BLOCK,
                                     GL_COMPRESSED_RGBA_ASTC_10x8_KHR,
                                     GL_COMPRESSED_RGBA_ASTC_10x8_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_12x10_SRGB_BLOCK:
        {
            static const Format info(ID::ASTC_12x10_SRGB_BLOCK,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_12x10_UNORM_BLOCK:
        {
            static const Format info(ID::ASTC_12x10_UNORM_BLOCK,
                                     GL_COMPRESSED_RGBA_ASTC_12x10_KHR,
                                     GL_COMPRESSED_RGBA_ASTC_12x10_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_12x12_SRGB_BLOCK:
        {
            static const Format info(ID::ASTC_12x12_SRGB_BLOCK,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_12x12_UNORM_BLOCK:
        {
            static const Format info(ID::ASTC_12x12_UNORM_BLOCK,
                                     GL_COMPRESSED_RGBA_ASTC_12x12_KHR,
                                     GL_COMPRESSED_RGBA_ASTC_12x12_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_4x4_SRGB_BLOCK:
        {
            static const Format info(ID::ASTC_4x4_SRGB_BLOCK,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_4x4_UNORM_BLOCK:
        {
            static const Format info(ID::ASTC_4x4_UNORM_BLOCK,
                                     GL_COMPRESSED_RGBA_ASTC_4x4_KHR,
                                     GL_COMPRESSED_RGBA_ASTC_4x4_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_5x4_SRGB_BLOCK:
        {
            static const Format info(ID::ASTC_5x4_SRGB_BLOCK,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_5x4_UNORM_BLOCK:
        {
            static const Format info(ID::ASTC_5x4_UNORM_BLOCK,
                                     GL_COMPRESSED_RGBA_ASTC_5x4_KHR,
                                     GL_COMPRESSED_RGBA_ASTC_5x4_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_5x5_SRGB_BLOCK:
        {
            static const Format info(ID::ASTC_5x5_SRGB_BLOCK,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_5x5_UNORM_BLOCK:
        {
            static const Format info(ID::ASTC_5x5_UNORM_BLOCK,
                                     GL_COMPRESSED_RGBA_ASTC_5x5_KHR,
                                     GL_COMPRESSED_RGBA_ASTC_5x5_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_6x5_SRGB_BLOCK:
        {
            static const Format info(ID::ASTC_6x5_SRGB_BLOCK,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_6x5_UNORM_BLOCK:
        {
            static const Format info(ID::ASTC_6x5_UNORM_BLOCK,
                                     GL_COMPRESSED_RGBA_ASTC_6x5_KHR,
                                     GL_COMPRESSED_RGBA_ASTC_6x5_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_6x6_SRGB_BLOCK:
        {
            static const Format info(ID::ASTC_6x6_SRGB_BLOCK,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_6x6_UNORM_BLOCK:
        {
            static const Format info(ID::ASTC_6x6_UNORM_BLOCK,
                                     GL_COMPRESSED_RGBA_ASTC_6x6_KHR,
                                     GL_COMPRESSED_RGBA_ASTC_6x6_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_8x5_SRGB_BLOCK:
        {
            static const Format info(ID::ASTC_8x5_SRGB_BLOCK,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_8x5_UNORM_BLOCK:
        {
            static const Format info(ID::ASTC_8x5_UNORM_BLOCK,
                                     GL_COMPRESSED_RGBA_ASTC_8x5_KHR,
                                     GL_COMPRESSED_RGBA_ASTC_8x5_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_8x6_SRGB_BLOCK:
        {
            static const Format info(ID::ASTC_8x6_SRGB_BLOCK,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_8x6_UNORM_BLOCK:
        {
            static const Format info(ID::ASTC_8x6_UNORM_BLOCK,
                                     GL_COMPRESSED_RGBA_ASTC_8x6_KHR,
                                     GL_COMPRESSED_RGBA_ASTC_8x6_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_8x8_SRGB_BLOCK:
        {
            static const Format info(ID::ASTC_8x8_SRGB_BLOCK,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ASTC_8x8_UNORM_BLOCK:
        {
            static const Format info(ID::ASTC_8x8_UNORM_BLOCK,
                                     GL_COMPRESSED_RGBA_ASTC_8x8_KHR,
                                     GL_COMPRESSED_RGBA_ASTC_8x8_KHR,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::B4G4R4A4_UNORM:
        {
            static const Format info(ID::B4G4R4A4_UNORM,
                                     GL_BGRA4_ANGLEX,
                                     GL_RGBA4,
                                     GenerateMip<A4R4G4B4>,
                                     ReadColor<A4R4G4B4, GLfloat>);
            return info;
        }
        case ID::B5G5R5A1_UNORM:
        {
            static const Format info(ID::B5G5R5A1_UNORM,
                                     GL_BGR5_A1_ANGLEX,
                                     GL_RGB5_A1,
                                     GenerateMip<A1R5G5B5>,
                                     ReadColor<A1R5G5B5, GLfloat>);
            return info;
        }
        case ID::B5G6R5_UNORM:
        {
            static const Format info(ID::B5G6R5_UNORM,
                                     GL_BGR565_ANGLEX,
                                     GL_RGB565,
                                     GenerateMip<B5G6R5>,
                                     ReadColor<B5G6R5, GLfloat>);
            return info;
        }
        case ID::B8G8R8A8_UNORM:
        {
            static const Format info(ID::B8G8R8A8_UNORM,
                                     GL_BGRA8_EXT,
                                     GL_BGRA8_EXT,
                                     GenerateMip<B8G8R8A8>,
                                     ReadColor<B8G8R8A8, GLfloat>);
            return info;
        }
        case ID::B8G8R8X8_UNORM:
        {
            static const Format info(ID::B8G8R8X8_UNORM,
                                     GL_BGRA8_EXT,
                                     GL_BGRA8_EXT,
                                     GenerateMip<B8G8R8X8>,
                                     ReadColor<B8G8R8X8, GLfloat>);
            return info;
        }
        case ID::BC1_RGBA_UNORM_BLOCK:
        {
            static const Format info(ID::BC1_RGBA_UNORM_BLOCK,
                                     GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,
                                     GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::BC1_RGB_UNORM_BLOCK:
        {
            static const Format info(ID::BC1_RGB_UNORM_BLOCK,
                                     GL_COMPRESSED_RGB_S3TC_DXT1_EXT,
                                     GL_COMPRESSED_RGB_S3TC_DXT1_EXT,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::BC2_RGBA_UNORM_BLOCK:
        {
            static const Format info(ID::BC2_RGBA_UNORM_BLOCK,
                                     GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE,
                                     GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::BC3_RGBA_UNORM_BLOCK:
        {
            static const Format info(ID::BC3_RGBA_UNORM_BLOCK,
                                     GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE,
                                     GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::D16_UNORM:
        {
            static const Format info(ID::D16_UNORM,
                                     GL_DEPTH_COMPONENT16,
                                     GL_DEPTH_COMPONENT16,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::D24_UNORM:
        {
            static const Format info(ID::D24_UNORM,
                                     GL_DEPTH_COMPONENT24,
                                     GL_DEPTH_COMPONENT24,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::D24_UNORM_S8_UINT:
        {
            static const Format info(ID::D24_UNORM_S8_UINT,
                                     GL_DEPTH24_STENCIL8,
                                     GL_DEPTH24_STENCIL8,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::D32_FLOAT:
        {
            static const Format info(ID::D32_FLOAT,
                                     GL_DEPTH_COMPONENT32F,
                                     GL_DEPTH_COMPONENT32F,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::D32_FLOAT_S8X24_UINT:
        {
            static const Format info(ID::D32_FLOAT_S8X24_UINT,
                                     GL_DEPTH32F_STENCIL8,
                                     GL_DEPTH32F_STENCIL8,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::D32_UNORM:
        {
            static const Format info(ID::D32_UNORM,
                                     GL_DEPTH_COMPONENT32_OES,
                                     GL_DEPTH_COMPONENT32_OES,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::EAC_R11G11_SNORM_BLOCK:
        {
            static const Format info(ID::EAC_R11G11_SNORM_BLOCK,
                                     GL_COMPRESSED_SIGNED_RG11_EAC,
                                     GL_COMPRESSED_SIGNED_RG11_EAC,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::EAC_R11G11_UNORM_BLOCK:
        {
            static const Format info(ID::EAC_R11G11_UNORM_BLOCK,
                                     GL_COMPRESSED_RG11_EAC,
                                     GL_COMPRESSED_RG11_EAC,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::EAC_R11_SNORM_BLOCK:
        {
            static const Format info(ID::EAC_R11_SNORM_BLOCK,
                                     GL_COMPRESSED_SIGNED_R11_EAC,
                                     GL_COMPRESSED_SIGNED_R11_EAC,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::EAC_R11_UNORM_BLOCK:
        {
            static const Format info(ID::EAC_R11_UNORM_BLOCK,
                                     GL_COMPRESSED_R11_EAC,
                                     GL_COMPRESSED_R11_EAC,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ETC2_R8G8B8A1_SRGB_BLOCK:
        {
            static const Format info(ID::ETC2_R8G8B8A1_SRGB_BLOCK,
                                     GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,
                                     GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ETC2_R8G8B8A1_UNORM_BLOCK:
        {
            static const Format info(ID::ETC2_R8G8B8A1_UNORM_BLOCK,
                                     GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,
                                     GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ETC2_R8G8B8A8_SRGB_BLOCK:
        {
            static const Format info(ID::ETC2_R8G8B8A8_SRGB_BLOCK,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,
                                     GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ETC2_R8G8B8A8_UNORM_BLOCK:
        {
            static const Format info(ID::ETC2_R8G8B8A8_UNORM_BLOCK,
                                     GL_COMPRESSED_RGBA8_ETC2_EAC,
                                     GL_COMPRESSED_RGBA8_ETC2_EAC,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ETC2_R8G8B8_SRGB_BLOCK:
        {
            static const Format info(ID::ETC2_R8G8B8_SRGB_BLOCK,
                                     GL_COMPRESSED_SRGB8_ETC2,
                                     GL_COMPRESSED_SRGB8_ETC2,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::ETC2_R8G8B8_UNORM_BLOCK:
        {
            static const Format info(ID::ETC2_R8G8B8_UNORM_BLOCK,
                                     GL_COMPRESSED_RGB8_ETC2,
                                     GL_COMPRESSED_RGB8_ETC2,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::L16A16_FLOAT:
        {
            static const Format info(ID::L16A16_FLOAT,
                                     GL_LUMINANCE_ALPHA16F_EXT,
                                     GL_LUMINANCE_ALPHA16F_EXT,
                                     GenerateMip<L16A16F>,
                                     ReadColor<L16A16F, GLfloat>);
            return info;
        }
        case ID::L16_FLOAT:
        {
            static const Format info(ID::L16_FLOAT,
                                     GL_LUMINANCE16F_EXT,
                                     GL_LUMINANCE16F_EXT,
                                     GenerateMip<L16F>,
                                     ReadColor<L16F, GLfloat>);
            return info;
        }
        case ID::L32A32_FLOAT:
        {
            static const Format info(ID::L32A32_FLOAT,
                                     GL_LUMINANCE_ALPHA32F_EXT,
                                     GL_LUMINANCE_ALPHA32F_EXT,
                                     GenerateMip<L32A32F>,
                                     ReadColor<L32A32F, GLfloat>);
            return info;
        }
        case ID::L32_FLOAT:
        {
            static const Format info(ID::L32_FLOAT,
                                     GL_LUMINANCE32F_EXT,
                                     GL_LUMINANCE32F_EXT,
                                     GenerateMip<L32F>,
                                     ReadColor<L32F, GLfloat>);
            return info;
        }
        case ID::L8A8_UNORM:
        {
            static const Format info(ID::L8A8_UNORM,
                                     GL_LUMINANCE8_ALPHA8_EXT,
                                     GL_LUMINANCE8_ALPHA8_EXT,
                                     GenerateMip<L8A8>,
                                     ReadColor<L8A8, GLfloat>);
            return info;
        }
        case ID::L8_UNORM:
        {
            static const Format info(ID::L8_UNORM,
                                     GL_LUMINANCE8_EXT,
                                     GL_LUMINANCE8_EXT,
                                     GenerateMip<L8>,
                                     ReadColor<L8, GLfloat>);
            return info;
        }
        case ID::NONE:
        {
            static const Format info(ID::NONE,
                                     GL_NONE,
                                     GL_NONE,
                                     nullptr,
                                     nullptr);
            return info;
        }
        case ID::R10G10B10A2_UINT:
        {
            static const Format info(ID::R10G10B10A2_UINT,
                                     GL_RGB10_A2UI,
                                     GL_RGB10_A2UI,
                                     GenerateMip<R10G10B10A2>,
                                     ReadColor<R10G10B10A2, GLuint>);
            return info;
        }
        case ID::R10G10B10A2_UNORM:
        {
            static const Format info(ID::R10G10B10A2_UNORM,
                                     GL_RGB10_A2,
                                     GL_RGB10_A2,
                                     GenerateMip<R10G10B10A2>,
                                     ReadColor<R10G10B10A2, GLfloat>);
            return info;
        }
        case ID::R11G11B10_FLOAT:
        {
            static const Format info(ID::R11G11B10_FLOAT,
                                     GL_R11F_G11F_B10F,
                                     GL_R11F_G11F_B10F,
                                     GenerateMip<R11G11B10F>,
                                     ReadColor<R11G11B10F, GLfloat>);
            return info;
        }
        case ID::R16G16B16A16_FLOAT:
        {
            static const Format info(ID::R16G16B16A16_FLOAT,
                                     GL_RGBA16F,
                                     GL_RGBA16F,
                                     GenerateMip<R16G16B16A16F>,
                                     ReadColor<R16G16B16A16F, GLfloat>);
            return info;
        }
        case ID::R16G16B16A16_SINT:
        {
            static const Format info(ID::R16G16B16A16_SINT,
                                     GL_RGBA16I,
                                     GL_RGBA16I,
                                     GenerateMip<R16G16B16A16S>,
                                     ReadColor<R16G16B16A16S, GLint>);
            return info;
        }
        case ID::R16G16B16A16_SNORM:
        {
            static const Format info(ID::R16G16B16A16_SNORM,
                                     GL_RGBA16_SNORM_EXT,
                                     GL_RGBA16_SNORM_EXT,
                                     GenerateMip<R16G16B16A16S>,
                                     ReadColor<R16G16B16A16S, GLfloat>);
            return info;
        }
        case ID::R16G16B16A16_UINT:
        {
            static const Format info(ID::R16G16B16A16_UINT,
                                     GL_RGBA16UI,
                                     GL_RGBA16UI,
                                     GenerateMip<R16G16B16A16>,
                                     ReadColor<R16G16B16A16, GLuint>);
            return info;
        }
        case ID::R16G16B16A16_UNORM:
        {
            static const Format info(ID::R16G16B16A16_UNORM,
                                     GL_RGBA16_EXT,
                                     GL_RGBA16_EXT,
                                     GenerateMip<R16G16B16A16>,
                                     ReadColor<R16G16B16A16, GLfloat>);
            return info;
        }
        case ID::R16G16B16_FLOAT:
        {
            static const Format info(ID::R16G16B16_FLOAT,
                                     GL_RGB16F,
                                     GL_RGB16F,
                                     GenerateMip<R16G16B16F>,
                                     ReadColor<R16G16B16F, GLfloat>);
            return info;
        }
        case ID::R16G16B16_SINT:
        {
            static const Format info(ID::R16G16B16_SINT,
                                     GL_RGB16I,
                                     GL_RGB16I,
                                     GenerateMip<R16G16B16S>,
                                     ReadColor<R16G16B16S, GLint>);
            return info;
        }
        case ID::R16G16B16_SNORM:
        {
            static const Format info(ID::R16G16B16_SNORM,
                                     GL_RGB16_SNORM_EXT,
                                     GL_RGB16_SNORM_EXT,
                                     GenerateMip<R16G16B16S>,
                                     ReadColor<R16G16B16S, GLfloat>);
            return info;
        }
        case ID::R16G16B16_UINT:
        {
            static const Format info(ID::R16G16B16_UINT,
                                     GL_RGB16UI,
                                     GL_RGB16UI,
                                     GenerateMip<R16G16B16>,
                                     ReadColor<R16G16B16, GLuint>);
            return info;
        }
        case ID::R16G16B16_UNORM:
        {
            static const Format info(ID::R16G16B16_UNORM,
                                     GL_RGB16_EXT,
                                     GL_RGB16_EXT,
                                     GenerateMip<R16G16B16>,
                                     ReadColor<R16G16B16, GLfloat>);
            return info;
        }
        case ID::R16G16_FLOAT:
        {
            static const Format info(ID::R16G16_FLOAT,
                                     GL_RG16F,
                                     GL_RG16F,
                                     GenerateMip<R16G16F>,
                                     ReadColor<R16G16F, GLfloat>);
            return info;
        }
        case ID::R16G16_SINT:
        {
            static const Format info(ID::R16G16_SINT,
                                     GL_RG16I,
                                     GL_RG16I,
                                     GenerateMip<R16G16S>,
                                     ReadColor<R16G16S, GLint>);
            return info;
        }
        case ID::R16G16_SNORM:
        {
            static const Format info(ID::R16G16_SNORM,
                                     GL_RG16_SNORM_EXT,
                                     GL_RG16_SNORM_EXT,
                                     GenerateMip<R16G16S>,
                                     ReadColor<R16G16S, GLfloat>);
            return info;
        }
        case ID::R16G16_UINT:
        {
            static const Format info(ID::R16G16_UINT,
                                     GL_RG16UI,
                                     GL_RG16UI,
                                     GenerateMip<R16G16>,
                                     ReadColor<R16G16, GLuint>);
            return info;
        }
        case ID::R16G16_UNORM:
        {
            static const Format info(ID::R16G16_UNORM,
                                     GL_RG16_EXT,
                                     GL_RG16_EXT,
                                     GenerateMip<R16G16>,
                                     ReadColor<R16G16, GLfloat>);
            return info;
        }
        case ID::R16_FLOAT:
        {
            static const Format info(ID::R16_FLOAT,
                                     GL_R16F,
                                     GL_R16F,
                                     GenerateMip<R16F>,
                                     ReadColor<R16F, GLfloat>);
            return info;
        }
        case ID::R16_SINT:
        {
            static const Format info(ID::R16_SINT,
                                     GL_R16I,
                                     GL_R16I,
                                     GenerateMip<R16S>,
                                     ReadColor<R16S, GLint>);
            return info;
        }
        case ID::R16_SNORM:
        {
            static const Format info(ID::R16_SNORM,
                                     GL_R16_SNORM_EXT,
                                     GL_R16_SNORM_EXT,
                                     GenerateMip<R16S>,
                                     ReadColor<R16S, GLfloat>);
            return info;
        }
        case ID::R16_UINT:
        {
            static const Format info(ID::R16_UINT,
                                     GL_R16UI,
                                     GL_R16UI,
                                     GenerateMip<R16>,
                                     ReadColor<R16, GLuint>);
            return info;
        }
        case ID::R16_UNORM:
        {
            static const Format info(ID::R16_UNORM,
                                     GL_R16_EXT,
                                     GL_R16_EXT,
                                     GenerateMip<R16>,
                                     ReadColor<R16, GLfloat>);
            return info;
        }
        case ID::R32G32B32A32_FLOAT:
        {
            static const Format info(ID::R32G32B32A32_FLOAT,
                                     GL_RGBA32F,
                                     GL_RGBA32F,
                                     GenerateMip<R32G32B32A32F>,
                                     ReadColor<R32G32B32A32F, GLfloat>);
            return info;
        }
        case ID::R32G32B32A32_SINT:
        {
            static const Format info(ID::R32G32B32A32_SINT,
                                     GL_RGBA32I,
                                     GL_RGBA32I,
                                     GenerateMip<R32G32B32A32S>,
                                     ReadColor<R32G32B32A32S, GLint>);
            return info;
        }
        case ID::R32G32B32A32_UINT:
        {
            static const Format info(ID::R32G32B32A32_UINT,
                                     GL_RGBA32UI,
                                     GL_RGBA32UI,
                                     GenerateMip<R32G32B32A32>,
                                     ReadColor<R32G32B32A32, GLuint>);
            return info;
        }
        case ID::R32G32B32_FLOAT:
        {
            static const Format info(ID::R32G32B32_FLOAT,
                                     GL_RGB32F,
                                     GL_RGB32F,
                                     GenerateMip<R32G32B32F>,
                                     ReadColor<R32G32B32F, GLfloat>);
            return info;
        }
        case ID::R32G32B32_SINT:
        {
            static const Format info(ID::R32G32B32_SINT,
                                     GL_RGB32I,
                                     GL_RGB32I,
                                     GenerateMip<R32G32B32S>,
                                     ReadColor<R32G32B32S, GLint>);
            return info;
        }
        case ID::R32G32B32_UINT:
        {
            static const Format info(ID::R32G32B32_UINT,
                                     GL_RGB32UI,
                                     GL_RGB32UI,
                                     GenerateMip<R32G32B32>,
                                     ReadColor<R32G32B32, GLuint>);
            return info;
        }
        case ID::R32G32_FLOAT:
        {
            static const Format info(ID::R32G32_FLOAT,
                                     GL_RG32F,
                                     GL_RG32F,
                                     GenerateMip<R32G32F>,
                                     ReadColor<R32G32F, GLfloat>);
            return info;
        }
        case ID::R32G32_SINT:
        {
            static const Format info(ID::R32G32_SINT,
                                     GL_RG32I,
                                     GL_RG32I,
                                     GenerateMip<R32G32S>,
                                     ReadColor<R32G32S, GLint>);
            return info;
        }
        case ID::R32G32_UINT:
        {
            static const Format info(ID::R32G32_UINT,
                                     GL_RG32UI,
                                     GL_RG32UI,
                                     GenerateMip<R32G32>,
                                     ReadColor<R32G32, GLuint>);
            return info;
        }
        case ID::R32_FLOAT:
        {
            static const Format info(ID::R32_FLOAT,
                                     GL_R32F,
                                     GL_R32F,
                                     GenerateMip<R32F>,
                                     ReadColor<R32F, GLfloat>);
            return info;
        }
        case ID::R32_SINT:
        {
            static const Format info(ID::R32_SINT,
                                     GL_R32I,
                                     GL_R32I,
                                     GenerateMip<R32S>,
                                     ReadColor<R32S, GLint>);
            return info;
        }
        case ID::R32_UINT:
        {
            static const Format info(ID::R32_UINT,
                                     GL_R32UI,
                                     GL_R32UI,
                                     GenerateMip<R32>,
                                     ReadColor<R32, GLuint>);
            return info;
        }
        case ID::R4G4B4A4_UNORM:
        {
            static const Format info(ID::R4G4B4A4_UNORM,
                                     GL_RGBA4,
                                     GL_RGBA4,
                                     GenerateMip<R4G4B4A4>,
                                     ReadColor<R4G4B4A4, GLfloat>);
            return info;
        }
        case ID::R5G5B5A1_UNORM:
        {
            static const Format info(ID::R5G5B5A1_UNORM,
                                     GL_RGB5_A1,
                                     GL_RGB5_A1,
                                     GenerateMip<R5G5B5A1>,
                                     ReadColor<R5G5B5A1, GLfloat>);
            return info;
        }
        case ID::R5G6B5_UNORM:
        {
            static const Format info(ID::R5G6B5_UNORM,
                                     GL_RGB565,
                                     GL_RGB565,
                                     GenerateMip<R5G6B5>,
                                     ReadColor<R5G6B5, GLfloat>);
            return info;
        }
        case ID::R8G8B8A8_SINT:
        {
            static const Format info(ID::R8G8B8A8_SINT,
                                     GL_RGBA8I,
                                     GL_RGBA8I,
                                     GenerateMip<R8G8B8A8S>,
                                     ReadColor<R8G8B8A8S, GLint>);
            return info;
        }
        case ID::R8G8B8A8_SNORM:
        {
            static const Format info(ID::R8G8B8A8_SNORM,
                                     GL_RGBA8_SNORM,
                                     GL_RGBA8_SNORM,
                                     GenerateMip<R8G8B8A8S>,
                                     ReadColor<R8G8B8A8S, GLfloat>);
            return info;
        }
        case ID::R8G8B8A8_UINT:
        {
            static const Format info(ID::R8G8B8A8_UINT,
                                     GL_RGBA8UI,
                                     GL_RGBA8UI,
                                     GenerateMip<R8G8B8A8>,
                                     ReadColor<R8G8B8A8, GLuint>);
            return info;
        }
        case ID::R8G8B8A8_UNORM:
        {
            static const Format info(ID::R8G8B8A8_UNORM,
                                     GL_RGBA8,
                                     GL_RGBA8,
                                     GenerateMip<R8G8B8A8>,
                                     ReadColor<R8G8B8A8, GLfloat>);
            return info;
        }
        case ID::R8G8B8A8_UNORM_SRGB:
        {
            static const Format info(ID::R8G8B8A8_UNORM_SRGB,
                                     GL_SRGB8_ALPHA8,
                                     GL_SRGB8_ALPHA8,
                                     GenerateMip<R8G8B8A8>,
                                     ReadColor<R8G8B8A8, GLfloat>);
            return info;
        }
        case ID::R8G8B8_SINT:
        {
            static const Format info(ID::R8G8B8_SINT,
                                     GL_RGB8I,
                                     GL_RGB8I,
                                     GenerateMip<R8G8B8S>,
                                     ReadColor<R8G8B8S, GLint>);
            return info;
        }
        case ID::R8G8B8_SNORM:
        {
            static const Format info(ID::R8G8B8_SNORM,
                                     GL_RGB8_SNORM,
                                     GL_RGB8_SNORM,
                                     GenerateMip<R8G8B8S>,
                                     ReadColor<R8G8B8S, GLfloat>);
            return info;
        }
        case ID::R8G8B8_UINT:
        {
            static const Format info(ID::R8G8B8_UINT,
                                     GL_RGB8UI,
                                     GL_RGB8UI,
                                     GenerateMip<R8G8B8>,
                                     ReadColor<R8G8B8, GLuint>);
            return info;
        }
        case ID::R8G8B8_UNORM:
        {
            static const Format info(ID::R8G8B8_UNORM,
                                     GL_RGB8,
                                     GL_RGB8,
                                     GenerateMip<R8G8B8>,
                                     ReadColor<R8G8B8, GLfloat>);
            return info;
        }
        case ID::R8G8B8_UNORM_SRGB:
        {
            static const Format info(ID::R8G8B8_UNORM_SRGB,
                                     GL_SRGB8,
                                     GL_SRGB8,
                                     GenerateMip<R8G8B8>,
                                     ReadColor<R8G8B8, GLfloat>);
            return info;
        }
        case ID::R8G8_SINT:
        {
            static const Format info(ID::R8G8_SINT,
                                     GL_RG8I,
                                     GL_RG8I,
                                     GenerateMip<R8G8S>,
                                     ReadColor<R8G8S, GLint>);
            return info;
        }
        case ID::R8G8_SNORM:
        {
            static const Format info(ID::R8G8_SNORM,
                                     GL_RG8_SNORM,
                                     GL_RG8_SNORM,
                                     GenerateMip<R8G8S>,
                                     ReadColor<R8G8S, GLfloat>);
            return info;
        }
        case ID::R8G8_UINT:
        {
            static const Format info(ID::R8G8_UINT,
                                     GL_RG8UI,
                                     GL_RG8UI,
                                     GenerateMip<R8G8>,
                                     ReadColor<R8G8, GLuint>);
            return info;
        }
        case ID::R8G8_UNORM:
        {
            static const Format info(ID::R8G8_UNORM,
                                     GL_RG8,
                                     GL_RG8,
                                     GenerateMip<R8G8>,
                                     ReadColor<R8G8, GLfloat>);
            return info;
        }
        case ID::R8_SINT:
        {
            static const Format info(ID::R8_SINT,
                                     GL_R8I,
                                     GL_R8I,
                                     GenerateMip<R8S>,
                                     ReadColor<R8S, GLint>);
            return info;
        }
        case ID::R8_SNORM:
        {
            static const Format info(ID::R8_SNORM,
                                     GL_R8_SNORM,
                                     GL_R8_SNORM,
                                     GenerateMip<R8S>,
                                     ReadColor<R8S, GLfloat>);
            return info;
        }
        case ID::R8_UINT:
        {
            static const Format info(ID::R8_UINT,
                                     GL_R8UI,
                                     GL_R8UI,
                                     GenerateMip<R8>,
                                     ReadColor<R8, GLuint>);
            return info;
        }
        case ID::R8_UNORM:
        {
            static const Format info(ID::R8_UNORM,
                                     GL_R8,
                                     GL_R8,
                                     GenerateMip<R8>,
                                     ReadColor<R8, GLfloat>);
            return info;
        }
        case ID::R9G9B9E5_SHAREDEXP:
        {
            static const Format info(ID::R9G9B9E5_SHAREDEXP,
                                     GL_RGB9_E5,
                                     GL_RGB9_E5,
                                     GenerateMip<R9G9B9E5>,
                                     ReadColor<R9G9B9E5, GLfloat>);
            return info;
        }
        case ID::S8_UINT:
        {
            static const Format info(ID::S8_UINT,
                                     GL_STENCIL_INDEX8,
                                     GL_STENCIL_INDEX8,
                                     nullptr,
                                     nullptr);
            return info;
        }

        default:
            UNREACHABLE();
            break;
    }
    // clang-format on

    static const Format noneInfo(ID::NONE, GL_NONE, GL_NONE, nullptr, nullptr);
    return noneInfo;
}

}  // namespace angle