Commit 8cf70d55 by Jamie Madill Committed by Commit Bot

D3D11: Rename ANGLEFormatSet to Format.

BUG=angleproject:1455 Change-Id: I896b3ed2d5e4ff3ad72de9a3a4b554841129e4e9 Reviewed-on: https://chromium-review.googlesource.com/367093Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent c98cd326
......@@ -442,7 +442,7 @@ D3D11_INPUT_ELEMENT_DESC quad3DLayout[] = {
{"TEXCOORD", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0},
};
DXGI_FORMAT GetStencilSRVFormat(const d3d11::ANGLEFormatSet &formatSet)
DXGI_FORMAT GetStencilSRVFormat(const d3d11::Format &formatSet)
{
switch (formatSet.texFormat)
{
......@@ -1984,8 +1984,7 @@ gl::Error Blit11::initResolveDepthStencil(const gl::Extents &extents)
releaseResolveDepthStencilResources();
}
const auto &formatSet =
d3d11::GetANGLEFormatSet(GL_RG32F, mRenderer->getRenderer11DeviceCaps());
const auto &formatSet = d3d11::Format::Get(GL_RG32F, mRenderer->getRenderer11DeviceCaps());
D3D11_TEXTURE2D_DESC textureDesc;
textureDesc.Width = extents.width;
......
......@@ -67,8 +67,8 @@ gl::Error Image11::generateMipmap(Image11 *dest,
const uint8_t *sourceData = reinterpret_cast<const uint8_t*>(srcMapped.pData);
uint8_t *destData = reinterpret_cast<uint8_t*>(destMapped.pData);
auto mipGenerationFunction = d3d11::GetANGLEFormatSet(src->getInternalFormat(), rendererCaps)
.format.mipGenerationFunction;
auto mipGenerationFunction =
d3d11::Format::Get(src->getInternalFormat(), rendererCaps).format.mipGenerationFunction;
mipGenerationFunction(src->getWidth(), src->getHeight(), src->getDepth(), sourceData,
srcMapped.RowPitch, srcMapped.DepthPitch, destData, destMapped.RowPitch,
destMapped.DepthPitch);
......@@ -90,7 +90,7 @@ bool Image11::isDirty() const
if (mDirty && !mStagingTexture && !mRecoverFromStorage)
{
const Renderer11DeviceCaps &deviceCaps = mRenderer->getRenderer11DeviceCaps();
const auto &formatInfo = d3d11::GetANGLEFormatSet(mInternalFormat, deviceCaps);
const auto &formatInfo = d3d11::Format::Get(mInternalFormat, deviceCaps);
if (formatInfo.dataInitializerFunction == nullptr)
{
return false;
......@@ -220,8 +220,8 @@ bool Image11::redefine(GLenum target, GLenum internalformat, const gl::Extents &
mTarget = target;
// compute the d3d format that will be used
const d3d11::ANGLEFormatSet &formatInfo =
d3d11::GetANGLEFormatSet(internalformat, mRenderer->getRenderer11DeviceCaps());
const d3d11::Format &formatInfo =
d3d11::Format::Get(internalformat, mRenderer->getRenderer11DeviceCaps());
mDXGIFormat = formatInfo.texFormat;
mRenderable = (formatInfo.rtvFormat != DXGI_FORMAT_UNKNOWN);
......@@ -269,8 +269,8 @@ gl::Error Image11::loadData(const gl::Box &area,
const d3d11::DXGIFormatSize &dxgiFormatInfo = d3d11::GetDXGIFormatSizeInfo(mDXGIFormat);
GLuint outputPixelSize = dxgiFormatInfo.pixelBytes;
const d3d11::ANGLEFormatSet &d3dFormatInfo =
d3d11::GetANGLEFormatSet(mInternalFormat, mRenderer->getRenderer11DeviceCaps());
const d3d11::Format &d3dFormatInfo =
d3d11::Format::Get(mInternalFormat, mRenderer->getRenderer11DeviceCaps());
LoadImageFunction loadFunction = d3dFormatInfo.loadFunctions.at(type).loadFunction;
D3D11_MAPPED_SUBRESOURCE mappedImage;
......@@ -308,8 +308,8 @@ gl::Error Image11::loadCompressedData(const gl::Box &area, const void *input)
ASSERT(area.x % outputBlockWidth == 0);
ASSERT(area.y % outputBlockHeight == 0);
const d3d11::ANGLEFormatSet &d3dFormatInfo =
d3d11::GetANGLEFormatSet(mInternalFormat, mRenderer->getRenderer11DeviceCaps());
const d3d11::Format &d3dFormatInfo =
d3d11::Format::Get(mInternalFormat, mRenderer->getRenderer11DeviceCaps());
LoadImageFunction loadFunction = d3dFormatInfo.loadFunctions.at(GL_UNSIGNED_BYTE).loadFunction;
D3D11_MAPPED_SUBRESOURCE mappedImage;
......@@ -360,7 +360,7 @@ gl::Error Image11::copyFromFramebuffer(const gl::Offset &destOffset,
GLenum sourceInternalFormat = srcAttachment->getFormat().asSized();
const auto &d3d11Format =
d3d11::GetANGLEFormatSet(sourceInternalFormat, mRenderer->getRenderer11DeviceCaps());
d3d11::Format::Get(sourceInternalFormat, mRenderer->getRenderer11DeviceCaps());
if (d3d11Format.texFormat == mDXGIFormat && sourceInternalFormat == mInternalFormat)
{
......@@ -401,7 +401,7 @@ gl::Error Image11::copyFromFramebuffer(const gl::Offset &destOffset,
const gl::InternalFormat &destFormatInfo = gl::GetInternalFormatInfo(mInternalFormat);
const auto &destD3D11Format =
d3d11::GetANGLEFormatSet(mInternalFormat, mRenderer->getRenderer11DeviceCaps());
d3d11::Format::Get(mInternalFormat, mRenderer->getRenderer11DeviceCaps());
auto loadFunction = destD3D11Format.loadFunctions.at(destFormatInfo.type);
if (loadFunction.requiresConversion)
......@@ -566,7 +566,7 @@ gl::Error Image11::createStagingTexture()
desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ | D3D11_CPU_ACCESS_WRITE;
desc.MiscFlags = 0;
if (d3d11::GetANGLEFormatSet(mInternalFormat, mRenderer->getRenderer11DeviceCaps())
if (d3d11::Format::Get(mInternalFormat, mRenderer->getRenderer11DeviceCaps())
.dataInitializerFunction != NULL)
{
std::vector<D3D11_SUBRESOURCE_DATA> initialData;
......@@ -607,7 +607,7 @@ gl::Error Image11::createStagingTexture()
desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ | D3D11_CPU_ACCESS_WRITE;
desc.MiscFlags = 0;
if (d3d11::GetANGLEFormatSet(mInternalFormat, mRenderer->getRenderer11DeviceCaps())
if (d3d11::Format::Get(mInternalFormat, mRenderer->getRenderer11DeviceCaps())
.dataInitializerFunction != NULL)
{
std::vector<D3D11_SUBRESOURCE_DATA> initialData;
......
......@@ -196,8 +196,8 @@ gl::Error PixelTransfer11::copyBufferToTexture(const gl::PixelUnpackState &unpac
GLenum unsizedFormat = gl::GetInternalFormatInfo(destinationFormat).format;
GLenum sourceFormat = gl::GetSizedInternalFormat(unsizedFormat, sourcePixelsType);
const d3d11::ANGLEFormatSet &sourceFormatInfo =
d3d11::GetANGLEFormatSet(sourceFormat, mRenderer->getRenderer11DeviceCaps());
const d3d11::Format &sourceFormatInfo =
d3d11::Format::Get(sourceFormat, mRenderer->getRenderer11DeviceCaps());
DXGI_FORMAT srvFormat = sourceFormatInfo.srvFormat;
ASSERT(srvFormat != DXGI_FORMAT_UNKNOWN);
Buffer11 *bufferStorage11 = GetAs<Buffer11>(sourceBuffer.getImplementation());
......
......@@ -186,17 +186,15 @@ GLenum GetSurfaceRTFormat(bool depth, SwapChain11 *swapChain)
: swapChain->getRenderTargetInternalFormat());
}
const d3d11::ANGLEFormatSet &GetSurfaceFormatSet(bool depth,
SwapChain11 *swapChain,
Renderer11 *renderer)
const d3d11::Format &GetSurfaceFormatSet(bool depth, SwapChain11 *swapChain, Renderer11 *renderer)
{
return d3d11::GetANGLEFormatSet(GetSurfaceRTFormat(depth, swapChain),
return d3d11::Format::Get(GetSurfaceRTFormat(depth, swapChain),
renderer->getRenderer11DeviceCaps());
}
} // anonymous namespace
RenderTarget11::RenderTarget11(const d3d11::ANGLEFormatSet &formatSet) : mFormatSet(formatSet)
RenderTarget11::RenderTarget11(const d3d11::Format &formatSet) : mFormatSet(formatSet)
{
}
......@@ -218,7 +216,7 @@ TextureRenderTarget11::TextureRenderTarget11(ID3D11RenderTargetView *rtv,
ID3D11ShaderResourceView *srv,
ID3D11ShaderResourceView *blitSRV,
GLenum internalFormat,
const d3d11::ANGLEFormatSet &formatSet,
const d3d11::Format &formatSet,
GLsizei width,
GLsizei height,
GLsizei depth,
......@@ -267,7 +265,7 @@ TextureRenderTarget11::TextureRenderTarget11(ID3D11DepthStencilView *dsv,
ID3D11Resource *resource,
ID3D11ShaderResourceView *srv,
GLenum internalFormat,
const d3d11::ANGLEFormatSet &formatSet,
const d3d11::Format &formatSet,
GLsizei width,
GLsizei height,
GLsizei depth,
......
......@@ -23,7 +23,7 @@ class Renderer11;
class RenderTarget11 : public RenderTargetD3D
{
public:
RenderTarget11(const d3d11::ANGLEFormatSet &formatSet);
RenderTarget11(const d3d11::Format &formatSet);
virtual ~RenderTarget11();
virtual ID3D11Resource *getTexture() const = 0;
......@@ -37,11 +37,11 @@ class RenderTarget11 : public RenderTargetD3D
void signalDirty() override;
angle::BroadcastChannel *getBroadcastChannel() { return &mBroadcastChannel; }
const d3d11::ANGLEFormatSet &getFormatSet() const { return mFormatSet; }
const d3d11::Format &getFormatSet() const { return mFormatSet; }
protected:
angle::BroadcastChannel mBroadcastChannel;
const d3d11::ANGLEFormatSet &mFormatSet;
const d3d11::Format &mFormatSet;
};
class TextureRenderTarget11 : public RenderTarget11
......@@ -53,7 +53,7 @@ class TextureRenderTarget11 : public RenderTarget11
ID3D11ShaderResourceView *srv,
ID3D11ShaderResourceView *blitSRV,
GLenum internalFormat,
const d3d11::ANGLEFormatSet &formatSet,
const d3d11::Format &formatSet,
GLsizei width,
GLsizei height,
GLsizei depth,
......@@ -62,7 +62,7 @@ class TextureRenderTarget11 : public RenderTarget11
ID3D11Resource *resource,
ID3D11ShaderResourceView *srv,
GLenum internalFormat,
const d3d11::ANGLEFormatSet &formatSet,
const d3d11::Format &formatSet,
GLsizei width,
GLsizei height,
GLsizei depth,
......
......@@ -3123,8 +3123,7 @@ gl::Error Renderer11::copyTexture(const gl::Texture *source,
gl::Error Renderer11::createRenderTarget(int width, int height, GLenum format, GLsizei samples, RenderTargetD3D **outRT)
{
const d3d11::ANGLEFormatSet &formatInfo =
d3d11::GetANGLEFormatSet(format, mRenderer11DeviceCaps);
const d3d11::Format &formatInfo = d3d11::Format::Get(format, mRenderer11DeviceCaps);
const gl::TextureCaps &textureCaps = getNativeTextureCaps().get(format);
GLuint supportedSamples = textureCaps.getNearestSamples(samples);
......@@ -3278,10 +3277,9 @@ gl::Error Renderer11::createRenderTarget(int width, int height, GLenum format, G
}
else
{
*outRT = new TextureRenderTarget11(static_cast<ID3D11RenderTargetView *>(nullptr), nullptr,
nullptr, nullptr, format,
d3d11::GetANGLEFormatSet(GL_NONE, mRenderer11DeviceCaps),
width, height, 1, supportedSamples);
*outRT = new TextureRenderTarget11(
static_cast<ID3D11RenderTargetView *>(nullptr), nullptr, nullptr, nullptr, format,
d3d11::Format::Get(GL_NONE, mRenderer11DeviceCaps), width, height, 1, supportedSamples);
}
return gl::Error(GL_NO_ERROR);
......@@ -3517,8 +3515,8 @@ bool Renderer11::supportsFastCopyBufferToTexture(GLenum internalFormat) const
ASSERT(getNativeExtensions().pixelBufferObject);
const gl::InternalFormat &internalFormatInfo = gl::GetInternalFormatInfo(internalFormat);
const d3d11::ANGLEFormatSet &d3d11FormatInfo =
d3d11::GetANGLEFormatSet(internalFormat, mRenderer11DeviceCaps);
const d3d11::Format &d3d11FormatInfo =
d3d11::Format::Get(internalFormat, mRenderer11DeviceCaps);
// sRGB formats do not work with D3D11 buffer SRVs
if (internalFormatInfo.colorEncoding == GL_SRGB)
......
......@@ -177,8 +177,8 @@ EGLint SwapChain11::resetOffscreenColorBuffer(int backbufferWidth, int backbuffe
releaseOffscreenColorBuffer();
const d3d11::ANGLEFormatSet &backbufferFormatInfo = d3d11::GetANGLEFormatSet(
mOffscreenRenderTargetFormat, mRenderer->getRenderer11DeviceCaps());
const d3d11::Format &backbufferFormatInfo =
d3d11::Format::Get(mOffscreenRenderTargetFormat, mRenderer->getRenderer11DeviceCaps());
// If the app passed in a share handle, open the resource
// See EGL_ANGLE_d3d_share_handle_client_buffer
......@@ -334,8 +334,8 @@ EGLint SwapChain11::resetOffscreenDepthBuffer(int backbufferWidth, int backbuffe
if (mDepthBufferFormat != GL_NONE)
{
const d3d11::ANGLEFormatSet &depthBufferFormatInfo =
d3d11::GetANGLEFormatSet(mDepthBufferFormat, mRenderer->getRenderer11DeviceCaps());
const d3d11::Format &depthBufferFormatInfo =
d3d11::Format::Get(mDepthBufferFormat, mRenderer->getRenderer11DeviceCaps());
D3D11_TEXTURE2D_DESC depthStencilTextureDesc;
depthStencilTextureDesc.Width = backbufferWidth;
......
......@@ -49,7 +49,7 @@ TextureStorage11::TextureStorage11(Renderer11 *renderer,
: mRenderer(renderer),
mTopLevel(0),
mMipLevels(0),
mFormatInfo(d3d11::GetANGLEFormatSet(internalFormat, mRenderer->getRenderer11DeviceCaps())),
mFormatInfo(d3d11::Format::Get(internalFormat, mRenderer->getRenderer11DeviceCaps())),
mTextureWidth(0),
mTextureHeight(0),
mTextureDepth(0),
......@@ -81,8 +81,7 @@ DWORD TextureStorage11::GetTextureBindFlags(GLenum internalFormat,
{
UINT bindFlags = 0;
const d3d11::ANGLEFormatSet &formatInfo =
d3d11::GetANGLEFormatSet(internalFormat, renderer11DeviceCaps);
const d3d11::Format &formatInfo = d3d11::Format::Get(internalFormat, renderer11DeviceCaps);
if (formatInfo.srvFormat != DXGI_FORMAT_UNKNOWN)
{
bindFlags |= D3D11_BIND_SHADER_RESOURCE;
......@@ -106,8 +105,7 @@ DWORD TextureStorage11::GetTextureMiscFlags(GLenum internalFormat,
{
UINT miscFlags = 0;
const d3d11::ANGLEFormatSet &formatInfo =
d3d11::GetANGLEFormatSet(internalFormat, renderer11DeviceCaps);
const d3d11::Format &formatInfo = d3d11::Format::Get(internalFormat, renderer11DeviceCaps);
if (renderTarget && levels > 1)
{
const d3d11::DXGIFormat &dxgiFormatInfo = d3d11::GetDXGIFormatInfo(formatInfo.texFormat);
......@@ -325,7 +323,7 @@ gl::Error TextureStorage11::getSRVLevels(GLint baseLevel,
return gl::NoError();
}
const d3d11::ANGLEFormatSet &TextureStorage11::getFormatSet() const
const d3d11::Format &TextureStorage11::getFormatSet() const
{
return mFormatInfo;
}
......@@ -652,8 +650,8 @@ gl::Error TextureStorage11::setData(const gl::ImageIndex &index,
unpack.skipRows, unpack.skipPixels, index.is3D()),
srcSkipBytes);
const d3d11::ANGLEFormatSet &d3d11Format =
d3d11::GetANGLEFormatSet(image->getInternalFormat(), mRenderer->getRenderer11DeviceCaps());
const d3d11::Format &d3d11Format =
d3d11::Format::Get(image->getInternalFormat(), mRenderer->getRenderer11DeviceCaps());
const d3d11::DXGIFormatSize &dxgiFormatInfo =
d3d11::GetDXGIFormatSizeInfo(d3d11Format.texFormat);
......
......@@ -79,7 +79,7 @@ class TextureStorage11 : public TextureStorage
gl::Error getSRVLevels(GLint baseLevel, GLint maxLevel, ID3D11ShaderResourceView **outSRV);
const d3d11::ANGLEFormatSet &getFormatSet() const;
const d3d11::Format &getFormatSet() const;
protected:
TextureStorage11(Renderer11 *renderer, UINT bindFlags, UINT miscFlags, GLenum internalFormat);
......@@ -107,7 +107,7 @@ class TextureStorage11 : public TextureStorage
int mTopLevel;
unsigned int mMipLevels;
const d3d11::ANGLEFormatSet &mFormatInfo;
const d3d11::Format &mFormatInfo;
unsigned int mTextureWidth;
unsigned int mTextureHeight;
unsigned int mTextureDepth;
......
......@@ -43,7 +43,8 @@ namespace rx
namespace d3d11
{{
const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
// static
const Format &Format::Get(GLenum internalFormat,
const Renderer11DeviceCaps &deviceCaps)
{{
// clang-format off
......@@ -56,7 +57,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
// clang-format on
UNREACHABLE();
static const ANGLEFormatSet defaultInfo;
static const Format defaultInfo;
return defaultInfo;
}}
......@@ -212,7 +213,7 @@ def get_blit_srv_format(angle_format):
format_entry_template = """{space}{{
{space} static const ANGLEFormatSet info({internalFormat},
{space} static const Format info({internalFormat},
{space} angle::Format::ID::{formatName},
{space} {texFormat},
{space} {srvFormat},
......@@ -228,7 +229,7 @@ format_entry_template = """{space}{{
split_format_entry_template = """{space} {condition}
{space} {{
{space} static const ANGLEFormatSet info({internalFormat},
{space} static const Format info({internalFormat},
{space} angle::Format::ID::{formatName},
{space} {texFormat},
{space} {srvFormat},
......
......@@ -349,8 +349,7 @@ static gl::TextureCaps GenerateTextureFormatCaps(GLint maxClientVersion, GLenum
gl::TextureCaps textureCaps;
DXGISupportHelper support(device, renderer11DeviceCaps.featureLevel);
const d3d11::ANGLEFormatSet &formatInfo =
d3d11::GetANGLEFormatSet(internalFormat, renderer11DeviceCaps);
const d3d11::Format &formatInfo = d3d11::Format::Get(internalFormat, renderer11DeviceCaps);
const gl::InternalFormat &internalFormatInfo = gl::GetInternalFormatInfo(internalFormat);
......@@ -1368,8 +1367,7 @@ void GenerateInitialTextureData(GLint internalFormat,
std::vector<D3D11_SUBRESOURCE_DATA> *outSubresourceData,
std::vector<std::vector<BYTE>> *outData)
{
const d3d11::ANGLEFormatSet &d3dFormatInfo =
d3d11::GetANGLEFormatSet(internalFormat, renderer11DeviceCaps);
const d3d11::Format &d3dFormatInfo = d3d11::Format::Get(internalFormat, renderer11DeviceCaps);
ASSERT(d3dFormatInfo.dataInitializerFunction != NULL);
const d3d11::DXGIFormatSize &dxgiFormatInfo =
......@@ -1580,7 +1578,7 @@ TextureHelper11::TextureHelper11(TextureHelper11 &&toCopy)
// static
TextureHelper11 TextureHelper11::MakeAndReference(ID3D11Resource *genericResource,
const d3d11::ANGLEFormatSet &formatSet)
const d3d11::Format &formatSet)
{
TextureHelper11 newHelper;
newHelper.mFormatSet = &formatSet;
......@@ -1593,7 +1591,7 @@ TextureHelper11 TextureHelper11::MakeAndReference(ID3D11Resource *genericResourc
// static
TextureHelper11 TextureHelper11::MakeAndPossess2D(ID3D11Texture2D *texToOwn,
const d3d11::ANGLEFormatSet &formatSet)
const d3d11::Format &formatSet)
{
TextureHelper11 newHelper;
newHelper.mFormatSet = &formatSet;
......@@ -1605,7 +1603,7 @@ TextureHelper11 TextureHelper11::MakeAndPossess2D(ID3D11Texture2D *texToOwn,
// static
TextureHelper11 TextureHelper11::MakeAndPossess3D(ID3D11Texture3D *texToOwn,
const d3d11::ANGLEFormatSet &formatSet)
const d3d11::Format &formatSet)
{
TextureHelper11 newHelper;
newHelper.mFormatSet = &formatSet;
......@@ -1689,7 +1687,7 @@ bool TextureHelper11::valid() const
}
gl::ErrorOrResult<TextureHelper11> CreateStagingTexture(GLenum textureType,
const d3d11::ANGLEFormatSet &formatSet,
const d3d11::Format &formatSet,
const gl::Extents &size,
StagingAccess readAndWriteAccess,
ID3D11Device *device)
......
......@@ -370,16 +370,16 @@ class TextureHelper11 : angle::NonCopyable
TextureHelper11 &operator=(TextureHelper11 &&texture);
static TextureHelper11 MakeAndReference(ID3D11Resource *genericResource,
const d3d11::ANGLEFormatSet &formatSet);
const d3d11::Format &formatSet);
static TextureHelper11 MakeAndPossess2D(ID3D11Texture2D *texToOwn,
const d3d11::ANGLEFormatSet &formatSet);
const d3d11::Format &formatSet);
static TextureHelper11 MakeAndPossess3D(ID3D11Texture3D *texToOwn,
const d3d11::ANGLEFormatSet &formatSet);
const d3d11::Format &formatSet);
GLenum getTextureType() const { return mTextureType; }
gl::Extents getExtents() const { return mExtents; }
DXGI_FORMAT getFormat() const { return mFormat; }
const d3d11::ANGLEFormatSet &getFormatSet() const { return *mFormatSet; }
const d3d11::Format &getFormatSet() const { return *mFormatSet; }
int getSampleCount() const { return mSampleCount; }
ID3D11Texture2D *getTexture2D() const { return mTexture2D; }
ID3D11Texture3D *getTexture3D() const { return mTexture3D; }
......@@ -393,7 +393,7 @@ class TextureHelper11 : angle::NonCopyable
GLenum mTextureType;
gl::Extents mExtents;
DXGI_FORMAT mFormat;
const d3d11::ANGLEFormatSet *mFormatSet;
const d3d11::Format *mFormatSet;
int mSampleCount;
ID3D11Texture2D *mTexture2D;
ID3D11Texture3D *mTexture3D;
......@@ -406,7 +406,7 @@ enum class StagingAccess
};
gl::ErrorOrResult<TextureHelper11> CreateStagingTexture(GLenum textureType,
const d3d11::ANGLEFormatSet &formatSet,
const d3d11::Format &formatSet,
const gl::Extents &size,
StagingAccess readAndWriteAccess,
ID3D11Device *device);
......
......@@ -15,7 +15,7 @@ namespace rx
namespace d3d11
{
ANGLEFormatSet::ANGLEFormatSet()
Format::Format()
: internalFormat(GL_NONE),
format(angle::Format::Get(angle::Format::ID::NONE)),
texFormat(DXGI_FORMAT_UNKNOWN),
......@@ -28,7 +28,7 @@ ANGLEFormatSet::ANGLEFormatSet()
{
}
ANGLEFormatSet::ANGLEFormatSet(GLenum internalFormat,
Format::Format(GLenum internalFormat,
angle::Format::ID formatID,
DXGI_FORMAT texFormat,
DXGI_FORMAT srvFormat,
......@@ -45,8 +45,7 @@ ANGLEFormatSet::ANGLEFormatSet(GLenum internalFormat,
rtvFormat(rtvFormat),
dsvFormat(dsvFormat),
blitSRVFormat(blitSRVFormat),
swizzle(swizzleFormat == internalFormat ? *this
: GetANGLEFormatSet(swizzleFormat, deviceCaps)),
swizzle(swizzleFormat == internalFormat ? *this : Format::Get(swizzleFormat, deviceCaps)),
dataInitializerFunction(internalFormatInitializer),
loadFunctions(GetLoadFunctionsMap(internalFormat, texFormat))
{
......
......@@ -42,10 +42,10 @@ struct LoadImageFunctionInfo
// on device capabilities.
// This structure allows querying for the DXGI texture formats to use for textures, SRVs, RTVs and
// DSVs given a GL internal format.
struct ANGLEFormatSet final : angle::NonCopyable
struct Format final : angle::NonCopyable
{
ANGLEFormatSet();
ANGLEFormatSet(GLenum internalFormat,
Format();
Format(GLenum internalFormat,
angle::Format::ID formatID,
DXGI_FORMAT texFormat,
DXGI_FORMAT srvFormat,
......@@ -56,6 +56,8 @@ struct ANGLEFormatSet final : angle::NonCopyable
InitializeTextureDataFunction internalFormatInitializer,
const Renderer11DeviceCaps &deviceCaps);
static const Format &Get(GLenum internalFormat, const Renderer11DeviceCaps &deviceCaps);
GLenum internalFormat;
const angle::Format &format;
......@@ -66,7 +68,7 @@ struct ANGLEFormatSet final : angle::NonCopyable
DXGI_FORMAT blitSRVFormat;
const ANGLEFormatSet &swizzle;
const Format &swizzle;
InitializeTextureDataFunction dataInitializerFunction;
typedef std::map<GLenum, LoadImageFunctionInfo> LoadFunctionMap;
......@@ -74,9 +76,6 @@ struct ANGLEFormatSet final : angle::NonCopyable
LoadFunctionMap loadFunctions;
};
const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
const Renderer11DeviceCaps &deviceCaps);
} // namespace d3d11
} // namespace rx
......
......@@ -27,7 +27,8 @@ namespace rx
namespace d3d11
{
const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
// static
const Format &Format::Get(GLenum internalFormat,
const Renderer11DeviceCaps &deviceCaps)
{
// clang-format off
......@@ -37,7 +38,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
{
if (OnlyFL10Plus(deviceCaps))
{
static const ANGLEFormatSet info(GL_ALPHA,
static const Format info(GL_ALPHA,
angle::Format::ID::A8_UNORM,
DXGI_FORMAT_A8_UNORM,
DXGI_FORMAT_A8_UNORM,
......@@ -51,7 +52,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
else
{
static const ANGLEFormatSet info(GL_ALPHA,
static const Format info(GL_ALPHA,
angle::Format::ID::R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
......@@ -66,7 +67,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_ALPHA16F_EXT:
{
static const ANGLEFormatSet info(GL_ALPHA16F_EXT,
static const Format info(GL_ALPHA16F_EXT,
angle::Format::ID::R16G16B16A16_FLOAT,
DXGI_FORMAT_R16G16B16A16_FLOAT,
DXGI_FORMAT_R16G16B16A16_FLOAT,
......@@ -80,7 +81,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_ALPHA32F_EXT:
{
static const ANGLEFormatSet info(GL_ALPHA32F_EXT,
static const Format info(GL_ALPHA32F_EXT,
angle::Format::ID::R32G32B32A32_FLOAT,
DXGI_FORMAT_R32G32B32A32_FLOAT,
DXGI_FORMAT_R32G32B32A32_FLOAT,
......@@ -96,7 +97,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
{
if (OnlyFL10Plus(deviceCaps))
{
static const ANGLEFormatSet info(GL_ALPHA8_EXT,
static const Format info(GL_ALPHA8_EXT,
angle::Format::ID::A8_UNORM,
DXGI_FORMAT_A8_UNORM,
DXGI_FORMAT_A8_UNORM,
......@@ -110,7 +111,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
else
{
static const ANGLEFormatSet info(GL_ALPHA8_EXT,
static const Format info(GL_ALPHA8_EXT,
angle::Format::ID::R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
......@@ -127,7 +128,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
{
if (SupportsFormat(DXGI_FORMAT_B5G6R5_UNORM, deviceCaps))
{
static const ANGLEFormatSet info(GL_BGR565_ANGLEX,
static const Format info(GL_BGR565_ANGLEX,
angle::Format::ID::B5G6R5_UNORM,
DXGI_FORMAT_B5G6R5_UNORM,
DXGI_FORMAT_B5G6R5_UNORM,
......@@ -141,7 +142,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
else
{
static const ANGLEFormatSet info(GL_BGR565_ANGLEX,
static const Format info(GL_BGR565_ANGLEX,
angle::Format::ID::R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
......@@ -156,7 +157,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_BGR5_A1_ANGLEX:
{
static const ANGLEFormatSet info(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,
......@@ -170,7 +171,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_BGRA4_ANGLEX:
{
static const ANGLEFormatSet info(GL_BGRA4_ANGLEX,
static const Format info(GL_BGRA4_ANGLEX,
angle::Format::ID::B8G8R8A8_UNORM,
DXGI_FORMAT_B8G8R8A8_UNORM,
DXGI_FORMAT_B8G8R8A8_UNORM,
......@@ -184,7 +185,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_BGRA8_EXT:
{
static const ANGLEFormatSet info(GL_BGRA8_EXT,
static const Format info(GL_BGRA8_EXT,
angle::Format::ID::B8G8R8A8_UNORM,
DXGI_FORMAT_B8G8R8A8_UNORM,
DXGI_FORMAT_B8G8R8A8_UNORM,
......@@ -198,7 +199,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_BGRA_EXT:
{
static const ANGLEFormatSet info(GL_BGRA_EXT,
static const Format info(GL_BGRA_EXT,
angle::Format::ID::B8G8R8A8_UNORM,
DXGI_FORMAT_B8G8R8A8_UNORM,
DXGI_FORMAT_B8G8R8A8_UNORM,
......@@ -212,7 +213,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_R11_EAC:
{
static const ANGLEFormatSet info(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,
......@@ -226,7 +227,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RG11_EAC:
{
static const ANGLEFormatSet info(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,
......@@ -240,7 +241,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGB8_ETC2:
{
static const ANGLEFormatSet info(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,
......@@ -254,7 +255,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:
{
static const ANGLEFormatSet info(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,
......@@ -268,7 +269,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGBA8_ETC2_EAC:
{
static const ANGLEFormatSet info(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,
......@@ -282,7 +283,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGBA_ASTC_10x10_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -296,7 +297,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGBA_ASTC_10x5_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -310,7 +311,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGBA_ASTC_10x6_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -324,7 +325,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGBA_ASTC_10x8_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -338,7 +339,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGBA_ASTC_12x10_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -352,7 +353,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGBA_ASTC_12x12_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -366,7 +367,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGBA_ASTC_4x4_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -380,7 +381,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGBA_ASTC_5x4_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -394,7 +395,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGBA_ASTC_5x5_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -408,7 +409,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGBA_ASTC_6x5_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -422,7 +423,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGBA_ASTC_6x6_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -436,7 +437,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGBA_ASTC_8x5_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -450,7 +451,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGBA_ASTC_8x6_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -464,7 +465,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGBA_ASTC_8x8_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -478,7 +479,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
{
static const ANGLEFormatSet info(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,
......@@ -492,7 +493,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE:
{
static const ANGLEFormatSet info(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,
......@@ -506,7 +507,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE:
{
static const ANGLEFormatSet info(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,
......@@ -520,7 +521,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
{
static const ANGLEFormatSet info(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,
......@@ -534,7 +535,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SIGNED_R11_EAC:
{
static const ANGLEFormatSet info(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,
......@@ -548,7 +549,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SIGNED_RG11_EAC:
{
static const ANGLEFormatSet info(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,
......@@ -562,7 +563,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -576,7 +577,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -590,7 +591,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -604,7 +605,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -618,7 +619,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -632,7 +633,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -646,7 +647,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -660,7 +661,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -674,7 +675,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -688,7 +689,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -702,7 +703,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -716,7 +717,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -730,7 +731,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -744,7 +745,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:
{
static const ANGLEFormatSet info(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,
......@@ -758,7 +759,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:
{
static const ANGLEFormatSet info(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,
......@@ -772,7 +773,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SRGB8_ETC2:
{
static const ANGLEFormatSet info(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,
......@@ -786,7 +787,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:
{
static const ANGLEFormatSet info(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,
......@@ -802,7 +803,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
{
if (OnlyFL10Plus(deviceCaps))
{
static const ANGLEFormatSet info(GL_DEPTH24_STENCIL8,
static const Format info(GL_DEPTH24_STENCIL8,
angle::Format::ID::D24_UNORM_S8_UINT,
DXGI_FORMAT_R24G8_TYPELESS,
DXGI_FORMAT_R24_UNORM_X8_TYPELESS,
......@@ -816,7 +817,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
else
{
static const ANGLEFormatSet info(GL_DEPTH24_STENCIL8,
static const Format info(GL_DEPTH24_STENCIL8,
angle::Format::ID::D24_UNORM_S8_UINT,
DXGI_FORMAT_D24_UNORM_S8_UINT,
DXGI_FORMAT_UNKNOWN,
......@@ -831,7 +832,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_DEPTH32F_STENCIL8:
{
static const ANGLEFormatSet info(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,
......@@ -847,7 +848,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
{
if (OnlyFL10Plus(deviceCaps))
{
static const ANGLEFormatSet info(GL_DEPTH_COMPONENT16,
static const Format info(GL_DEPTH_COMPONENT16,
angle::Format::ID::D16_UNORM,
DXGI_FORMAT_R16_TYPELESS,
DXGI_FORMAT_R16_UNORM,
......@@ -861,7 +862,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
else
{
static const ANGLEFormatSet info(GL_DEPTH_COMPONENT16,
static const Format info(GL_DEPTH_COMPONENT16,
angle::Format::ID::D16_UNORM,
DXGI_FORMAT_D16_UNORM,
DXGI_FORMAT_UNKNOWN,
......@@ -878,7 +879,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
{
if (OnlyFL10Plus(deviceCaps))
{
static const ANGLEFormatSet info(GL_DEPTH_COMPONENT24,
static const Format info(GL_DEPTH_COMPONENT24,
angle::Format::ID::D24_UNORM_S8_UINT,
DXGI_FORMAT_R24G8_TYPELESS,
DXGI_FORMAT_R24_UNORM_X8_TYPELESS,
......@@ -892,7 +893,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
else
{
static const ANGLEFormatSet info(GL_DEPTH_COMPONENT24,
static const Format info(GL_DEPTH_COMPONENT24,
angle::Format::ID::D24_UNORM_S8_UINT,
DXGI_FORMAT_D24_UNORM_S8_UINT,
DXGI_FORMAT_UNKNOWN,
......@@ -907,7 +908,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_DEPTH_COMPONENT32F:
{
static const ANGLEFormatSet info(GL_DEPTH_COMPONENT32F,
static const Format info(GL_DEPTH_COMPONENT32F,
angle::Format::ID::D32_FLOAT,
DXGI_FORMAT_R32_TYPELESS,
DXGI_FORMAT_R32_FLOAT,
......@@ -923,7 +924,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
{
if (OnlyFL10Plus(deviceCaps))
{
static const ANGLEFormatSet info(GL_DEPTH_COMPONENT32_OES,
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,
......@@ -937,7 +938,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
else
{
static const ANGLEFormatSet info(GL_DEPTH_COMPONENT32_OES,
static const Format info(GL_DEPTH_COMPONENT32_OES,
angle::Format::ID::D24_UNORM_S8_UINT,
DXGI_FORMAT_D24_UNORM_S8_UINT,
DXGI_FORMAT_UNKNOWN,
......@@ -952,7 +953,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_ETC1_RGB8_LOSSY_DECODE_ANGLE:
{
static const ANGLEFormatSet info(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,
......@@ -966,7 +967,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_ETC1_RGB8_OES:
{
static const ANGLEFormatSet info(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,
......@@ -980,7 +981,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_LUMINANCE:
{
static const ANGLEFormatSet info(GL_LUMINANCE,
static const Format info(GL_LUMINANCE,
angle::Format::ID::R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
......@@ -994,7 +995,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_LUMINANCE16F_EXT:
{
static const ANGLEFormatSet info(GL_LUMINANCE16F_EXT,
static const Format info(GL_LUMINANCE16F_EXT,
angle::Format::ID::R16G16B16A16_FLOAT,
DXGI_FORMAT_R16G16B16A16_FLOAT,
DXGI_FORMAT_R16G16B16A16_FLOAT,
......@@ -1008,7 +1009,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_LUMINANCE32F_EXT:
{
static const ANGLEFormatSet info(GL_LUMINANCE32F_EXT,
static const Format info(GL_LUMINANCE32F_EXT,
angle::Format::ID::R32G32B32A32_FLOAT,
DXGI_FORMAT_R32G32B32A32_FLOAT,
DXGI_FORMAT_R32G32B32A32_FLOAT,
......@@ -1022,7 +1023,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_LUMINANCE8_ALPHA8_EXT:
{
static const ANGLEFormatSet info(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,
......@@ -1036,7 +1037,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_LUMINANCE8_EXT:
{
static const ANGLEFormatSet info(GL_LUMINANCE8_EXT,
static const Format info(GL_LUMINANCE8_EXT,
angle::Format::ID::R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
......@@ -1050,7 +1051,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_LUMINANCE_ALPHA:
{
static const ANGLEFormatSet info(GL_LUMINANCE_ALPHA,
static const Format info(GL_LUMINANCE_ALPHA,
angle::Format::ID::R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
......@@ -1064,7 +1065,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_LUMINANCE_ALPHA16F_EXT:
{
static const ANGLEFormatSet info(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,
......@@ -1078,7 +1079,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_LUMINANCE_ALPHA32F_EXT:
{
static const ANGLEFormatSet info(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,
......@@ -1092,7 +1093,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_NONE:
{
static const ANGLEFormatSet info(GL_NONE,
static const Format info(GL_NONE,
angle::Format::ID::NONE,
DXGI_FORMAT_UNKNOWN,
DXGI_FORMAT_UNKNOWN,
......@@ -1106,7 +1107,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_R11F_G11F_B10F:
{
static const ANGLEFormatSet info(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,
......@@ -1120,7 +1121,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_R16F:
{
static const ANGLEFormatSet info(GL_R16F,
static const Format info(GL_R16F,
angle::Format::ID::R16_FLOAT,
DXGI_FORMAT_R16_FLOAT,
DXGI_FORMAT_R16_FLOAT,
......@@ -1134,7 +1135,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_R16I:
{
static const ANGLEFormatSet info(GL_R16I,
static const Format info(GL_R16I,
angle::Format::ID::R16_SINT,
DXGI_FORMAT_R16_SINT,
DXGI_FORMAT_R16_SINT,
......@@ -1148,7 +1149,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_R16UI:
{
static const ANGLEFormatSet info(GL_R16UI,
static const Format info(GL_R16UI,
angle::Format::ID::R16_UINT,
DXGI_FORMAT_R16_UINT,
DXGI_FORMAT_R16_UINT,
......@@ -1162,7 +1163,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_R16_EXT:
{
static const ANGLEFormatSet info(GL_R16_EXT,
static const Format info(GL_R16_EXT,
angle::Format::ID::R16_UNORM,
DXGI_FORMAT_R16_UNORM,
DXGI_FORMAT_R16_UNORM,
......@@ -1176,7 +1177,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_R16_SNORM_EXT:
{
static const ANGLEFormatSet info(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,
......@@ -1190,7 +1191,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_R32F:
{
static const ANGLEFormatSet info(GL_R32F,
static const Format info(GL_R32F,
angle::Format::ID::R32_FLOAT,
DXGI_FORMAT_R32_FLOAT,
DXGI_FORMAT_R32_FLOAT,
......@@ -1204,7 +1205,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_R32I:
{
static const ANGLEFormatSet info(GL_R32I,
static const Format info(GL_R32I,
angle::Format::ID::R32_SINT,
DXGI_FORMAT_R32_SINT,
DXGI_FORMAT_R32_SINT,
......@@ -1218,7 +1219,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_R32UI:
{
static const ANGLEFormatSet info(GL_R32UI,
static const Format info(GL_R32UI,
angle::Format::ID::R32_UINT,
DXGI_FORMAT_R32_UINT,
DXGI_FORMAT_R32_UINT,
......@@ -1232,7 +1233,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_R8:
{
static const ANGLEFormatSet info(GL_R8,
static const Format info(GL_R8,
angle::Format::ID::R8_UNORM,
DXGI_FORMAT_R8_UNORM,
DXGI_FORMAT_R8_UNORM,
......@@ -1246,7 +1247,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_R8I:
{
static const ANGLEFormatSet info(GL_R8I,
static const Format info(GL_R8I,
angle::Format::ID::R8_SINT,
DXGI_FORMAT_R8_SINT,
DXGI_FORMAT_R8_SINT,
......@@ -1260,7 +1261,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_R8UI:
{
static const ANGLEFormatSet info(GL_R8UI,
static const Format info(GL_R8UI,
angle::Format::ID::R8_UINT,
DXGI_FORMAT_R8_UINT,
DXGI_FORMAT_R8_UINT,
......@@ -1274,7 +1275,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_R8_SNORM:
{
static const ANGLEFormatSet info(GL_R8_SNORM,
static const Format info(GL_R8_SNORM,
angle::Format::ID::R8_SNORM,
DXGI_FORMAT_R8_SNORM,
DXGI_FORMAT_R8_SNORM,
......@@ -1288,7 +1289,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RG16F:
{
static const ANGLEFormatSet info(GL_RG16F,
static const Format info(GL_RG16F,
angle::Format::ID::R16G16_FLOAT,
DXGI_FORMAT_R16G16_FLOAT,
DXGI_FORMAT_R16G16_FLOAT,
......@@ -1302,7 +1303,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RG16I:
{
static const ANGLEFormatSet info(GL_RG16I,
static const Format info(GL_RG16I,
angle::Format::ID::R16G16_SINT,
DXGI_FORMAT_R16G16_SINT,
DXGI_FORMAT_R16G16_SINT,
......@@ -1316,7 +1317,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RG16UI:
{
static const ANGLEFormatSet info(GL_RG16UI,
static const Format info(GL_RG16UI,
angle::Format::ID::R16G16_UINT,
DXGI_FORMAT_R16G16_UINT,
DXGI_FORMAT_R16G16_UINT,
......@@ -1330,7 +1331,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RG16_EXT:
{
static const ANGLEFormatSet info(GL_RG16_EXT,
static const Format info(GL_RG16_EXT,
angle::Format::ID::R16G16_UNORM,
DXGI_FORMAT_R16G16_UNORM,
DXGI_FORMAT_R16G16_UNORM,
......@@ -1344,7 +1345,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RG16_SNORM_EXT:
{
static const ANGLEFormatSet info(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,
......@@ -1358,7 +1359,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RG32F:
{
static const ANGLEFormatSet info(GL_RG32F,
static const Format info(GL_RG32F,
angle::Format::ID::R32G32_FLOAT,
DXGI_FORMAT_R32G32_FLOAT,
DXGI_FORMAT_R32G32_FLOAT,
......@@ -1372,7 +1373,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RG32I:
{
static const ANGLEFormatSet info(GL_RG32I,
static const Format info(GL_RG32I,
angle::Format::ID::R32G32_SINT,
DXGI_FORMAT_R32G32_SINT,
DXGI_FORMAT_R32G32_SINT,
......@@ -1386,7 +1387,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RG32UI:
{
static const ANGLEFormatSet info(GL_RG32UI,
static const Format info(GL_RG32UI,
angle::Format::ID::R32G32_UINT,
DXGI_FORMAT_R32G32_UINT,
DXGI_FORMAT_R32G32_UINT,
......@@ -1400,7 +1401,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RG8:
{
static const ANGLEFormatSet info(GL_RG8,
static const Format info(GL_RG8,
angle::Format::ID::R8G8_UNORM,
DXGI_FORMAT_R8G8_UNORM,
DXGI_FORMAT_R8G8_UNORM,
......@@ -1414,7 +1415,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RG8I:
{
static const ANGLEFormatSet info(GL_RG8I,
static const Format info(GL_RG8I,
angle::Format::ID::R8G8_SINT,
DXGI_FORMAT_R8G8_SINT,
DXGI_FORMAT_R8G8_SINT,
......@@ -1428,7 +1429,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RG8UI:
{
static const ANGLEFormatSet info(GL_RG8UI,
static const Format info(GL_RG8UI,
angle::Format::ID::R8G8_UINT,
DXGI_FORMAT_R8G8_UINT,
DXGI_FORMAT_R8G8_UINT,
......@@ -1442,7 +1443,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RG8_SNORM:
{
static const ANGLEFormatSet info(GL_RG8_SNORM,
static const Format info(GL_RG8_SNORM,
angle::Format::ID::R8G8_SNORM,
DXGI_FORMAT_R8G8_SNORM,
DXGI_FORMAT_R8G8_SNORM,
......@@ -1456,7 +1457,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGB:
{
static const ANGLEFormatSet info(GL_RGB,
static const Format info(GL_RGB,
angle::Format::ID::R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
......@@ -1470,7 +1471,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGB10_A2:
{
static const ANGLEFormatSet info(GL_RGB10_A2,
static const Format info(GL_RGB10_A2,
angle::Format::ID::R10G10B10A2_UNORM,
DXGI_FORMAT_R10G10B10A2_UNORM,
DXGI_FORMAT_R10G10B10A2_UNORM,
......@@ -1484,7 +1485,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGB10_A2UI:
{
static const ANGLEFormatSet info(GL_RGB10_A2UI,
static const Format info(GL_RGB10_A2UI,
angle::Format::ID::R10G10B10A2_UINT,
DXGI_FORMAT_R10G10B10A2_UINT,
DXGI_FORMAT_R10G10B10A2_UINT,
......@@ -1498,7 +1499,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGB16F:
{
static const ANGLEFormatSet info(GL_RGB16F,
static const Format info(GL_RGB16F,
angle::Format::ID::R16G16B16A16_FLOAT,
DXGI_FORMAT_R16G16B16A16_FLOAT,
DXGI_FORMAT_R16G16B16A16_FLOAT,
......@@ -1512,7 +1513,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGB16I:
{
static const ANGLEFormatSet info(GL_RGB16I,
static const Format info(GL_RGB16I,
angle::Format::ID::R16G16B16A16_SINT,
DXGI_FORMAT_R16G16B16A16_SINT,
DXGI_FORMAT_R16G16B16A16_SINT,
......@@ -1526,7 +1527,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGB16UI:
{
static const ANGLEFormatSet info(GL_RGB16UI,
static const Format info(GL_RGB16UI,
angle::Format::ID::R16G16B16A16_UINT,
DXGI_FORMAT_R16G16B16A16_UINT,
DXGI_FORMAT_R16G16B16A16_UINT,
......@@ -1540,7 +1541,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGB16_EXT:
{
static const ANGLEFormatSet info(GL_RGB16_EXT,
static const Format info(GL_RGB16_EXT,
angle::Format::ID::R16G16B16A16_UNORM,
DXGI_FORMAT_R16G16B16A16_UNORM,
DXGI_FORMAT_R16G16B16A16_UNORM,
......@@ -1554,7 +1555,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGB16_SNORM_EXT:
{
static const ANGLEFormatSet info(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,
......@@ -1568,7 +1569,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGB32F:
{
static const ANGLEFormatSet info(GL_RGB32F,
static const Format info(GL_RGB32F,
angle::Format::ID::R32G32B32A32_FLOAT,
DXGI_FORMAT_R32G32B32A32_FLOAT,
DXGI_FORMAT_R32G32B32A32_FLOAT,
......@@ -1582,7 +1583,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGB32I:
{
static const ANGLEFormatSet info(GL_RGB32I,
static const Format info(GL_RGB32I,
angle::Format::ID::R32G32B32A32_SINT,
DXGI_FORMAT_R32G32B32A32_SINT,
DXGI_FORMAT_R32G32B32A32_SINT,
......@@ -1596,7 +1597,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGB32UI:
{
static const ANGLEFormatSet info(GL_RGB32UI,
static const Format info(GL_RGB32UI,
angle::Format::ID::R32G32B32A32_UINT,
DXGI_FORMAT_R32G32B32A32_UINT,
DXGI_FORMAT_R32G32B32A32_UINT,
......@@ -1612,7 +1613,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
{
if (SupportsFormat(DXGI_FORMAT_B5G6R5_UNORM, deviceCaps))
{
static const ANGLEFormatSet info(GL_RGB565,
static const Format info(GL_RGB565,
angle::Format::ID::B5G6R5_UNORM,
DXGI_FORMAT_B5G6R5_UNORM,
DXGI_FORMAT_B5G6R5_UNORM,
......@@ -1626,7 +1627,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
else
{
static const ANGLEFormatSet info(GL_RGB565,
static const Format info(GL_RGB565,
angle::Format::ID::R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
......@@ -1643,7 +1644,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
{
if (SupportsFormat(DXGI_FORMAT_B5G5R5A1_UNORM, deviceCaps))
{
static const ANGLEFormatSet info(GL_RGB5_A1,
static const Format info(GL_RGB5_A1,
angle::Format::ID::B5G5R5A1_UNORM,
DXGI_FORMAT_B5G5R5A1_UNORM,
DXGI_FORMAT_B5G5R5A1_UNORM,
......@@ -1657,7 +1658,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
else
{
static const ANGLEFormatSet info(GL_RGB5_A1,
static const Format info(GL_RGB5_A1,
angle::Format::ID::R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
......@@ -1672,7 +1673,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGB8:
{
static const ANGLEFormatSet info(GL_RGB8,
static const Format info(GL_RGB8,
angle::Format::ID::R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
......@@ -1686,7 +1687,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGB8I:
{
static const ANGLEFormatSet info(GL_RGB8I,
static const Format info(GL_RGB8I,
angle::Format::ID::R8G8B8A8_SINT,
DXGI_FORMAT_R8G8B8A8_SINT,
DXGI_FORMAT_R8G8B8A8_SINT,
......@@ -1700,7 +1701,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGB8UI:
{
static const ANGLEFormatSet info(GL_RGB8UI,
static const Format info(GL_RGB8UI,
angle::Format::ID::R8G8B8A8_UINT,
DXGI_FORMAT_R8G8B8A8_UINT,
DXGI_FORMAT_R8G8B8A8_UINT,
......@@ -1714,7 +1715,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGB8_SNORM:
{
static const ANGLEFormatSet info(GL_RGB8_SNORM,
static const Format info(GL_RGB8_SNORM,
angle::Format::ID::R8G8B8A8_SNORM,
DXGI_FORMAT_R8G8B8A8_SNORM,
DXGI_FORMAT_R8G8B8A8_SNORM,
......@@ -1728,7 +1729,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGB9_E5:
{
static const ANGLEFormatSet info(GL_RGB9_E5,
static const Format info(GL_RGB9_E5,
angle::Format::ID::R9G9B9E5_SHAREDEXP,
DXGI_FORMAT_R9G9B9E5_SHAREDEXP,
DXGI_FORMAT_R9G9B9E5_SHAREDEXP,
......@@ -1742,7 +1743,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGBA:
{
static const ANGLEFormatSet info(GL_RGBA,
static const Format info(GL_RGBA,
angle::Format::ID::R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
......@@ -1756,7 +1757,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGBA16F:
{
static const ANGLEFormatSet info(GL_RGBA16F,
static const Format info(GL_RGBA16F,
angle::Format::ID::R16G16B16A16_FLOAT,
DXGI_FORMAT_R16G16B16A16_FLOAT,
DXGI_FORMAT_R16G16B16A16_FLOAT,
......@@ -1770,7 +1771,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGBA16I:
{
static const ANGLEFormatSet info(GL_RGBA16I,
static const Format info(GL_RGBA16I,
angle::Format::ID::R16G16B16A16_SINT,
DXGI_FORMAT_R16G16B16A16_SINT,
DXGI_FORMAT_R16G16B16A16_SINT,
......@@ -1784,7 +1785,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGBA16UI:
{
static const ANGLEFormatSet info(GL_RGBA16UI,
static const Format info(GL_RGBA16UI,
angle::Format::ID::R16G16B16A16_UINT,
DXGI_FORMAT_R16G16B16A16_UINT,
DXGI_FORMAT_R16G16B16A16_UINT,
......@@ -1798,7 +1799,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGBA16_EXT:
{
static const ANGLEFormatSet info(GL_RGBA16_EXT,
static const Format info(GL_RGBA16_EXT,
angle::Format::ID::R16G16B16A16_UNORM,
DXGI_FORMAT_R16G16B16A16_UNORM,
DXGI_FORMAT_R16G16B16A16_UNORM,
......@@ -1812,7 +1813,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGBA16_SNORM_EXT:
{
static const ANGLEFormatSet info(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,
......@@ -1826,7 +1827,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGBA32F:
{
static const ANGLEFormatSet info(GL_RGBA32F,
static const Format info(GL_RGBA32F,
angle::Format::ID::R32G32B32A32_FLOAT,
DXGI_FORMAT_R32G32B32A32_FLOAT,
DXGI_FORMAT_R32G32B32A32_FLOAT,
......@@ -1840,7 +1841,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGBA32I:
{
static const ANGLEFormatSet info(GL_RGBA32I,
static const Format info(GL_RGBA32I,
angle::Format::ID::R32G32B32A32_SINT,
DXGI_FORMAT_R32G32B32A32_SINT,
DXGI_FORMAT_R32G32B32A32_SINT,
......@@ -1854,7 +1855,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGBA32UI:
{
static const ANGLEFormatSet info(GL_RGBA32UI,
static const Format info(GL_RGBA32UI,
angle::Format::ID::R32G32B32A32_UINT,
DXGI_FORMAT_R32G32B32A32_UINT,
DXGI_FORMAT_R32G32B32A32_UINT,
......@@ -1870,7 +1871,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
{
if (SupportsFormat(DXGI_FORMAT_B4G4R4A4_UNORM, deviceCaps))
{
static const ANGLEFormatSet info(GL_RGBA4,
static const Format info(GL_RGBA4,
angle::Format::ID::B4G4R4A4_UNORM,
DXGI_FORMAT_B4G4R4A4_UNORM,
DXGI_FORMAT_B4G4R4A4_UNORM,
......@@ -1884,7 +1885,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
else
{
static const ANGLEFormatSet info(GL_RGBA4,
static const Format info(GL_RGBA4,
angle::Format::ID::R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
......@@ -1899,7 +1900,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGBA8:
{
static const ANGLEFormatSet info(GL_RGBA8,
static const Format info(GL_RGBA8,
angle::Format::ID::R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
......@@ -1913,7 +1914,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGBA8I:
{
static const ANGLEFormatSet info(GL_RGBA8I,
static const Format info(GL_RGBA8I,
angle::Format::ID::R8G8B8A8_SINT,
DXGI_FORMAT_R8G8B8A8_SINT,
DXGI_FORMAT_R8G8B8A8_SINT,
......@@ -1927,7 +1928,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGBA8UI:
{
static const ANGLEFormatSet info(GL_RGBA8UI,
static const Format info(GL_RGBA8UI,
angle::Format::ID::R8G8B8A8_UINT,
DXGI_FORMAT_R8G8B8A8_UINT,
DXGI_FORMAT_R8G8B8A8_UINT,
......@@ -1941,7 +1942,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_RGBA8_SNORM:
{
static const ANGLEFormatSet info(GL_RGBA8_SNORM,
static const Format info(GL_RGBA8_SNORM,
angle::Format::ID::R8G8B8A8_SNORM,
DXGI_FORMAT_R8G8B8A8_SNORM,
DXGI_FORMAT_R8G8B8A8_SNORM,
......@@ -1955,7 +1956,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_SRGB8:
{
static const ANGLEFormatSet info(GL_SRGB8,
static const Format info(GL_SRGB8,
angle::Format::ID::R8G8B8A8_UNORM_SRGB,
DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
......@@ -1969,7 +1970,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
case GL_SRGB8_ALPHA8:
{
static const ANGLEFormatSet info(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,
......@@ -1985,7 +1986,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
{
if (OnlyFL10Plus(deviceCaps))
{
static const ANGLEFormatSet info(GL_STENCIL_INDEX8,
static const Format info(GL_STENCIL_INDEX8,
angle::Format::ID::D24_UNORM_S8_UINT,
DXGI_FORMAT_R24G8_TYPELESS,
DXGI_FORMAT_R24_UNORM_X8_TYPELESS,
......@@ -1999,7 +2000,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
}
else
{
static const ANGLEFormatSet info(GL_STENCIL_INDEX8,
static const Format info(GL_STENCIL_INDEX8,
angle::Format::ID::D24_UNORM_S8_UINT,
DXGI_FORMAT_D24_UNORM_S8_UINT,
DXGI_FORMAT_UNKNOWN,
......@@ -2019,7 +2020,7 @@ const ANGLEFormatSet &GetANGLEFormatSet(GLenum internalFormat,
// clang-format on
UNREACHABLE();
static const ANGLEFormatSet defaultInfo;
static const Format defaultInfo;
return defaultInfo;
}
......
......@@ -48,8 +48,8 @@ TEST_P(D3D11FormatTablesTest, TestFormatSupport)
const gl::FormatSet &allFormats = gl::GetAllSizedInternalFormats();
for (GLenum internalFormat : allFormats)
{
const rx::d3d11::ANGLEFormatSet &formatInfo =
rx::d3d11::GetANGLEFormatSet(internalFormat, renderer->getRenderer11DeviceCaps());
const rx::d3d11::Format &formatInfo =
rx::d3d11::Format::Get(internalFormat, renderer->getRenderer11DeviceCaps());
const auto &textureInfo = textureCaps.get(internalFormat);
// Bits for texturing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment