Commit 1a8eec63 by Jamie Madill Committed by Commit Bot

Rename FromGL to PackParam.

This will allow us to use the same method with EGL without complications. Bug: angleproject:2621 Change-Id: I03dea2291adc13025723fe02eb47b76a74cef911 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2562679 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com>
parent 9528641b
......@@ -8,7 +8,7 @@
"scripts/entry_point_packed_gl_enums.json":
"846be5dc8cb36076207699b025633fcc",
"scripts/generate_entry_points.py":
"bb94fd89ca25c807c3ec622d1d0c5e82",
"6e65c837b023f25f368edf0b91146951",
"scripts/gl.xml":
"f66967f3f3d696b5d8306fd80bbd49a8",
"scripts/gl_angle_ext.xml":
......@@ -158,75 +158,75 @@
"src/libEGL/libEGL_autogen.def":
"3f504d6280dc1d847bc2dedc51fa2640",
"src/libGL/entry_points_gl_1_0_autogen.cpp":
"28eb68b531e649ecf40b06fcab9765b0",
"cccd1df8c0785f1951cb95577b1355c5",
"src/libGL/entry_points_gl_1_0_autogen.h":
"4ff00afc21780bc6c138b5431a2d067c",
"src/libGL/entry_points_gl_1_1_autogen.cpp":
"9596ad7a8efea9eb6d089042c91039e5",
"f85f15b7f9c77576e587f310d9103b5c",
"src/libGL/entry_points_gl_1_1_autogen.h":
"570a839bb336d8f5f83d3b50fe49411a",
"src/libGL/entry_points_gl_1_2_autogen.cpp":
"6c5a7f3a303fa601c9c13b93aca71b7d",
"863d5185d80707cf405a7470c8d8d19e",
"src/libGL/entry_points_gl_1_2_autogen.h":
"3f52187f299fe96672384e1646f4a1cb",
"src/libGL/entry_points_gl_1_3_autogen.cpp":
"4fdfdaf00b1e93ceae26ab7731c453f1",
"cd7437a35dda1bc5fb8d86804edce1fb",
"src/libGL/entry_points_gl_1_3_autogen.h":
"5ea36d869b82a824d5f290625c4ea052",
"src/libGL/entry_points_gl_1_4_autogen.cpp":
"74c028f76e5aa106742510c58e86730d",
"ad85ebc4ec55e1e3d508cbef5351e5d3",
"src/libGL/entry_points_gl_1_4_autogen.h":
"2c5d31ca248507a024e4724c74283ec4",
"src/libGL/entry_points_gl_1_5_autogen.cpp":
"875fcc7d7f7067e19dbc754c5d72610a",
"0ed918d8bf3ffcaccc4581fa11e26bee",
"src/libGL/entry_points_gl_1_5_autogen.h":
"978457aa9a40e427846b6dea24608903",
"src/libGL/entry_points_gl_2_0_autogen.cpp":
"3addc02c89691aed9a3ff71905b1ba22",
"716371dadff9415f51d9bdc6e5564d09",
"src/libGL/entry_points_gl_2_0_autogen.h":
"41b0cd064167fac84bcdb1896a275b1b",
"src/libGL/entry_points_gl_2_1_autogen.cpp":
"a5c773c069edcde80dd825d2da13a994",
"5776610de7ba0a2b40a7236e0bba11b6",
"src/libGL/entry_points_gl_2_1_autogen.h":
"1da48dec560ea5ff8cadf4d0b6bfde1c",
"src/libGL/entry_points_gl_3_0_autogen.cpp":
"723acbee3f2ca25474965e948b8f49ac",
"0a11ccbc078ab6447383412448248fa8",
"src/libGL/entry_points_gl_3_0_autogen.h":
"0fad8005f23815beb8ee9b3797c00b83",
"src/libGL/entry_points_gl_3_1_autogen.cpp":
"035d3b50c22fecd29af8224beb71b0a8",
"d5cc050b6a958675e9e89c6da3bd2ed1",
"src/libGL/entry_points_gl_3_1_autogen.h":
"a68ff6c69f0ce95d9730e22bb4c63366",
"src/libGL/entry_points_gl_3_2_autogen.cpp":
"3038b5070ed7f14809a434702a23d76e",
"1a796d1c5de778865c78aadf2fbf5f72",
"src/libGL/entry_points_gl_3_2_autogen.h":
"f162c4e93a64ab2e43048a0937f7c46f",
"src/libGL/entry_points_gl_3_3_autogen.cpp":
"b7bc975504fbde8f35fb69d435c83ab6",
"efbca93c2b5f7dba67c0d8eb13faef8e",
"src/libGL/entry_points_gl_3_3_autogen.h":
"51c0e4f074c85447f5d910c63b9ea61c",
"src/libGL/entry_points_gl_4_0_autogen.cpp":
"c9a61abc9dbd97f5d6ada4eded714c3d",
"7313ef950492b3b1046eed27195b6990",
"src/libGL/entry_points_gl_4_0_autogen.h":
"35d611138951cebc29db99c9bf3a9e5f",
"src/libGL/entry_points_gl_4_1_autogen.cpp":
"68b0f527d5cf4c5402d14a8b4f62f8aa",
"1b95df2130b547d42729ac3c7ac7ed69",
"src/libGL/entry_points_gl_4_1_autogen.h":
"beec6659a3a77695dad66df90717c6ba",
"src/libGL/entry_points_gl_4_2_autogen.cpp":
"bdb4fce60f2bdf2af14b4c7d936a6cf2",
"043946da094ff14f04a20e82eee8ac61",
"src/libGL/entry_points_gl_4_2_autogen.h":
"a2cb2a48cceaf6131f96bf8ec556aa55",
"src/libGL/entry_points_gl_4_3_autogen.cpp":
"bf5340938b34e58b0433549f5a6466b8",
"a629b993831a9970f913b997cf9a89fe",
"src/libGL/entry_points_gl_4_3_autogen.h":
"abfa431742a2b643db21220944e10ab0",
"src/libGL/entry_points_gl_4_4_autogen.cpp":
"5254bb09a79af636741043679c7188e0",
"7a8d2dc58cd665fdf1f27679f2de75df",
"src/libGL/entry_points_gl_4_4_autogen.h":
"cdf1651f00d26db547b153afc09acc1c",
"src/libGL/entry_points_gl_4_5_autogen.cpp":
"24f4a6d48d0543baf16f20c54a80e485",
"9055579df2c403f2122a4a65f2b58573",
"src/libGL/entry_points_gl_4_5_autogen.h":
"9f5de9513c06b82aca60856860f7b716",
"src/libGL/entry_points_gl_4_6_autogen.cpp":
......@@ -242,27 +242,27 @@
"src/libGLESv2/entry_points_egl_ext_autogen.h":
"9154781afd9bd6354ec6fc201b43c790",
"src/libGLESv2/entry_points_gles_1_0_autogen.cpp":
"11728cb449ab267e6515bae9e75e1499",
"7d62e6f5a013b303c11a6b78b39ff3fb",
"src/libGLESv2/entry_points_gles_1_0_autogen.h":
"899dcff9383465380f94fbdfe5bcf0a0",
"src/libGLESv2/entry_points_gles_2_0_autogen.cpp":
"3da7e3b668f53bc3503d9aa65471ed13",
"f65e421cc249831c0da2c70836156a78",
"src/libGLESv2/entry_points_gles_2_0_autogen.h":
"26387e27cbddf5e34d6cd9f850cb8b64",
"src/libGLESv2/entry_points_gles_3_0_autogen.cpp":
"28f3c1c4bce7cabeb7e0d738ce8b8465",
"c631759ce4615b8ec9465bf13870e8eb",
"src/libGLESv2/entry_points_gles_3_0_autogen.h":
"0d246024379fbf55b87204db5d6a37e3",
"src/libGLESv2/entry_points_gles_3_1_autogen.cpp":
"11c604313bf22efe71eff47f5be0a682",
"12c36295425182cd450dfabc9ab0df3d",
"src/libGLESv2/entry_points_gles_3_1_autogen.h":
"69bae5c94ed4665836a8464b6c353f9a",
"src/libGLESv2/entry_points_gles_3_2_autogen.cpp":
"a211ca4f8ddcb7165caa4b3c8c7d47ca",
"e7009132df507f893f95f70a44d06dae",
"src/libGLESv2/entry_points_gles_3_2_autogen.h":
"5798aa0a73af1d4ba5dfe99b6217a247",
"src/libGLESv2/entry_points_gles_ext_autogen.cpp":
"fdbdace04f00644597a0a0921003a645",
"51d06ec93e82d76b2d15ad69f09e57bf",
"src/libGLESv2/entry_points_gles_ext_autogen.h":
"5076b144ea0e7acf77bd2a0078588716",
"src/libGLESv2/libGLESv2_autogen.cpp":
......
......@@ -1131,8 +1131,8 @@ def format_entry_point_def(api, command_node, cmd_name, proto, params, is_explic
internal_name = name + "Packed"
internal_type = packed_gl_enums[name]
packed_gl_enum_conversions += [
"\n " + internal_type + " " + internal_name + " = FromGL<" + internal_type +
">(" + name + ");"
"\n " + internal_type + " " + internal_name + " = PackParam<" +
internal_type + ">(" + name + ");"
]
pass_params = [param_print_argument(command_node, param) for param in params]
......
......@@ -730,7 +730,7 @@ inline GLuint GetIDValue(ResourceIDType id)
// First case: handling packed enums.
template <typename EnumT, typename FromT>
typename std::enable_if<std::is_enum<EnumT>::value, EnumT>::type FromGL(FromT from)
typename std::enable_if<std::is_enum<EnumT>::value, EnumT>::type PackParam(FromT from)
{
return FromGLenum<EnumT>(from);
}
......@@ -738,7 +738,7 @@ typename std::enable_if<std::is_enum<EnumT>::value, EnumT>::type FromGL(FromT fr
// Second case: handling non-pointer resource ids.
template <typename EnumT, typename FromT>
typename std::enable_if<!std::is_pointer<FromT>::value && !std::is_enum<EnumT>::value, EnumT>::type
FromGL(FromT from)
PackParam(FromT from)
{
return {from};
}
......@@ -746,7 +746,7 @@ FromGL(FromT from)
// Third case: handling pointer resource ids.
template <typename EnumT, typename FromT>
typename std::enable_if<std::is_pointer<FromT>::value && !std::is_enum<EnumT>::value, EnumT>::type
FromGL(FromT from)
PackParam(FromT from)
{
return reinterpret_cast<EnumT>(from);
}
......
......@@ -782,14 +782,14 @@ ProgramPipelineID Context::createProgramPipeline()
GLuint Context::createShaderProgramv(ShaderType type, GLsizei count, const GLchar *const *strings)
{
const ShaderProgramID shaderID = FromGL<ShaderProgramID>(createShader(type));
const ShaderProgramID shaderID = PackParam<ShaderProgramID>(createShader(type));
if (shaderID.value)
{
Shader *shaderObject = getShader(shaderID);
ASSERT(shaderObject);
shaderObject->setSource(count, strings, nullptr);
shaderObject->compile(this);
const ShaderProgramID programID = FromGL<ShaderProgramID>(createProgram());
const ShaderProgramID programID = PackParam<ShaderProgramID>(createProgram());
if (programID.value)
{
gl::Program *programObject = getProgramNoResolveLink(programID);
......@@ -4169,11 +4169,11 @@ void Context::copyImageSubData(GLuint srcName,
if (srcTarget == GL_RENDERBUFFER)
{
// Source target is a Renderbuffer
Renderbuffer *readBuffer = getRenderbuffer(FromGL<RenderbufferID>(srcName));
Renderbuffer *readBuffer = getRenderbuffer(PackParam<RenderbufferID>(srcName));
if (dstTarget == GL_RENDERBUFFER)
{
// Destination target is a Renderbuffer
Renderbuffer *writeBuffer = getRenderbuffer(FromGL<RenderbufferID>(dstName));
Renderbuffer *writeBuffer = getRenderbuffer(PackParam<RenderbufferID>(dstName));
// Copy Renderbuffer to Renderbuffer
ANGLE_CONTEXT_TRY(writeBuffer->copyRenderbufferSubData(
......@@ -4186,7 +4186,7 @@ void Context::copyImageSubData(GLuint srcName,
ASSERT(dstTarget == GL_TEXTURE_2D || dstTarget == GL_TEXTURE_2D_ARRAY ||
dstTarget == GL_TEXTURE_3D || dstTarget == GL_TEXTURE_CUBE_MAP);
Texture *writeTexture = getTexture(FromGL<TextureID>(dstName));
Texture *writeTexture = getTexture(PackParam<TextureID>(dstName));
ANGLE_CONTEXT_TRY(syncTextureForCopy(writeTexture));
// Copy Renderbuffer to Texture
......@@ -4201,13 +4201,13 @@ void Context::copyImageSubData(GLuint srcName,
ASSERT(srcTarget == GL_TEXTURE_2D || srcTarget == GL_TEXTURE_2D_ARRAY ||
srcTarget == GL_TEXTURE_3D || srcTarget == GL_TEXTURE_CUBE_MAP);
Texture *readTexture = getTexture(FromGL<TextureID>(srcName));
Texture *readTexture = getTexture(PackParam<TextureID>(srcName));
ANGLE_CONTEXT_TRY(syncTextureForCopy(readTexture));
if (dstTarget == GL_RENDERBUFFER)
{
// Destination target is a Renderbuffer
Renderbuffer *writeBuffer = getRenderbuffer(FromGL<RenderbufferID>(dstName));
Renderbuffer *writeBuffer = getRenderbuffer(PackParam<RenderbufferID>(dstName));
// Copy Texture to Renderbuffer
ANGLE_CONTEXT_TRY(writeBuffer->copyTextureSubData(this, readTexture, srcLevel, srcX,
......@@ -4220,7 +4220,7 @@ void Context::copyImageSubData(GLuint srcName,
ASSERT(dstTarget == GL_TEXTURE_2D || dstTarget == GL_TEXTURE_2D_ARRAY ||
dstTarget == GL_TEXTURE_3D || dstTarget == GL_TEXTURE_CUBE_MAP);
Texture *writeTexture = getTexture(FromGL<TextureID>(dstName));
Texture *writeTexture = getTexture(PackParam<TextureID>(dstName));
ANGLE_CONTEXT_TRY(syncTextureForCopy(writeTexture));
// Copy Texture to Texture
......
......@@ -33,7 +33,7 @@ template <typename ResourceType, typename IDType>
IDType AllocateEmptyObject(HandleAllocator *handleAllocator,
ResourceMap<ResourceType, IDType> *objectMap)
{
IDType handle = FromGL<IDType>(handleAllocator->allocate());
IDType handle = PackParam<IDType>(handleAllocator->allocate());
objectMap->assign(handle, nullptr);
return handle;
}
......
......@@ -2633,7 +2633,7 @@ bool ValidateCopyImageSubDataTarget(const Context *context, GLuint name, GLenum
{
case GL_RENDERBUFFER:
{
RenderbufferID renderbuffer = FromGL<RenderbufferID>(name);
RenderbufferID renderbuffer = PackParam<RenderbufferID>(name);
if (!context->isRenderbuffer(renderbuffer))
{
context->validationError(GL_INVALID_VALUE, kInvalidRenderbufferName);
......@@ -2647,7 +2647,7 @@ bool ValidateCopyImageSubDataTarget(const Context *context, GLuint name, GLenum
case GL_TEXTURE_CUBE_MAP:
case GL_TEXTURE_CUBE_MAP_ARRAY_EXT:
{
TextureID texture = FromGL<TextureID>(name);
TextureID texture = PackParam<TextureID>(name);
if (!context->isTexture(texture))
{
context->validationError(GL_INVALID_VALUE, kInvalidTextureName);
......@@ -2655,7 +2655,7 @@ bool ValidateCopyImageSubDataTarget(const Context *context, GLuint name, GLenum
}
Texture *textureObject = context->getTexture(texture);
if (textureObject && textureObject->getType() != FromGL<TextureType>(target))
if (textureObject && textureObject->getType() != PackParam<TextureType>(target))
{
context->validationError(GL_INVALID_VALUE, err::kTextureTypeMismatch);
return false;
......@@ -2701,7 +2701,7 @@ bool ValidateCopyImageSubDataTargetRegion(const Context *context,
// INVALID_VALUE is generated if the dimensions of the either subregion exceeds the
// boundaries of the corresponding image object
Renderbuffer *buffer = context->getRenderbuffer(FromGL<RenderbufferID>(name));
Renderbuffer *buffer = context->getRenderbuffer(PackParam<RenderbufferID>(name));
if ((buffer->getWidth() - offsetX < width) || (buffer->getHeight() - offsetY < height))
{
context->validationError(GL_INVALID_VALUE, kSourceTextureTooSmall);
......@@ -2711,13 +2711,13 @@ bool ValidateCopyImageSubDataTargetRegion(const Context *context,
else
{
// INVALID_VALUE is generated if the specified level is not a valid level for the image
if (!ValidMipLevel(context, FromGL<TextureType>(target), level))
if (!ValidMipLevel(context, PackParam<TextureType>(target), level))
{
context->validationError(GL_INVALID_VALUE, kInvalidMipLevel);
return false;
}
Texture *texture = context->getTexture(FromGL<TextureID>(name));
Texture *texture = context->getTexture(PackParam<TextureID>(name));
// INVALID_OPERATION is generated if either object is a texture and the texture is not
// complete
......@@ -2737,9 +2737,9 @@ bool ValidateCopyImageSubDataTargetRegion(const Context *context,
}
const GLsizei textureWidth = static_cast<GLsizei>(
texture->getWidth(FromGL<TextureTarget>(textureTargetToUse), level));
texture->getWidth(PackParam<TextureTarget>(textureTargetToUse), level));
const GLsizei textureHeight = static_cast<GLsizei>(
texture->getHeight(FromGL<TextureTarget>(textureTargetToUse), level));
texture->getHeight(PackParam<TextureTarget>(textureTargetToUse), level));
// INVALID_VALUE is generated if the dimensions of the either subregion exceeds the
// boundaries of the corresponding image object
......@@ -2749,7 +2749,7 @@ bool ValidateCopyImageSubDataTargetRegion(const Context *context,
return false;
}
*samples = texture->getSamples(FromGL<TextureTarget>(textureTargetToUse), level);
*samples = texture->getSamples(PackParam<TextureTarget>(textureTargetToUse), level);
*samples = (*samples == 0) ? 1 : *samples;
}
......@@ -2787,7 +2787,7 @@ const InternalFormat &GetTargetFormatInfo(const Context *context,
{
case GL_RENDERBUFFER:
{
Renderbuffer *buffer = context->getRenderbuffer(FromGL<RenderbufferID>(name));
Renderbuffer *buffer = context->getRenderbuffer(PackParam<RenderbufferID>(name));
return *buffer->getFormat().info;
break;
}
......@@ -2797,7 +2797,7 @@ const InternalFormat &GetTargetFormatInfo(const Context *context,
case GL_TEXTURE_CUBE_MAP:
case GL_TEXTURE_CUBE_MAP_ARRAY_EXT:
{
Texture *texture = context->getTexture(FromGL<TextureID>(name));
Texture *texture = context->getTexture(PackParam<TextureID>(name));
GLenum textureTargetToUse = target;
if (target == GL_TEXTURE_CUBE_MAP)
......@@ -2806,7 +2806,7 @@ const InternalFormat &GetTargetFormatInfo(const Context *context,
// textureWidth/textureHeight
textureTargetToUse = GL_TEXTURE_CUBE_MAP_POSITIVE_X;
}
return *texture->getFormat(FromGL<TextureTarget>(textureTargetToUse), level).info;
return *texture->getFormat(PackParam<TextureTarget>(textureTargetToUse), level).info;
}
default:
context->validationError(GL_INVALID_ENUM, kInvalidTarget);
......
......@@ -89,8 +89,8 @@ void GL_APIENTRY BindTexture(GLenum target, GLuint texture)
if (context)
{
TextureType targetPacked = FromGL<TextureType>(target);
TextureID texturePacked = FromGL<TextureID>(texture);
TextureType targetPacked = PackParam<TextureType>(target);
TextureID texturePacked = PackParam<TextureID>(texture);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateBindTexture(context, targetPacked, texturePacked));
......@@ -116,7 +116,7 @@ void GL_APIENTRY ColorPointer(GLint size, GLenum type, GLsizei stride, const voi
if (context)
{
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
VertexAttribType typePacked = PackParam<VertexAttribType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateColorPointer(context, size, typePacked, stride, pointer));
......@@ -184,7 +184,7 @@ void GL_APIENTRY CopyTexImage2D(GLenum target,
if (context)
{
TextureTarget targetPacked = FromGL<TextureTarget>(target);
TextureTarget targetPacked = PackParam<TextureTarget>(target);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateCopyTexImage2D(context, targetPacked, level, internalformat, x,
......@@ -248,7 +248,7 @@ void GL_APIENTRY CopyTexSubImage2D(GLenum target,
if (context)
{
TextureTarget targetPacked = FromGL<TextureTarget>(target);
TextureTarget targetPacked = PackParam<TextureTarget>(target);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateCopyTexSubImage2D(context, targetPacked, level, xoffset,
......@@ -274,7 +274,7 @@ void GL_APIENTRY DeleteTextures(GLsizei n, const GLuint *textures)
if (context)
{
const TextureID *texturesPacked = FromGL<const TextureID *>(textures);
const TextureID *texturesPacked = PackParam<const TextureID *>(textures);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateDeleteTextures(context, n, texturesPacked));
......@@ -298,7 +298,7 @@ void GL_APIENTRY DisableClientState(GLenum array)
if (context)
{
ClientVertexArrayType arrayPacked = FromGL<ClientVertexArrayType>(array);
ClientVertexArrayType arrayPacked = PackParam<ClientVertexArrayType>(array);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateDisableClientState(context, arrayPacked));
......@@ -322,7 +322,7 @@ void GL_APIENTRY DrawArrays(GLenum mode, GLint first, GLsizei count)
if (context)
{
PrimitiveMode modePacked = FromGL<PrimitiveMode>(mode);
PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateDrawArrays(context, modePacked, first, count));
......@@ -348,8 +348,8 @@ void GL_APIENTRY DrawElements(GLenum mode, GLsizei count, GLenum type, const voi
if (context)
{
PrimitiveMode modePacked = FromGL<PrimitiveMode>(mode);
DrawElementsType typePacked = FromGL<DrawElementsType>(type);
PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);
DrawElementsType typePacked = PackParam<DrawElementsType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateDrawElements(context, modePacked, count, typePacked, indices));
......@@ -396,7 +396,7 @@ void GL_APIENTRY EnableClientState(GLenum array)
if (context)
{
ClientVertexArrayType arrayPacked = FromGL<ClientVertexArrayType>(array);
ClientVertexArrayType arrayPacked = PackParam<ClientVertexArrayType>(array);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateEnableClientState(context, arrayPacked));
......@@ -420,7 +420,7 @@ void GL_APIENTRY GenTextures(GLsizei n, GLuint *textures)
if (context)
{
TextureID *texturesPacked = FromGL<TextureID *>(textures);
TextureID *texturesPacked = PackParam<TextureID *>(textures);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGenTextures(context, n, texturesPacked));
......@@ -557,7 +557,7 @@ GLboolean GL_APIENTRY IsTexture(GLuint texture)
GLboolean returnValue;
if (context)
{
TextureID texturePacked = FromGL<TextureID>(texture);
TextureID texturePacked = PackParam<TextureID>(texture);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateIsTexture(context, texturePacked));
if (isCallValid)
......@@ -587,7 +587,7 @@ void GL_APIENTRY NormalPointer(GLenum type, GLsizei stride, const void *pointer)
if (context)
{
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
VertexAttribType typePacked = PackParam<VertexAttribType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateNormalPointer(context, typePacked, stride, pointer));
......@@ -703,7 +703,7 @@ void GL_APIENTRY TexCoordPointer(GLint size, GLenum type, GLsizei stride, const
if (context)
{
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
VertexAttribType typePacked = PackParam<VertexAttribType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateTexCoordPointer(context, size, typePacked, stride, pointer));
......@@ -774,7 +774,7 @@ void GL_APIENTRY TexSubImage2D(GLenum target,
if (context)
{
TextureTarget targetPacked = FromGL<TextureTarget>(target);
TextureTarget targetPacked = PackParam<TextureTarget>(target);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateTexSubImage2D(context, targetPacked, level, xoffset, yoffset,
......@@ -803,7 +803,7 @@ void GL_APIENTRY VertexPointer(GLint size, GLenum type, GLsizei stride, const vo
if (context)
{
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
VertexAttribType typePacked = PackParam<VertexAttribType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexPointer(context, size, typePacked, stride, pointer));
......
......@@ -46,7 +46,7 @@ void GL_APIENTRY CopyTexSubImage3D(GLenum target,
if (context)
{
TextureTarget targetPacked = FromGL<TextureTarget>(target);
TextureTarget targetPacked = PackParam<TextureTarget>(target);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateCopyTexSubImage3D(context, targetPacked, level, xoffset,
......@@ -81,8 +81,8 @@ void GL_APIENTRY DrawRangeElements(GLenum mode,
if (context)
{
PrimitiveMode modePacked = FromGL<PrimitiveMode>(mode);
DrawElementsType typePacked = FromGL<DrawElementsType>(type);
PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);
DrawElementsType typePacked = PackParam<DrawElementsType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateDrawRangeElements(context, modePacked, start, end,
......@@ -121,7 +121,7 @@ void GL_APIENTRY TexImage3D(GLenum target,
if (context)
{
TextureTarget targetPacked = FromGL<TextureTarget>(target);
TextureTarget targetPacked = PackParam<TextureTarget>(target);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateTexImage3D(context, targetPacked, level, internalformat, width,
......@@ -162,7 +162,7 @@ void GL_APIENTRY TexSubImage3D(GLenum target,
if (context)
{
TextureTarget targetPacked = FromGL<TextureTarget>(target);
TextureTarget targetPacked = PackParam<TextureTarget>(target);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......
......@@ -127,7 +127,7 @@ void GL_APIENTRY CompressedTexImage2D(GLenum target,
if (context)
{
TextureTarget targetPacked = FromGL<TextureTarget>(target);
TextureTarget targetPacked = PackParam<TextureTarget>(target);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -167,7 +167,7 @@ void GL_APIENTRY CompressedTexImage3D(GLenum target,
if (context)
{
TextureTarget targetPacked = FromGL<TextureTarget>(target);
TextureTarget targetPacked = PackParam<TextureTarget>(target);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -242,7 +242,7 @@ void GL_APIENTRY CompressedTexSubImage2D(GLenum target,
if (context)
{
TextureTarget targetPacked = FromGL<TextureTarget>(target);
TextureTarget targetPacked = PackParam<TextureTarget>(target);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -284,7 +284,7 @@ void GL_APIENTRY CompressedTexSubImage3D(GLenum target,
if (context)
{
TextureTarget targetPacked = FromGL<TextureTarget>(target);
TextureTarget targetPacked = PackParam<TextureTarget>(target);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateCompressedTexSubImage3D(context, targetPacked, level, xoffset,
......
......@@ -228,7 +228,7 @@ void GL_APIENTRY MultiDrawArrays(GLenum mode,
if (context)
{
PrimitiveMode modePacked = FromGL<PrimitiveMode>(mode);
PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateMultiDrawArrays(context, modePacked, first, count, drawcount));
......@@ -259,8 +259,8 @@ void GL_APIENTRY MultiDrawElements(GLenum mode,
if (context)
{
PrimitiveMode modePacked = FromGL<PrimitiveMode>(mode);
DrawElementsType typePacked = FromGL<DrawElementsType>(type);
PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);
DrawElementsType typePacked = PackParam<DrawElementsType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -286,7 +286,7 @@ void GL_APIENTRY PointParameterf(GLenum pname, GLfloat param)
if (context)
{
PointParameter pnamePacked = FromGL<PointParameter>(pname);
PointParameter pnamePacked = PackParam<PointParameter>(pname);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidatePointParameterf(context, pnamePacked, param));
......@@ -310,7 +310,7 @@ void GL_APIENTRY PointParameterfv(GLenum pname, const GLfloat *params)
if (context)
{
PointParameter pnamePacked = FromGL<PointParameter>(pname);
PointParameter pnamePacked = PackParam<PointParameter>(pname);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidatePointParameterfv(context, pnamePacked, params));
......
......@@ -39,7 +39,7 @@ void GL_APIENTRY UniformMatrix2x3fv(GLint location,
if (context)
{
UniformLocation locationPacked = FromGL<UniformLocation>(location);
UniformLocation locationPacked = PackParam<UniformLocation>(location);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -69,7 +69,7 @@ void GL_APIENTRY UniformMatrix2x4fv(GLint location,
if (context)
{
UniformLocation locationPacked = FromGL<UniformLocation>(location);
UniformLocation locationPacked = PackParam<UniformLocation>(location);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -99,7 +99,7 @@ void GL_APIENTRY UniformMatrix3x2fv(GLint location,
if (context)
{
UniformLocation locationPacked = FromGL<UniformLocation>(location);
UniformLocation locationPacked = PackParam<UniformLocation>(location);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -129,7 +129,7 @@ void GL_APIENTRY UniformMatrix3x4fv(GLint location,
if (context)
{
UniformLocation locationPacked = FromGL<UniformLocation>(location);
UniformLocation locationPacked = PackParam<UniformLocation>(location);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -159,7 +159,7 @@ void GL_APIENTRY UniformMatrix4x2fv(GLint location,
if (context)
{
UniformLocation locationPacked = FromGL<UniformLocation>(location);
UniformLocation locationPacked = PackParam<UniformLocation>(location);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -189,7 +189,7 @@ void GL_APIENTRY UniformMatrix4x3fv(GLint location,
if (context)
{
UniformLocation locationPacked = FromGL<UniformLocation>(location);
UniformLocation locationPacked = PackParam<UniformLocation>(location);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......
......@@ -44,8 +44,8 @@ void GL_APIENTRY CopyBufferSubData(GLenum readTarget,
if (context)
{
BufferBinding readTargetPacked = FromGL<BufferBinding>(readTarget);
BufferBinding writeTargetPacked = FromGL<BufferBinding>(writeTarget);
BufferBinding readTargetPacked = PackParam<BufferBinding>(readTarget);
BufferBinding writeTargetPacked = PackParam<BufferBinding>(writeTarget);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateCopyBufferSubData(context, readTargetPacked, writeTargetPacked,
......@@ -73,7 +73,7 @@ void GL_APIENTRY DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GL
if (context)
{
PrimitiveMode modePacked = FromGL<PrimitiveMode>(mode);
PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -106,8 +106,8 @@ void GL_APIENTRY DrawElementsInstanced(GLenum mode,
if (context)
{
PrimitiveMode modePacked = FromGL<PrimitiveMode>(mode);
DrawElementsType typePacked = FromGL<DrawElementsType>(type);
PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);
DrawElementsType typePacked = PackParam<DrawElementsType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateDrawElementsInstanced(context, modePacked, count, typePacked,
......@@ -141,7 +141,7 @@ void GL_APIENTRY GetActiveUniformBlockName(GLuint program,
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -175,7 +175,7 @@ void GL_APIENTRY GetActiveUniformBlockiv(GLuint program,
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetActiveUniformBlockiv(context, programPacked,
......@@ -207,7 +207,7 @@ void GL_APIENTRY GetActiveUniformName(GLuint program,
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetActiveUniformName(context, programPacked, uniformIndex,
......@@ -241,7 +241,7 @@ void GL_APIENTRY GetActiveUniformsiv(GLuint program,
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetActiveUniformsiv(context, programPacked, uniformCount,
......@@ -270,7 +270,7 @@ GLuint GL_APIENTRY GetUniformBlockIndex(GLuint program, const GLchar *uniformBlo
GLuint returnValue;
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetUniformBlockIndex(context, programPacked, uniformBlockName));
......@@ -307,7 +307,7 @@ void GL_APIENTRY GetUniformIndices(GLuint program,
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetUniformIndices(context, programPacked, uniformCount,
......@@ -356,8 +356,8 @@ void GL_APIENTRY TexBuffer(GLenum target, GLenum internalformat, GLuint buffer)
if (context)
{
TextureType targetPacked = FromGL<TextureType>(target);
BufferID bufferPacked = FromGL<BufferID>(buffer);
TextureType targetPacked = PackParam<TextureType>(target);
BufferID bufferPacked = PackParam<BufferID>(buffer);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateTexBuffer(context, targetPacked, internalformat, bufferPacked));
......@@ -384,7 +384,7 @@ void GL_APIENTRY UniformBlockBinding(GLuint program,
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateUniformBlockBinding(context, programPacked, uniformBlockIndex,
......
......@@ -96,8 +96,8 @@ void GL_APIENTRY DrawElementsBaseVertex(GLenum mode,
if (context)
{
PrimitiveMode modePacked = FromGL<PrimitiveMode>(mode);
DrawElementsType typePacked = FromGL<DrawElementsType>(type);
PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);
DrawElementsType typePacked = PackParam<DrawElementsType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateDrawElementsBaseVertex(context, modePacked, count, typePacked,
......@@ -132,8 +132,8 @@ void GL_APIENTRY DrawElementsInstancedBaseVertex(GLenum mode,
if (context)
{
PrimitiveMode modePacked = FromGL<PrimitiveMode>(mode);
DrawElementsType typePacked = FromGL<DrawElementsType>(type);
PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);
DrawElementsType typePacked = PackParam<DrawElementsType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateDrawElementsInstancedBaseVertex(
context, modePacked, count, typePacked,
......@@ -169,8 +169,8 @@ void GL_APIENTRY DrawRangeElementsBaseVertex(GLenum mode,
if (context)
{
PrimitiveMode modePacked = FromGL<PrimitiveMode>(mode);
DrawElementsType typePacked = FromGL<DrawElementsType>(type);
PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);
DrawElementsType typePacked = PackParam<DrawElementsType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateDrawRangeElementsBaseVertex(
context, modePacked, start, end, count,
......@@ -230,7 +230,7 @@ void GL_APIENTRY FramebufferTexture(GLenum target, GLenum attachment, GLuint tex
if (context)
{
TextureID texturePacked = FromGL<TextureID>(texture);
TextureID texturePacked = PackParam<TextureID>(texture);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -258,7 +258,7 @@ void GL_APIENTRY GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *pa
if (context)
{
BufferBinding targetPacked = FromGL<BufferBinding>(target);
BufferBinding targetPacked = PackParam<BufferBinding>(target);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetBufferParameteri64v(context, targetPacked, pname, params));
......@@ -416,8 +416,8 @@ void GL_APIENTRY MultiDrawElementsBaseVertex(GLenum mode,
if (context)
{
PrimitiveMode modePacked = FromGL<PrimitiveMode>(mode);
DrawElementsType typePacked = FromGL<DrawElementsType>(type);
PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);
DrawElementsType typePacked = PackParam<DrawElementsType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateMultiDrawElementsBaseVertex(
context, modePacked, count, typePacked,
......@@ -444,7 +444,7 @@ void GL_APIENTRY ProvokingVertex(GLenum mode)
if (context)
{
ProvokingVertexConvention modePacked = FromGL<ProvokingVertexConvention>(mode);
ProvokingVertexConvention modePacked = PackParam<ProvokingVertexConvention>(mode);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateProvokingVertex(context, modePacked));
......
......@@ -45,7 +45,7 @@ void GL_APIENTRY BindImageTexture(GLuint unit,
if (context)
{
TextureID texturePacked = FromGL<TextureID>(texture);
TextureID texturePacked = PackParam<TextureID>(texture);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateBindImageTexture(context, unit, texturePacked, level, layered,
......@@ -77,7 +77,7 @@ void GL_APIENTRY DrawArraysInstancedBaseInstance(GLenum mode,
if (context)
{
PrimitiveMode modePacked = FromGL<PrimitiveMode>(mode);
PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateDrawArraysInstancedBaseInstance(
......@@ -149,8 +149,8 @@ void GL_APIENTRY DrawElementsInstancedBaseVertexBaseInstance(GLenum mode,
if (context)
{
PrimitiveMode modePacked = FromGL<PrimitiveMode>(mode);
DrawElementsType typePacked = FromGL<DrawElementsType>(type);
PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);
DrawElementsType typePacked = PackParam<DrawElementsType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateDrawElementsInstancedBaseVertexBaseInstance(
......@@ -179,7 +179,7 @@ void GL_APIENTRY DrawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei
if (context)
{
TransformFeedbackID idPacked = FromGL<TransformFeedbackID>(id);
TransformFeedbackID idPacked = PackParam<TransformFeedbackID>(id);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -209,7 +209,7 @@ void GL_APIENTRY DrawTransformFeedbackStreamInstanced(GLenum mode,
if (context)
{
TransformFeedbackID idPacked = FromGL<TransformFeedbackID>(id);
TransformFeedbackID idPacked = PackParam<TransformFeedbackID>(id);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateDrawTransformFeedbackStreamInstanced(
......@@ -240,7 +240,7 @@ void GL_APIENTRY GetActiveAtomicCounterBufferiv(GLuint program,
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetActiveAtomicCounterBufferiv(
......@@ -349,7 +349,7 @@ TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width
if (context)
{
TextureType targetPacked = FromGL<TextureType>(target);
TextureType targetPacked = PackParam<TextureType>(target);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -383,7 +383,7 @@ void GL_APIENTRY TexStorage3D(GLenum target,
if (context)
{
TextureType targetPacked = FromGL<TextureType>(target);
TextureType targetPacked = PackParam<TextureType>(target);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateTexStorage3D(context, targetPacked, levels, internalformat,
......
......@@ -39,7 +39,7 @@ void GL_APIENTRY BindVertexBuffer(GLuint bindingindex,
if (context)
{
BufferID bufferPacked = FromGL<BufferID>(buffer);
BufferID bufferPacked = PackParam<BufferID>(buffer);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -511,7 +511,7 @@ void GL_APIENTRY GetProgramInterfaceiv(GLuint program,
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetProgramInterfaceiv(context, programPacked, programInterface,
......@@ -542,7 +542,7 @@ GLuint GL_APIENTRY GetProgramResourceIndex(GLuint program,
GLuint returnValue;
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -580,7 +580,7 @@ GLint GL_APIENTRY GetProgramResourceLocation(GLuint program,
GLint returnValue;
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -620,7 +620,7 @@ GLint GL_APIENTRY GetProgramResourceLocationIndex(GLuint program,
GLint returnValue;
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetProgramResourceLocationIndex(
......@@ -664,7 +664,7 @@ void GL_APIENTRY GetProgramResourceName(GLuint program,
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetProgramResourceName(context, programPacked, programInterface,
......@@ -701,7 +701,7 @@ void GL_APIENTRY GetProgramResourceiv(GLuint program,
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -728,7 +728,7 @@ void GL_APIENTRY InvalidateBufferData(GLuint buffer)
if (context)
{
BufferID bufferPacked = FromGL<BufferID>(buffer);
BufferID bufferPacked = PackParam<BufferID>(buffer);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateInvalidateBufferData(context, bufferPacked));
......@@ -753,7 +753,7 @@ void GL_APIENTRY InvalidateBufferSubData(GLuint buffer, GLintptr offset, GLsizei
if (context)
{
BufferID bufferPacked = FromGL<BufferID>(buffer);
BufferID bufferPacked = PackParam<BufferID>(buffer);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateInvalidateBufferSubData(context, bufferPacked, offset, length));
......@@ -841,7 +841,7 @@ void GL_APIENTRY InvalidateTexImage(GLuint texture, GLint level)
if (context)
{
TextureID texturePacked = FromGL<TextureID>(texture);
TextureID texturePacked = PackParam<TextureID>(texture);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateInvalidateTexImage(context, texturePacked, level));
......@@ -874,7 +874,7 @@ void GL_APIENTRY InvalidateTexSubImage(GLuint texture,
if (context)
{
TextureID texturePacked = FromGL<TextureID>(texture);
TextureID texturePacked = PackParam<TextureID>(texture);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateInvalidateTexSubImage(context, texturePacked, level, xoffset,
......@@ -1062,7 +1062,7 @@ void GL_APIENTRY ShaderStorageBlockBinding(GLuint program,
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateShaderStorageBlockBinding(
......@@ -1096,8 +1096,8 @@ void GL_APIENTRY TexBufferRange(GLenum target,
if (context)
{
TextureType targetPacked = FromGL<TextureType>(target);
BufferID bufferPacked = FromGL<BufferID>(buffer);
TextureType targetPacked = PackParam<TextureType>(target);
BufferID bufferPacked = PackParam<BufferID>(buffer);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateTexBufferRange(context, targetPacked, internalformat,
......@@ -1132,7 +1132,7 @@ void GL_APIENTRY TexStorage2DMultisample(GLenum target,
if (context)
{
TextureType targetPacked = FromGL<TextureType>(target);
TextureType targetPacked = PackParam<TextureType>(target);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -1170,7 +1170,7 @@ void GL_APIENTRY TexStorage3DMultisample(GLenum target,
if (context)
{
TextureType targetPacked = FromGL<TextureType>(target);
TextureType targetPacked = PackParam<TextureType>(target);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -1209,7 +1209,7 @@ void GL_APIENTRY TextureView(GLuint texture,
if (context)
{
TextureID texturePacked = FromGL<TextureID>(texture);
TextureID texturePacked = PackParam<TextureID>(texture);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -1267,7 +1267,7 @@ void GL_APIENTRY VertexAttribFormat(GLuint attribindex,
if (context)
{
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
VertexAttribType typePacked = PackParam<VertexAttribType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribFormat(context, attribindex, size, typePacked,
......@@ -1297,7 +1297,7 @@ void GL_APIENTRY VertexAttribIFormat(GLuint attribindex,
if (context)
{
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
VertexAttribType typePacked = PackParam<VertexAttribType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......
......@@ -37,7 +37,7 @@ void GL_APIENTRY BindBuffersBase(GLenum target, GLuint first, GLsizei count, con
if (context)
{
const BufferID *buffersPacked = FromGL<const BufferID *>(buffers);
const BufferID *buffersPacked = PackParam<const BufferID *>(buffers);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateBindBuffersBase(context, target, first, count, buffersPacked));
......@@ -69,7 +69,7 @@ void GL_APIENTRY BindBuffersRange(GLenum target,
if (context)
{
const BufferID *buffersPacked = FromGL<const BufferID *>(buffers);
const BufferID *buffersPacked = PackParam<const BufferID *>(buffers);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateBindBuffersRange(context, target, first, count,
......@@ -173,7 +173,7 @@ void GL_APIENTRY BindVertexBuffers(GLuint first,
if (context)
{
const BufferID *buffersPacked = FromGL<const BufferID *>(buffers);
const BufferID *buffersPacked = PackParam<const BufferID *>(buffers);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -202,7 +202,7 @@ void GL_APIENTRY BufferStorage(GLenum target, GLsizeiptr size, const void *data,
if (context)
{
BufferBinding targetPacked = FromGL<BufferBinding>(target);
BufferBinding targetPacked = PackParam<BufferBinding>(target);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateBufferStorage(context, targetPacked, size, data, flags));
......@@ -230,7 +230,7 @@ ClearTexImage(GLuint texture, GLint level, GLenum format, GLenum type, const voi
if (context)
{
TextureID texturePacked = FromGL<TextureID>(texture);
TextureID texturePacked = PackParam<TextureID>(texture);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......@@ -270,7 +270,7 @@ void GL_APIENTRY ClearTexSubImage(GLuint texture,
if (context)
{
TextureID texturePacked = FromGL<TextureID>(texture);
TextureID texturePacked = PackParam<TextureID>(texture);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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