// GENERATED FILE - DO NOT EDIT.
// Generated by gen_texture_format_table.py using data from texture_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.
//
// texture_format_table:
//   Queries for full textureFormat information based in internalFormat
//

#include "libANGLE/renderer/d3d/d3d11/texture_format_table.h"

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

#include "libANGLE/renderer/d3d/d3d11/formatutils11.h"
#include "libANGLE/renderer/d3d/d3d11/renderer11_utils.h"
#include "libANGLE/renderer/d3d/d3d11/texture_format_table_utils.h"

using namespace angle;

namespace rx
{

namespace d3d11
{

// static
const Format &Format::Get(GLenum internalFormat,
                          const Renderer11DeviceCaps &deviceCaps)
{
    // clang-format off
    switch (internalFormat)
    {
        case GL_ALPHA16F_EXT:
        {
            static const Format info(GL_ALPHA16F_EXT,
                                     angle::Format::ID::R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     GL_RGBA16F,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_ALPHA32F_EXT:
        {
            static const Format info(GL_ALPHA32F_EXT,
                                     angle::Format::ID::R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     GL_RGBA32F,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_ALPHA8_EXT:
        {
            if (OnlyFL10Plus(deviceCaps))
            {
                static const Format info(GL_ALPHA8_EXT,
                                         angle::Format::ID::A8_UNORM,
                                         DXGI_FORMAT_A8_UNORM,
                                         DXGI_FORMAT_A8_UNORM,
                                         DXGI_FORMAT_A8_UNORM,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_A8_UNORM,
                                         GL_RGBA8,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
            else
            {
                static const Format info(GL_ALPHA8_EXT,
                                         angle::Format::ID::R8G8B8A8_UNORM,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         GL_RGBA8,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
        }
        case GL_BGR565_ANGLEX:
        {
            if (SupportsFormat(DXGI_FORMAT_B5G6R5_UNORM, deviceCaps))
            {
                static const Format info(GL_BGR565_ANGLEX,
                                         angle::Format::ID::B5G6R5_UNORM,
                                         DXGI_FORMAT_B5G6R5_UNORM,
                                         DXGI_FORMAT_B5G6R5_UNORM,
                                         DXGI_FORMAT_B5G6R5_UNORM,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_B5G6R5_UNORM,
                                         GL_RGBA8,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
            else
            {
                static const Format info(GL_BGR565_ANGLEX,
                                         angle::Format::ID::R8G8B8A8_UNORM,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         GL_RGBA8,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
        }
        case GL_BGR5_A1_ANGLEX:
        {
            static const Format info(GL_BGR5_A1_ANGLEX,
                                     angle::Format::ID::B8G8R8A8_UNORM,
                                     DXGI_FORMAT_B8G8R8A8_UNORM,
                                     DXGI_FORMAT_B8G8R8A8_UNORM,
                                     DXGI_FORMAT_B8G8R8A8_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_B8G8R8A8_UNORM,
                                     GL_BGRA8_EXT,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_BGRA4_ANGLEX:
        {
            static const Format info(GL_BGRA4_ANGLEX,
                                     angle::Format::ID::B8G8R8A8_UNORM,
                                     DXGI_FORMAT_B8G8R8A8_UNORM,
                                     DXGI_FORMAT_B8G8R8A8_UNORM,
                                     DXGI_FORMAT_B8G8R8A8_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_B8G8R8A8_UNORM,
                                     GL_BGRA8_EXT,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_BGRA8_EXT:
        {
            static const Format info(GL_BGRA8_EXT,
                                     angle::Format::ID::B8G8R8A8_UNORM,
                                     DXGI_FORMAT_B8G8R8A8_UNORM,
                                     DXGI_FORMAT_B8G8R8A8_UNORM,
                                     DXGI_FORMAT_B8G8R8A8_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_B8G8R8A8_UNORM,
                                     GL_BGRA8_EXT,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_BGRA_EXT:
        {
            static const Format info(GL_BGRA_EXT,
                                     angle::Format::ID::B8G8R8A8_UNORM,
                                     DXGI_FORMAT_B8G8R8A8_UNORM,
                                     DXGI_FORMAT_B8G8R8A8_UNORM,
                                     DXGI_FORMAT_B8G8R8A8_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_B8G8R8A8_UNORM,
                                     GL_BGRA8_EXT,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_R11_EAC:
        {
            static const Format info(GL_COMPRESSED_R11_EAC,
                                     angle::Format::ID::R8_UNORM,
                                     DXGI_FORMAT_R8_UNORM,
                                     DXGI_FORMAT_R8_UNORM,
                                     DXGI_FORMAT_R8_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8_UNORM,
                                     GL_RGBA8,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RG11_EAC:
        {
            static const Format info(GL_COMPRESSED_RG11_EAC,
                                     angle::Format::ID::R8G8_UNORM,
                                     DXGI_FORMAT_R8G8_UNORM,
                                     DXGI_FORMAT_R8G8_UNORM,
                                     DXGI_FORMAT_R8G8_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8_UNORM,
                                     GL_RGBA8,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGB8_ETC2:
        {
            static const Format info(GL_COMPRESSED_RGB8_ETC2,
                                     angle::Format::ID::R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     GL_RGBA8,
                                     Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:
        {
            static const Format info(GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,
                                     angle::Format::ID::R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     GL_RGBA8,
                                     Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGBA8_ETC2_EAC:
        {
            static const Format info(GL_COMPRESSED_RGBA8_ETC2_EAC,
                                     angle::Format::ID::R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     GL_RGBA8,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGBA_ASTC_10x10_KHR:
        {
            static const Format info(GL_COMPRESSED_RGBA_ASTC_10x10_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGBA_ASTC_10x5_KHR:
        {
            static const Format info(GL_COMPRESSED_RGBA_ASTC_10x5_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGBA_ASTC_10x6_KHR:
        {
            static const Format info(GL_COMPRESSED_RGBA_ASTC_10x6_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGBA_ASTC_10x8_KHR:
        {
            static const Format info(GL_COMPRESSED_RGBA_ASTC_10x8_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGBA_ASTC_12x10_KHR:
        {
            static const Format info(GL_COMPRESSED_RGBA_ASTC_12x10_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGBA_ASTC_12x12_KHR:
        {
            static const Format info(GL_COMPRESSED_RGBA_ASTC_12x12_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGBA_ASTC_4x4_KHR:
        {
            static const Format info(GL_COMPRESSED_RGBA_ASTC_4x4_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGBA_ASTC_5x4_KHR:
        {
            static const Format info(GL_COMPRESSED_RGBA_ASTC_5x4_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGBA_ASTC_5x5_KHR:
        {
            static const Format info(GL_COMPRESSED_RGBA_ASTC_5x5_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGBA_ASTC_6x5_KHR:
        {
            static const Format info(GL_COMPRESSED_RGBA_ASTC_6x5_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGBA_ASTC_6x6_KHR:
        {
            static const Format info(GL_COMPRESSED_RGBA_ASTC_6x6_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGBA_ASTC_8x5_KHR:
        {
            static const Format info(GL_COMPRESSED_RGBA_ASTC_8x5_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGBA_ASTC_8x6_KHR:
        {
            static const Format info(GL_COMPRESSED_RGBA_ASTC_8x6_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGBA_ASTC_8x8_KHR:
        {
            static const Format info(GL_COMPRESSED_RGBA_ASTC_8x8_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
        {
            static const Format info(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,
                                     angle::Format::ID::BC1_UNORM,
                                     DXGI_FORMAT_BC1_UNORM,
                                     DXGI_FORMAT_BC1_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_BC1_UNORM,
                                     GL_RGBA8,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE:
        {
            static const Format info(GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE,
                                     angle::Format::ID::BC2_UNORM,
                                     DXGI_FORMAT_BC2_UNORM,
                                     DXGI_FORMAT_BC2_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_BC2_UNORM,
                                     GL_RGBA8,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE:
        {
            static const Format info(GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE,
                                     angle::Format::ID::BC3_UNORM,
                                     DXGI_FORMAT_BC3_UNORM,
                                     DXGI_FORMAT_BC3_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_BC3_UNORM,
                                     GL_RGBA8,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
        {
            static const Format info(GL_COMPRESSED_RGB_S3TC_DXT1_EXT,
                                     angle::Format::ID::BC1_UNORM,
                                     DXGI_FORMAT_BC1_UNORM,
                                     DXGI_FORMAT_BC1_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_BC1_UNORM,
                                     GL_RGBA8,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SIGNED_R11_EAC:
        {
            static const Format info(GL_COMPRESSED_SIGNED_R11_EAC,
                                     angle::Format::ID::R8_SNORM,
                                     DXGI_FORMAT_R8_SNORM,
                                     DXGI_FORMAT_R8_SNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8_SNORM,
                                     GL_RGBA8_SNORM,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SIGNED_RG11_EAC:
        {
            static const Format info(GL_COMPRESSED_SIGNED_RG11_EAC,
                                     angle::Format::ID::R8G8_SNORM,
                                     DXGI_FORMAT_R8G8_SNORM,
                                     DXGI_FORMAT_R8G8_SNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8_SNORM,
                                     GL_RGBA8_SNORM,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:
        {
            static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:
        {
            static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:
        {
            static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:
        {
            static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:
        {
            static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:
        {
            static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:
        {
            static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:
        {
            static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:
        {
            static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:
        {
            static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:
        {
            static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:
        {
            static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:
        {
            static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:
        {
            static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:
        {
            static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,
                                     angle::Format::ID::R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     GL_SRGB8_ALPHA8,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SRGB8_ETC2:
        {
            static const Format info(GL_COMPRESSED_SRGB8_ETC2,
                                     angle::Format::ID::R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     GL_SRGB8_ALPHA8,
                                     Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>,
                                     deviceCaps);
            return info;
        }
        case GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:
        {
            static const Format info(GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,
                                     angle::Format::ID::R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     GL_SRGB8_ALPHA8,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_DEPTH24_STENCIL8:
        {
            if (OnlyFL10Plus(deviceCaps))
            {
                static const Format info(GL_DEPTH24_STENCIL8,
                                         angle::Format::ID::D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_R24G8_TYPELESS,
                                         DXGI_FORMAT_R24_UNORM_X8_TYPELESS,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_R24_UNORM_X8_TYPELESS,
                                         GL_RGBA32F,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
            else
            {
                static const Format info(GL_DEPTH24_STENCIL8,
                                         angle::Format::ID::D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_UNKNOWN,
                                         GL_RGBA32F,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
        }
        case GL_DEPTH32F_STENCIL8:
        {
            static const Format info(GL_DEPTH32F_STENCIL8,
                                     angle::Format::ID::D32_FLOAT_S8X24_UINT,
                                     DXGI_FORMAT_R32G8X24_TYPELESS,
                                     DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_D32_FLOAT_S8X24_UINT,
                                     DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS,
                                     GL_RGBA32F,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_DEPTH_COMPONENT16:
        {
            if (OnlyFL10Plus(deviceCaps))
            {
                static const Format info(GL_DEPTH_COMPONENT16,
                                         angle::Format::ID::D16_UNORM,
                                         DXGI_FORMAT_R16_TYPELESS,
                                         DXGI_FORMAT_R16_UNORM,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_D16_UNORM,
                                         DXGI_FORMAT_R16_UNORM,
                                         GL_RGBA16_EXT,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
            else
            {
                static const Format info(GL_DEPTH_COMPONENT16,
                                         angle::Format::ID::D16_UNORM,
                                         DXGI_FORMAT_D16_UNORM,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_D16_UNORM,
                                         DXGI_FORMAT_UNKNOWN,
                                         GL_RGBA16_EXT,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
        }
        case GL_DEPTH_COMPONENT24:
        {
            if (OnlyFL10Plus(deviceCaps))
            {
                static const Format info(GL_DEPTH_COMPONENT24,
                                         angle::Format::ID::D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_R24G8_TYPELESS,
                                         DXGI_FORMAT_R24_UNORM_X8_TYPELESS,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_R24_UNORM_X8_TYPELESS,
                                         GL_RGBA32F,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
            else
            {
                static const Format info(GL_DEPTH_COMPONENT24,
                                         angle::Format::ID::D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_UNKNOWN,
                                         GL_RGBA32F,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
        }
        case GL_DEPTH_COMPONENT32F:
        {
            static const Format info(GL_DEPTH_COMPONENT32F,
                                     angle::Format::ID::D32_FLOAT,
                                     DXGI_FORMAT_R32_TYPELESS,
                                     DXGI_FORMAT_R32_FLOAT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_D32_FLOAT,
                                     DXGI_FORMAT_R32_FLOAT,
                                     GL_RGBA32F,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_DEPTH_COMPONENT32_OES:
        {
            if (OnlyFL10Plus(deviceCaps))
            {
                static const Format info(GL_DEPTH_COMPONENT32_OES,
                                         angle::Format::ID::D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_R24G8_TYPELESS,
                                         DXGI_FORMAT_R24_UNORM_X8_TYPELESS,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_R24_UNORM_X8_TYPELESS,
                                         GL_RGBA32F,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
            else
            {
                static const Format info(GL_DEPTH_COMPONENT32_OES,
                                         angle::Format::ID::D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_UNKNOWN,
                                         GL_RGBA32F,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
        }
        case GL_ETC1_RGB8_LOSSY_DECODE_ANGLE:
        {
            static const Format info(GL_ETC1_RGB8_LOSSY_DECODE_ANGLE,
                                     angle::Format::ID::BC1_UNORM,
                                     DXGI_FORMAT_BC1_UNORM,
                                     DXGI_FORMAT_BC1_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_BC1_UNORM,
                                     GL_RGBA8,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_ETC1_RGB8_OES:
        {
            static const Format info(GL_ETC1_RGB8_OES,
                                     angle::Format::ID::R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     GL_RGBA8,
                                     Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>,
                                     deviceCaps);
            return info;
        }
        case GL_LUMINANCE16F_EXT:
        {
            static const Format info(GL_LUMINANCE16F_EXT,
                                     angle::Format::ID::R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     GL_RGBA16F,
                                     Initialize4ComponentData<GLhalf, 0x0000, 0x0000, 0x0000, gl::Float16One>,
                                     deviceCaps);
            return info;
        }
        case GL_LUMINANCE32F_EXT:
        {
            static const Format info(GL_LUMINANCE32F_EXT,
                                     angle::Format::ID::R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     GL_RGBA32F,
                                     Initialize4ComponentData<GLfloat, 0x00000000, 0x00000000, 0x00000000, gl::Float32One>,
                                     deviceCaps);
            return info;
        }
        case GL_LUMINANCE8_ALPHA8_EXT:
        {
            static const Format info(GL_LUMINANCE8_ALPHA8_EXT,
                                     angle::Format::ID::R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     GL_RGBA8,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_LUMINANCE8_EXT:
        {
            static const Format info(GL_LUMINANCE8_EXT,
                                     angle::Format::ID::R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     GL_RGBA8,
                                     Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>,
                                     deviceCaps);
            return info;
        }
        case GL_LUMINANCE_ALPHA16F_EXT:
        {
            static const Format info(GL_LUMINANCE_ALPHA16F_EXT,
                                     angle::Format::ID::R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     GL_RGBA16F,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_LUMINANCE_ALPHA32F_EXT:
        {
            static const Format info(GL_LUMINANCE_ALPHA32F_EXT,
                                     angle::Format::ID::R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     GL_RGBA32F,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_NONE:
        {
            static const Format info(GL_NONE,
                                     angle::Format::ID::NONE,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     GL_NONE,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_R11F_G11F_B10F:
        {
            static const Format info(GL_R11F_G11F_B10F,
                                     angle::Format::ID::R11G11B10_FLOAT,
                                     DXGI_FORMAT_R11G11B10_FLOAT,
                                     DXGI_FORMAT_R11G11B10_FLOAT,
                                     DXGI_FORMAT_R11G11B10_FLOAT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R11G11B10_FLOAT,
                                     GL_RGBA16F_EXT,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_R16F:
        {
            static const Format info(GL_R16F,
                                     angle::Format::ID::R16_FLOAT,
                                     DXGI_FORMAT_R16_FLOAT,
                                     DXGI_FORMAT_R16_FLOAT,
                                     DXGI_FORMAT_R16_FLOAT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16_FLOAT,
                                     GL_RGBA16F_EXT,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_R16I:
        {
            static const Format info(GL_R16I,
                                     angle::Format::ID::R16_SINT,
                                     DXGI_FORMAT_R16_SINT,
                                     DXGI_FORMAT_R16_SINT,
                                     DXGI_FORMAT_R16_SINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16_SINT,
                                     GL_RGBA16I,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_R16UI:
        {
            static const Format info(GL_R16UI,
                                     angle::Format::ID::R16_UINT,
                                     DXGI_FORMAT_R16_UINT,
                                     DXGI_FORMAT_R16_UINT,
                                     DXGI_FORMAT_R16_UINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16_UINT,
                                     GL_RGBA16I,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_R16_EXT:
        {
            static const Format info(GL_R16_EXT,
                                     angle::Format::ID::R16_UNORM,
                                     DXGI_FORMAT_R16_UNORM,
                                     DXGI_FORMAT_R16_UNORM,
                                     DXGI_FORMAT_R16_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16_UNORM,
                                     GL_RGBA16_EXT,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_R16_SNORM_EXT:
        {
            static const Format info(GL_R16_SNORM_EXT,
                                     angle::Format::ID::R16_SNORM,
                                     DXGI_FORMAT_R16_SNORM,
                                     DXGI_FORMAT_R16_SNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16_SNORM,
                                     GL_RGBA16_SNORM_EXT,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_R32F:
        {
            static const Format info(GL_R32F,
                                     angle::Format::ID::R32_FLOAT,
                                     DXGI_FORMAT_R32_FLOAT,
                                     DXGI_FORMAT_R32_FLOAT,
                                     DXGI_FORMAT_R32_FLOAT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R32_FLOAT,
                                     GL_RGBA32F,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_R32I:
        {
            static const Format info(GL_R32I,
                                     angle::Format::ID::R32_SINT,
                                     DXGI_FORMAT_R32_SINT,
                                     DXGI_FORMAT_R32_SINT,
                                     DXGI_FORMAT_R32_SINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R32_SINT,
                                     GL_RGBA32I,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_R32UI:
        {
            static const Format info(GL_R32UI,
                                     angle::Format::ID::R32_UINT,
                                     DXGI_FORMAT_R32_UINT,
                                     DXGI_FORMAT_R32_UINT,
                                     DXGI_FORMAT_R32_UINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R32_UINT,
                                     GL_RGBA32I,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_R8:
        {
            static const Format info(GL_R8,
                                     angle::Format::ID::R8_UNORM,
                                     DXGI_FORMAT_R8_UNORM,
                                     DXGI_FORMAT_R8_UNORM,
                                     DXGI_FORMAT_R8_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8_UNORM,
                                     GL_RGBA8,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_R8I:
        {
            static const Format info(GL_R8I,
                                     angle::Format::ID::R8_SINT,
                                     DXGI_FORMAT_R8_SINT,
                                     DXGI_FORMAT_R8_SINT,
                                     DXGI_FORMAT_R8_SINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8_SINT,
                                     GL_RGBA8I,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_R8UI:
        {
            static const Format info(GL_R8UI,
                                     angle::Format::ID::R8_UINT,
                                     DXGI_FORMAT_R8_UINT,
                                     DXGI_FORMAT_R8_UINT,
                                     DXGI_FORMAT_R8_UINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8_UINT,
                                     GL_RGBA8I,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_R8_SNORM:
        {
            static const Format info(GL_R8_SNORM,
                                     angle::Format::ID::R8_SNORM,
                                     DXGI_FORMAT_R8_SNORM,
                                     DXGI_FORMAT_R8_SNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8_SNORM,
                                     GL_RGBA8_SNORM,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RG16F:
        {
            static const Format info(GL_RG16F,
                                     angle::Format::ID::R16G16_FLOAT,
                                     DXGI_FORMAT_R16G16_FLOAT,
                                     DXGI_FORMAT_R16G16_FLOAT,
                                     DXGI_FORMAT_R16G16_FLOAT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16G16_FLOAT,
                                     GL_RGBA16F_EXT,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RG16I:
        {
            static const Format info(GL_RG16I,
                                     angle::Format::ID::R16G16_SINT,
                                     DXGI_FORMAT_R16G16_SINT,
                                     DXGI_FORMAT_R16G16_SINT,
                                     DXGI_FORMAT_R16G16_SINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16G16_SINT,
                                     GL_RGBA16I,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RG16UI:
        {
            static const Format info(GL_RG16UI,
                                     angle::Format::ID::R16G16_UINT,
                                     DXGI_FORMAT_R16G16_UINT,
                                     DXGI_FORMAT_R16G16_UINT,
                                     DXGI_FORMAT_R16G16_UINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16G16_UINT,
                                     GL_RGBA16I,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RG16_EXT:
        {
            static const Format info(GL_RG16_EXT,
                                     angle::Format::ID::R16G16_UNORM,
                                     DXGI_FORMAT_R16G16_UNORM,
                                     DXGI_FORMAT_R16G16_UNORM,
                                     DXGI_FORMAT_R16G16_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16G16_UNORM,
                                     GL_RGBA16_EXT,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RG16_SNORM_EXT:
        {
            static const Format info(GL_RG16_SNORM_EXT,
                                     angle::Format::ID::R16G16_SNORM,
                                     DXGI_FORMAT_R16G16_SNORM,
                                     DXGI_FORMAT_R16G16_SNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16G16_SNORM,
                                     GL_RGBA16_SNORM_EXT,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RG32F:
        {
            static const Format info(GL_RG32F,
                                     angle::Format::ID::R32G32_FLOAT,
                                     DXGI_FORMAT_R32G32_FLOAT,
                                     DXGI_FORMAT_R32G32_FLOAT,
                                     DXGI_FORMAT_R32G32_FLOAT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R32G32_FLOAT,
                                     GL_RGBA32F,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RG32I:
        {
            static const Format info(GL_RG32I,
                                     angle::Format::ID::R32G32_SINT,
                                     DXGI_FORMAT_R32G32_SINT,
                                     DXGI_FORMAT_R32G32_SINT,
                                     DXGI_FORMAT_R32G32_SINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R32G32_SINT,
                                     GL_RGBA32I,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RG32UI:
        {
            static const Format info(GL_RG32UI,
                                     angle::Format::ID::R32G32_UINT,
                                     DXGI_FORMAT_R32G32_UINT,
                                     DXGI_FORMAT_R32G32_UINT,
                                     DXGI_FORMAT_R32G32_UINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R32G32_UINT,
                                     GL_RGBA32I,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RG8:
        {
            static const Format info(GL_RG8,
                                     angle::Format::ID::R8G8_UNORM,
                                     DXGI_FORMAT_R8G8_UNORM,
                                     DXGI_FORMAT_R8G8_UNORM,
                                     DXGI_FORMAT_R8G8_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8_UNORM,
                                     GL_RGBA8,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RG8I:
        {
            static const Format info(GL_RG8I,
                                     angle::Format::ID::R8G8_SINT,
                                     DXGI_FORMAT_R8G8_SINT,
                                     DXGI_FORMAT_R8G8_SINT,
                                     DXGI_FORMAT_R8G8_SINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8_SINT,
                                     GL_RGBA8I,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RG8UI:
        {
            static const Format info(GL_RG8UI,
                                     angle::Format::ID::R8G8_UINT,
                                     DXGI_FORMAT_R8G8_UINT,
                                     DXGI_FORMAT_R8G8_UINT,
                                     DXGI_FORMAT_R8G8_UINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8_UINT,
                                     GL_RGBA8I,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RG8_SNORM:
        {
            static const Format info(GL_RG8_SNORM,
                                     angle::Format::ID::R8G8_SNORM,
                                     DXGI_FORMAT_R8G8_SNORM,
                                     DXGI_FORMAT_R8G8_SNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8_SNORM,
                                     GL_RGBA8_SNORM,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RGB:
        {
            static const Format info(GL_RGB,
                                     angle::Format::ID::R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     GL_RGBA8,
                                     Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>,
                                     deviceCaps);
            return info;
        }
        case GL_RGB10_A2:
        {
            static const Format info(GL_RGB10_A2,
                                     angle::Format::ID::R10G10B10A2_UNORM,
                                     DXGI_FORMAT_R10G10B10A2_UNORM,
                                     DXGI_FORMAT_R10G10B10A2_UNORM,
                                     DXGI_FORMAT_R10G10B10A2_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R10G10B10A2_UNORM,
                                     GL_RGBA16_EXT,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RGB10_A2UI:
        {
            static const Format info(GL_RGB10_A2UI,
                                     angle::Format::ID::R10G10B10A2_UINT,
                                     DXGI_FORMAT_R10G10B10A2_UINT,
                                     DXGI_FORMAT_R10G10B10A2_UINT,
                                     DXGI_FORMAT_R10G10B10A2_UINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R10G10B10A2_UINT,
                                     GL_RGBA16I,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RGB16F:
        {
            static const Format info(GL_RGB16F,
                                     angle::Format::ID::R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     GL_RGBA16F,
                                     Initialize4ComponentData<GLhalf, 0x0000, 0x0000, 0x0000, gl::Float16One>,
                                     deviceCaps);
            return info;
        }
        case GL_RGB16I:
        {
            static const Format info(GL_RGB16I,
                                     angle::Format::ID::R16G16B16A16_SINT,
                                     DXGI_FORMAT_R16G16B16A16_SINT,
                                     DXGI_FORMAT_R16G16B16A16_SINT,
                                     DXGI_FORMAT_R16G16B16A16_SINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16G16B16A16_SINT,
                                     GL_RGBA16I,
                                     Initialize4ComponentData<GLshort, 0x0000, 0x0000, 0x0000, 0x0001>,
                                     deviceCaps);
            return info;
        }
        case GL_RGB16UI:
        {
            static const Format info(GL_RGB16UI,
                                     angle::Format::ID::R16G16B16A16_UINT,
                                     DXGI_FORMAT_R16G16B16A16_UINT,
                                     DXGI_FORMAT_R16G16B16A16_UINT,
                                     DXGI_FORMAT_R16G16B16A16_UINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16G16B16A16_UINT,
                                     GL_RGBA16UI,
                                     Initialize4ComponentData<GLushort, 0x0000, 0x0000, 0x0000, 0x0001>,
                                     deviceCaps);
            return info;
        }
        case GL_RGB16_EXT:
        {
            static const Format info(GL_RGB16_EXT,
                                     angle::Format::ID::R16G16B16A16_UNORM,
                                     DXGI_FORMAT_R16G16B16A16_UNORM,
                                     DXGI_FORMAT_R16G16B16A16_UNORM,
                                     DXGI_FORMAT_R16G16B16A16_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16G16B16A16_UNORM,
                                     GL_RGBA16_EXT,
                                     Initialize4ComponentData<GLubyte, 0x0000, 0x0000, 0x0000, 0xFFFF>,
                                     deviceCaps);
            return info;
        }
        case GL_RGB16_SNORM_EXT:
        {
            static const Format info(GL_RGB16_SNORM_EXT,
                                     angle::Format::ID::R16G16B16A16_SNORM,
                                     DXGI_FORMAT_R16G16B16A16_SNORM,
                                     DXGI_FORMAT_R16G16B16A16_SNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16G16B16A16_SNORM,
                                     GL_RGBA16_SNORM_EXT,
                                     Initialize4ComponentData<GLushort, 0x0000, 0x0000, 0x0000, 0x7FFF>,
                                     deviceCaps);
            return info;
        }
        case GL_RGB32F:
        {
            static const Format info(GL_RGB32F,
                                     angle::Format::ID::R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     GL_RGBA32F,
                                     Initialize4ComponentData<GLfloat, 0x00000000, 0x00000000, 0x00000000, gl::Float32One>,
                                     deviceCaps);
            return info;
        }
        case GL_RGB32I:
        {
            static const Format info(GL_RGB32I,
                                     angle::Format::ID::R32G32B32A32_SINT,
                                     DXGI_FORMAT_R32G32B32A32_SINT,
                                     DXGI_FORMAT_R32G32B32A32_SINT,
                                     DXGI_FORMAT_R32G32B32A32_SINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R32G32B32A32_SINT,
                                     GL_RGBA32I,
                                     Initialize4ComponentData<GLint, 0x00000000, 0x00000000, 0x00000000, 0x00000001>,
                                     deviceCaps);
            return info;
        }
        case GL_RGB32UI:
        {
            static const Format info(GL_RGB32UI,
                                     angle::Format::ID::R32G32B32A32_UINT,
                                     DXGI_FORMAT_R32G32B32A32_UINT,
                                     DXGI_FORMAT_R32G32B32A32_UINT,
                                     DXGI_FORMAT_R32G32B32A32_UINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R32G32B32A32_UINT,
                                     GL_RGBA32UI,
                                     Initialize4ComponentData<GLuint, 0x00000000, 0x00000000, 0x00000000, 0x00000001>,
                                     deviceCaps);
            return info;
        }
        case GL_RGB565:
        {
            if (SupportsFormat(DXGI_FORMAT_B5G6R5_UNORM, deviceCaps))
            {
                static const Format info(GL_RGB565,
                                         angle::Format::ID::B5G6R5_UNORM,
                                         DXGI_FORMAT_B5G6R5_UNORM,
                                         DXGI_FORMAT_B5G6R5_UNORM,
                                         DXGI_FORMAT_B5G6R5_UNORM,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_B5G6R5_UNORM,
                                         GL_RGBA8,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
            else
            {
                static const Format info(GL_RGB565,
                                         angle::Format::ID::R8G8B8A8_UNORM,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         GL_RGBA8,
                                         Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>,
                                         deviceCaps);
                return info;
            }
        }
        case GL_RGB5_A1:
        {
            if (SupportsFormat(DXGI_FORMAT_B5G5R5A1_UNORM, deviceCaps))
            {
                static const Format info(GL_RGB5_A1,
                                         angle::Format::ID::B5G5R5A1_UNORM,
                                         DXGI_FORMAT_B5G5R5A1_UNORM,
                                         DXGI_FORMAT_B5G5R5A1_UNORM,
                                         DXGI_FORMAT_B5G5R5A1_UNORM,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_B5G5R5A1_UNORM,
                                         GL_RGBA8,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
            else
            {
                static const Format info(GL_RGB5_A1,
                                         angle::Format::ID::R8G8B8A8_UNORM,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         GL_RGBA8,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
        }
        case GL_RGB8:
        {
            static const Format info(GL_RGB8,
                                     angle::Format::ID::R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     GL_RGBA8,
                                     Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>,
                                     deviceCaps);
            return info;
        }
        case GL_RGB8I:
        {
            static const Format info(GL_RGB8I,
                                     angle::Format::ID::R8G8B8A8_SINT,
                                     DXGI_FORMAT_R8G8B8A8_SINT,
                                     DXGI_FORMAT_R8G8B8A8_SINT,
                                     DXGI_FORMAT_R8G8B8A8_SINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_SINT,
                                     GL_RGBA8I,
                                     Initialize4ComponentData<GLbyte, 0x00, 0x00, 0x00, 0x01>,
                                     deviceCaps);
            return info;
        }
        case GL_RGB8UI:
        {
            static const Format info(GL_RGB8UI,
                                     angle::Format::ID::R8G8B8A8_UINT,
                                     DXGI_FORMAT_R8G8B8A8_UINT,
                                     DXGI_FORMAT_R8G8B8A8_UINT,
                                     DXGI_FORMAT_R8G8B8A8_UINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_UINT,
                                     GL_RGBA8UI,
                                     Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0x01>,
                                     deviceCaps);
            return info;
        }
        case GL_RGB8_SNORM:
        {
            static const Format info(GL_RGB8_SNORM,
                                     angle::Format::ID::R8G8B8A8_SNORM,
                                     DXGI_FORMAT_R8G8B8A8_SNORM,
                                     DXGI_FORMAT_R8G8B8A8_SNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_SNORM,
                                     GL_RGBA8_SNORM,
                                     Initialize4ComponentData<GLbyte, 0x00, 0x00, 0x00, 0x7F>,
                                     deviceCaps);
            return info;
        }
        case GL_RGB9_E5:
        {
            static const Format info(GL_RGB9_E5,
                                     angle::Format::ID::R9G9B9E5_SHAREDEXP,
                                     DXGI_FORMAT_R9G9B9E5_SHAREDEXP,
                                     DXGI_FORMAT_R9G9B9E5_SHAREDEXP,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R9G9B9E5_SHAREDEXP,
                                     GL_RGBA16F_EXT,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RGBA:
        {
            static const Format info(GL_RGBA,
                                     angle::Format::ID::R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     GL_RGBA8,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RGBA16F:
        {
            static const Format info(GL_RGBA16F,
                                     angle::Format::ID::R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16G16B16A16_FLOAT,
                                     GL_RGBA16F,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RGBA16I:
        {
            static const Format info(GL_RGBA16I,
                                     angle::Format::ID::R16G16B16A16_SINT,
                                     DXGI_FORMAT_R16G16B16A16_SINT,
                                     DXGI_FORMAT_R16G16B16A16_SINT,
                                     DXGI_FORMAT_R16G16B16A16_SINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16G16B16A16_SINT,
                                     GL_RGBA16I,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RGBA16UI:
        {
            static const Format info(GL_RGBA16UI,
                                     angle::Format::ID::R16G16B16A16_UINT,
                                     DXGI_FORMAT_R16G16B16A16_UINT,
                                     DXGI_FORMAT_R16G16B16A16_UINT,
                                     DXGI_FORMAT_R16G16B16A16_UINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16G16B16A16_UINT,
                                     GL_RGBA16UI,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RGBA16_EXT:
        {
            static const Format info(GL_RGBA16_EXT,
                                     angle::Format::ID::R16G16B16A16_UNORM,
                                     DXGI_FORMAT_R16G16B16A16_UNORM,
                                     DXGI_FORMAT_R16G16B16A16_UNORM,
                                     DXGI_FORMAT_R16G16B16A16_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16G16B16A16_UNORM,
                                     GL_RGBA16_EXT,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RGBA16_SNORM_EXT:
        {
            static const Format info(GL_RGBA16_SNORM_EXT,
                                     angle::Format::ID::R16G16B16A16_SNORM,
                                     DXGI_FORMAT_R16G16B16A16_SNORM,
                                     DXGI_FORMAT_R16G16B16A16_SNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R16G16B16A16_SNORM,
                                     GL_RGBA16_SNORM_EXT,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RGBA32F:
        {
            static const Format info(GL_RGBA32F,
                                     angle::Format::ID::R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R32G32B32A32_FLOAT,
                                     GL_RGBA32F,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RGBA32I:
        {
            static const Format info(GL_RGBA32I,
                                     angle::Format::ID::R32G32B32A32_SINT,
                                     DXGI_FORMAT_R32G32B32A32_SINT,
                                     DXGI_FORMAT_R32G32B32A32_SINT,
                                     DXGI_FORMAT_R32G32B32A32_SINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R32G32B32A32_SINT,
                                     GL_RGBA32I,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RGBA32UI:
        {
            static const Format info(GL_RGBA32UI,
                                     angle::Format::ID::R32G32B32A32_UINT,
                                     DXGI_FORMAT_R32G32B32A32_UINT,
                                     DXGI_FORMAT_R32G32B32A32_UINT,
                                     DXGI_FORMAT_R32G32B32A32_UINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R32G32B32A32_UINT,
                                     GL_RGBA32UI,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RGBA4:
        {
            if (SupportsFormat(DXGI_FORMAT_B4G4R4A4_UNORM, deviceCaps))
            {
                static const Format info(GL_RGBA4,
                                         angle::Format::ID::B4G4R4A4_UNORM,
                                         DXGI_FORMAT_B4G4R4A4_UNORM,
                                         DXGI_FORMAT_B4G4R4A4_UNORM,
                                         DXGI_FORMAT_B4G4R4A4_UNORM,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_B4G4R4A4_UNORM,
                                         GL_RGBA4,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
            else
            {
                static const Format info(GL_RGBA4,
                                         angle::Format::ID::R8G8B8A8_UNORM,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_R8G8B8A8_UNORM,
                                         GL_RGBA8,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
        }
        case GL_RGBA8:
        {
            static const Format info(GL_RGBA8,
                                     angle::Format::ID::R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_UNORM,
                                     GL_RGBA8,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RGBA8I:
        {
            static const Format info(GL_RGBA8I,
                                     angle::Format::ID::R8G8B8A8_SINT,
                                     DXGI_FORMAT_R8G8B8A8_SINT,
                                     DXGI_FORMAT_R8G8B8A8_SINT,
                                     DXGI_FORMAT_R8G8B8A8_SINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_SINT,
                                     GL_RGBA8I,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RGBA8UI:
        {
            static const Format info(GL_RGBA8UI,
                                     angle::Format::ID::R8G8B8A8_UINT,
                                     DXGI_FORMAT_R8G8B8A8_UINT,
                                     DXGI_FORMAT_R8G8B8A8_UINT,
                                     DXGI_FORMAT_R8G8B8A8_UINT,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_UINT,
                                     GL_RGBA8UI,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_RGBA8_SNORM:
        {
            static const Format info(GL_RGBA8_SNORM,
                                     angle::Format::ID::R8G8B8A8_SNORM,
                                     DXGI_FORMAT_R8G8B8A8_SNORM,
                                     DXGI_FORMAT_R8G8B8A8_SNORM,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_SNORM,
                                     GL_RGBA8_SNORM,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_SRGB8:
        {
            static const Format info(GL_SRGB8,
                                     angle::Format::ID::R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     GL_SRGB8_ALPHA8,
                                     Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>,
                                     deviceCaps);
            return info;
        }
        case GL_SRGB8_ALPHA8:
        {
            static const Format info(GL_SRGB8_ALPHA8,
                                     angle::Format::ID::R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     DXGI_FORMAT_UNKNOWN,
                                     DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
                                     GL_SRGB8_ALPHA8,
                                     nullptr,
                                     deviceCaps);
            return info;
        }
        case GL_STENCIL_INDEX8:
        {
            if (OnlyFL10Plus(deviceCaps))
            {
                static const Format info(GL_STENCIL_INDEX8,
                                         angle::Format::ID::D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_R24G8_TYPELESS,
                                         DXGI_FORMAT_R24_UNORM_X8_TYPELESS,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_R24_UNORM_X8_TYPELESS,
                                         GL_RGBA32F,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
            else
            {
                static const Format info(GL_STENCIL_INDEX8,
                                         angle::Format::ID::D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_UNKNOWN,
                                         DXGI_FORMAT_D24_UNORM_S8_UINT,
                                         DXGI_FORMAT_UNKNOWN,
                                         GL_RGBA32F,
                                         nullptr,
                                         deviceCaps);
                return info;
            }
        }

        default:
            break;
    }
    // clang-format on

    UNREACHABLE();
    static const Format defaultInfo;
    return defaultInfo;
}

}  // namespace d3d11

}  // namespace rx
