Commit 18591b7c by Geoff Lang Committed by Shannon Woods

Capitalized the first letter of all private format util functions.

TRAC #23212 Signed-off-by: Shannon Woods Author: Geoff Lang
parent 2e1dcd59
......@@ -37,7 +37,7 @@ struct D3D11ES3FormatInfo
typedef std::pair<GLint, D3D11ES3FormatInfo> D3D11ES3FormatPair;
typedef std::map<GLint, D3D11ES3FormatInfo> D3D11ES3FormatMap;
static D3D11ES3FormatMap buildD3D11ES3FormatMap()
static D3D11ES3FormatMap BuildD3D11ES3FormatMap()
{
D3D11ES3FormatMap map;
......@@ -152,9 +152,9 @@ static D3D11ES3FormatMap buildD3D11ES3FormatMap()
return map;
}
static bool getD3D11ES3FormatInfo(GLint internalFormat, GLuint clientVersion, D3D11ES3FormatInfo *outFormatInfo)
static bool GetD3D11ES3FormatInfo(GLint internalFormat, GLuint clientVersion, D3D11ES3FormatInfo *outFormatInfo)
{
static const D3D11ES3FormatMap formatMap = buildD3D11ES3FormatMap();
static const D3D11ES3FormatMap formatMap = BuildD3D11ES3FormatMap();
D3D11ES3FormatMap::const_iterator iter = formatMap.find(internalFormat);
if (iter != formatMap.end())
{
......@@ -355,7 +355,7 @@ struct D3D11ES2FormatInfo
typedef std::pair<GLint, D3D11ES2FormatInfo> D3D11ES2FormatPair;
typedef std::map<GLint, D3D11ES2FormatInfo> D3D11ES2FormatMap;
static D3D11ES2FormatMap buildD3D11ES2FormatMap()
static D3D11ES2FormatMap BuildD3D11ES2FormatMap()
{
D3D11ES2FormatMap map;
......@@ -399,9 +399,9 @@ static D3D11ES2FormatMap buildD3D11ES2FormatMap()
return map;
}
static bool getD3D11ES2FormatInfo(GLint internalFormat, GLuint clientVersion, D3D11ES2FormatInfo *outFormatInfo)
static bool GetD3D11ES2FormatInfo(GLint internalFormat, GLuint clientVersion, D3D11ES2FormatInfo *outFormatInfo)
{
static const D3D11ES2FormatMap formatMap = buildD3D11ES2FormatMap();
static const D3D11ES2FormatMap formatMap = BuildD3D11ES2FormatMap();
D3D11ES2FormatMap::const_iterator iter = formatMap.find(internalFormat);
if (iter != formatMap.end())
{
......@@ -441,7 +441,7 @@ struct DXGIFormatInfo
typedef std::pair<DXGI_FORMAT, DXGIFormatInfo> DXGIFormatInfoPair;
typedef std::map<DXGI_FORMAT, DXGIFormatInfo> DXGIFormatInfoMap;
static DXGIFormatInfoMap buildDXGIFormatInfoMap()
static DXGIFormatInfoMap BuildDXGIFormatInfoMap()
{
DXGIFormatInfoMap map;
......@@ -514,11 +514,11 @@ static DXGIFormatInfoMap buildDXGIFormatInfoMap()
static const DXGIFormatInfoMap &GetDXGIFormatInfoMap()
{
static const DXGIFormatInfoMap infoMap = buildDXGIFormatInfoMap();
static const DXGIFormatInfoMap infoMap = BuildDXGIFormatInfoMap();
return infoMap;
}
static bool getDXGIFormatInfo(DXGI_FORMAT format, DXGIFormatInfo *outFormatInfo)
static bool GetDXGIFormatInfo(DXGI_FORMAT format, DXGIFormatInfo *outFormatInfo)
{
const DXGIFormatInfoMap &infoMap = GetDXGIFormatInfoMap();
DXGIFormatInfoMap::const_iterator iter = infoMap.find(format);
......@@ -555,7 +555,7 @@ namespace d3d11
MipGenerationFunction GetMipGenerationFunction(DXGI_FORMAT format)
{
DXGIFormatInfo formatInfo;
if (getDXGIFormatInfo(format, &formatInfo))
if (GetDXGIFormatInfo(format, &formatInfo))
{
return formatInfo.mMipGenerationFunction;
}
......@@ -571,7 +571,7 @@ LoadImageFunction GetImageLoadFunction(GLint internalFormat, GLenum type, GLuint
if (clientVersion == 2)
{
D3D11ES2FormatInfo d3d11FormatInfo;
if (getD3D11ES2FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
if (GetD3D11ES2FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
{
return d3d11FormatInfo.mLoadImageFunction;
}
......@@ -605,7 +605,7 @@ LoadImageFunction GetImageLoadFunction(GLint internalFormat, GLenum type, GLuint
GLuint GetFormatPixelBytes(DXGI_FORMAT format)
{
DXGIFormatInfo dxgiFormatInfo;
if (getDXGIFormatInfo(format, &dxgiFormatInfo))
if (GetDXGIFormatInfo(format, &dxgiFormatInfo))
{
return dxgiFormatInfo.mPixelBits / 8;
}
......@@ -619,7 +619,7 @@ GLuint GetFormatPixelBytes(DXGI_FORMAT format)
GLuint GetBlockWidth(DXGI_FORMAT format)
{
DXGIFormatInfo dxgiFormatInfo;
if (getDXGIFormatInfo(format, &dxgiFormatInfo))
if (GetDXGIFormatInfo(format, &dxgiFormatInfo))
{
return dxgiFormatInfo.mBlockWidth;
}
......@@ -633,7 +633,7 @@ GLuint GetBlockWidth(DXGI_FORMAT format)
GLuint GetBlockHeight(DXGI_FORMAT format)
{
DXGIFormatInfo dxgiFormatInfo;
if (getDXGIFormatInfo(format, &dxgiFormatInfo))
if (GetDXGIFormatInfo(format, &dxgiFormatInfo))
{
return dxgiFormatInfo.mBlockHeight;
}
......@@ -647,7 +647,7 @@ GLuint GetBlockHeight(DXGI_FORMAT format)
void MakeValidSize(bool isImage, DXGI_FORMAT format, GLsizei *requestWidth, GLsizei *requestHeight, int *levelOffset)
{
DXGIFormatInfo dxgiFormatInfo;
if (getDXGIFormatInfo(format, &dxgiFormatInfo))
if (GetDXGIFormatInfo(format, &dxgiFormatInfo))
{
int upsampleCount = 0;
......@@ -688,7 +688,7 @@ DXGI_FORMAT GetTexFormat(GLint internalFormat, GLuint clientVersion)
if (clientVersion == 2)
{
D3D11ES2FormatInfo d3d11FormatInfo;
if (getD3D11ES2FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
if (GetD3D11ES2FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
{
return d3d11FormatInfo.mTexFormat;
}
......@@ -701,7 +701,7 @@ DXGI_FORMAT GetTexFormat(GLint internalFormat, GLuint clientVersion)
else if (clientVersion == 3)
{
D3D11ES3FormatInfo d3d11FormatInfo;
if (getD3D11ES3FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
if (GetD3D11ES3FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
{
return d3d11FormatInfo.mTexFormat;
}
......@@ -723,7 +723,7 @@ DXGI_FORMAT GetSRVFormat(GLint internalFormat, GLuint clientVersion)
if (clientVersion == 2)
{
D3D11ES2FormatInfo d3d11FormatInfo;
if (getD3D11ES2FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
if (GetD3D11ES2FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
{
return d3d11FormatInfo.mSRVFormat;
}
......@@ -736,7 +736,7 @@ DXGI_FORMAT GetSRVFormat(GLint internalFormat, GLuint clientVersion)
else if (clientVersion == 3)
{
D3D11ES3FormatInfo d3d11FormatInfo;
if (getD3D11ES3FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
if (GetD3D11ES3FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
{
return d3d11FormatInfo.mSRVFormat;
}
......@@ -758,7 +758,7 @@ DXGI_FORMAT GetRTVFormat(GLint internalFormat, GLuint clientVersion)
if (clientVersion == 2)
{
D3D11ES2FormatInfo d3d11FormatInfo;
if (getD3D11ES2FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
if (GetD3D11ES2FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
{
return d3d11FormatInfo.mRTVFormat;
}
......@@ -771,7 +771,7 @@ DXGI_FORMAT GetRTVFormat(GLint internalFormat, GLuint clientVersion)
else if (clientVersion == 3)
{
D3D11ES3FormatInfo d3d11FormatInfo;
if (getD3D11ES3FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
if (GetD3D11ES3FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
{
return d3d11FormatInfo.mRTVFormat;
}
......@@ -793,7 +793,7 @@ DXGI_FORMAT GetDSVFormat(GLint internalFormat, GLuint clientVersion)
if (clientVersion == 2)
{
D3D11ES2FormatInfo d3d11FormatInfo;
if (getD3D11ES2FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
if (GetD3D11ES2FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
{
return d3d11FormatInfo.mDSVFormat;
}
......@@ -805,7 +805,7 @@ DXGI_FORMAT GetDSVFormat(GLint internalFormat, GLuint clientVersion)
else if (clientVersion == 3)
{
D3D11ES3FormatInfo d3d11FormatInfo;
if (getD3D11ES3FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
if (GetD3D11ES3FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
{
return d3d11FormatInfo.mDSVFormat;
}
......@@ -829,7 +829,7 @@ namespace d3d11_gl
GLint GetInternalFormat(DXGI_FORMAT format)
{
DXGIFormatInfo formatInfo;
if (getDXGIFormatInfo(format, &formatInfo))
if (GetDXGIFormatInfo(format, &formatInfo))
{
return formatInfo.mInternalFormat;
}
......
......@@ -85,7 +85,7 @@ const D3DFORMAT D3DFMT_NULL = ((D3DFORMAT)(MAKEFOURCC('N','U','L','L')));
typedef std::pair<GLint, D3D9FormatInfo> D3D9FormatPair;
typedef std::map<GLint, D3D9FormatInfo> D3D9FormatMap;
static D3D9FormatMap buildD3D9FormatMap()
static D3D9FormatMap BuildD3D9FormatMap()
{
D3D9FormatMap map;
......@@ -134,9 +134,9 @@ static D3D9FormatMap buildD3D9FormatMap()
return map;
}
static bool getD3D9FormatInfo(GLint internalFormat, D3D9FormatInfo *outFormatInfo)
static bool GetD3D9FormatInfo(GLint internalFormat, D3D9FormatInfo *outFormatInfo)
{
static const D3D9FormatMap formatMap = buildD3D9FormatMap();
static const D3D9FormatMap formatMap = BuildD3D9FormatMap();
D3D9FormatMap::const_iterator iter = formatMap.find(internalFormat);
if (iter != formatMap.end())
{
......@@ -176,7 +176,7 @@ struct D3DFormatInfo
typedef std::pair<D3DFORMAT, D3DFormatInfo> D3D9FormatInfoPair;
typedef std::map<D3DFORMAT, D3DFormatInfo> D3D9FormatInfoMap;
static D3D9FormatInfoMap buildD3D9FormatInfoMap()
static D3D9FormatInfoMap BuildD3D9FormatInfoMap()
{
D3D9FormatInfoMap map;
......@@ -211,11 +211,11 @@ static D3D9FormatInfoMap buildD3D9FormatInfoMap()
static const D3D9FormatInfoMap &GetD3D9FormatInfoMap()
{
static const D3D9FormatInfoMap infoMap = buildD3D9FormatInfoMap();
static const D3D9FormatInfoMap infoMap = BuildD3D9FormatInfoMap();
return infoMap;
}
static bool getD3D9FormatInfo(D3DFORMAT format, D3DFormatInfo *outFormatInfo)
static bool GetD3D9FormatInfo(D3DFORMAT format, D3DFormatInfo *outFormatInfo)
{
const D3D9FormatInfoMap &infoMap = GetD3D9FormatInfoMap();
D3D9FormatInfoMap::const_iterator iter = infoMap.find(format);
......@@ -251,7 +251,7 @@ namespace d3d9
MipGenerationFunction GetMipGenerationFunction(D3DFORMAT format)
{
D3DFormatInfo d3dFormatInfo;
if (getD3D9FormatInfo(format, &d3dFormatInfo))
if (GetD3D9FormatInfo(format, &d3dFormatInfo))
{
return d3dFormatInfo.mMipGenerationFunction;
}
......@@ -272,7 +272,7 @@ LoadImageFunction GetImageLoadFunction(GLint internalFormat, const Renderer9 *re
ASSERT(renderer->getCurrentClientVersion() == 2);
D3D9FormatInfo d3d9FormatInfo;
if (getD3D9FormatInfo(internalFormat, &d3d9FormatInfo))
if (GetD3D9FormatInfo(internalFormat, &d3d9FormatInfo))
{
return d3d9FormatInfo.mLoadFunction(renderer);
}
......@@ -286,7 +286,7 @@ LoadImageFunction GetImageLoadFunction(GLint internalFormat, const Renderer9 *re
GLuint GetFormatPixelBytes(D3DFORMAT format)
{
D3DFormatInfo d3dFormatInfo;
if (getD3D9FormatInfo(format, &d3dFormatInfo))
if (GetD3D9FormatInfo(format, &d3dFormatInfo))
{
return d3dFormatInfo.mPixelBits / 8;
}
......@@ -300,7 +300,7 @@ GLuint GetFormatPixelBytes(D3DFORMAT format)
GLuint GetBlockWidth(D3DFORMAT format)
{
D3DFormatInfo d3dFormatInfo;
if (getD3D9FormatInfo(format, &d3dFormatInfo))
if (GetD3D9FormatInfo(format, &d3dFormatInfo))
{
return d3dFormatInfo.mBlockWidth;
}
......@@ -314,7 +314,7 @@ GLuint GetBlockWidth(D3DFORMAT format)
GLuint GetBlockHeight(D3DFORMAT format)
{
D3DFormatInfo d3dFormatInfo;
if (getD3D9FormatInfo(format, &d3dFormatInfo))
if (GetD3D9FormatInfo(format, &d3dFormatInfo))
{
return d3dFormatInfo.mBlockHeight;
}
......@@ -328,7 +328,7 @@ GLuint GetBlockHeight(D3DFORMAT format)
GLuint GetBlockSize(D3DFORMAT format, GLuint width, GLuint height)
{
D3DFormatInfo d3dFormatInfo;
if (getD3D9FormatInfo(format, &d3dFormatInfo))
if (GetD3D9FormatInfo(format, &d3dFormatInfo))
{
GLuint numBlocksWide = (width + d3dFormatInfo.mBlockWidth - 1) / d3dFormatInfo.mBlockWidth;
GLuint numBlocksHight = (height + d3dFormatInfo.mBlockHeight - 1) / d3dFormatInfo.mBlockHeight;
......@@ -345,7 +345,7 @@ GLuint GetBlockSize(D3DFORMAT format, GLuint width, GLuint height)
void MakeValidSize(bool isImage, D3DFORMAT format, GLsizei *requestWidth, GLsizei *requestHeight, int *levelOffset)
{
D3DFormatInfo d3dFormatInfo;
if (getD3D9FormatInfo(format, &d3dFormatInfo))
if (GetD3D9FormatInfo(format, &d3dFormatInfo))
{
int upsampleCount = 0;
......@@ -388,7 +388,7 @@ D3DFORMAT GetTexureFormat(GLint internalFormat, const Renderer9 *renderer)
ASSERT(renderer->getCurrentClientVersion() == 2);
D3D9FormatInfo d3d9FormatInfo;
if (getD3D9FormatInfo(internalFormat, &d3d9FormatInfo))
if (GetD3D9FormatInfo(internalFormat, &d3d9FormatInfo))
{
return d3d9FormatInfo.mTexFormat(renderer);
}
......@@ -410,7 +410,7 @@ D3DFORMAT GetRenderFormat(GLint internalFormat, const Renderer9 *renderer)
ASSERT(renderer->getCurrentClientVersion() == 2);
D3D9FormatInfo d3d9FormatInfo;
if (getD3D9FormatInfo(internalFormat, &d3d9FormatInfo))
if (GetD3D9FormatInfo(internalFormat, &d3d9FormatInfo))
{
return d3d9FormatInfo.mRenderFormat(renderer);
}
......@@ -433,7 +433,7 @@ namespace d3d9_gl
GLint GetInternalFormat(D3DFORMAT format)
{
static const D3D9FormatInfoMap infoMap = buildD3D9FormatInfoMap();
static const D3D9FormatInfoMap infoMap = BuildD3D9FormatInfoMap();
D3D9FormatInfoMap::const_iterator iter = infoMap.find(format);
if (iter != infoMap.end())
{
......
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