Commit 851edac7 by Jamie Madill Committed by Commit Bot

GLES3: Use more compact entry point style.

This migrates to the new generation style used in GLES2. BUG=angleproject:1309 Change-Id: I43e9d33a0d7c5b1786452895855ff2bfbf82f139 Reviewed-on: https://chromium-review.googlesource.com/638311Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent fa08cae7
...@@ -237,7 +237,7 @@ for cmd_name in gles3_commands: ...@@ -237,7 +237,7 @@ for cmd_name in gles3_commands:
proto = "".join(command.find("./proto").itertext()) proto = "".join(command.find("./proto").itertext())
cmd_names += [cmd_name] cmd_names += [cmd_name]
entry_point_decls_gles_3_0 += [format_entry_point_decl(cmd_name, proto, params)] entry_point_decls_gles_3_0 += [format_entry_point_decl(cmd_name, proto, params)]
entry_point_defs_gles_3_0 += [format_entry_point_def_oldstyle(cmd_name, proto, params)] entry_point_defs_gles_3_0 += [format_entry_point_def(cmd_name, proto, params)]
gles_2_0_header = template_entry_point_header.format( gles_2_0_header = template_entry_point_header.format(
script_name = os.path.basename(sys.argv[0]), script_name = os.path.basename(sys.argv[0]),
......
...@@ -21,12 +21,12 @@ void GL_APIENTRY ReadBuffer(GLenum src) ...@@ -21,12 +21,12 @@ void GL_APIENTRY ReadBuffer(GLenum src)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateReadBuffer(context, src)) context->gatherParams<EntryPoint::ReadBuffer>(src);
if (context->skipValidation() || ValidateReadBuffer(context, src))
{ {
return; context->readBuffer(src);
} }
context->readBuffer(src);
} }
} }
...@@ -48,13 +48,11 @@ void GL_APIENTRY DrawRangeElements(GLenum mode, ...@@ -48,13 +48,11 @@ void GL_APIENTRY DrawRangeElements(GLenum mode,
context->gatherParams<EntryPoint::DrawRangeElements>(mode, start, end, count, type, context->gatherParams<EntryPoint::DrawRangeElements>(mode, start, end, count, type,
indices); indices);
if (!context->skipValidation() && if (context->skipValidation() ||
!ValidateDrawRangeElements(context, mode, start, end, count, type, indices)) ValidateDrawRangeElements(context, mode, start, end, count, type, indices))
{ {
return; context->drawRangeElements(mode, start, end, count, type, indices);
} }
context->drawRangeElements(mode, start, end, count, type, indices);
} }
} }
...@@ -78,15 +76,16 @@ void GL_APIENTRY TexImage3D(GLenum target, ...@@ -78,15 +76,16 @@ void GL_APIENTRY TexImage3D(GLenum target,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::TexImage3D>(target, level, internalformat, width, height,
!ValidateTexImage3D(context, target, level, internalformat, width, height, depth, depth, border, format, type, pixels);
border, format, type, pixels))
if (context->skipValidation() ||
ValidateTexImage3D(context, target, level, internalformat, width, height, depth, border,
format, type, pixels))
{ {
return; context->texImage3D(target, level, internalformat, width, height, depth, border, format,
type, pixels);
} }
context->texImage3D(target, level, internalformat, width, height, depth, border, format,
type, pixels);
} }
} }
...@@ -111,15 +110,16 @@ void GL_APIENTRY TexSubImage3D(GLenum target, ...@@ -111,15 +110,16 @@ void GL_APIENTRY TexSubImage3D(GLenum target,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::TexSubImage3D>(
!ValidateTexSubImage3D(context, target, level, xoffset, yoffset, zoffset, width, height, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
depth, format, type, pixels))
if (context->skipValidation() ||
ValidateTexSubImage3D(context, target, level, xoffset, yoffset, zoffset, width, height,
depth, format, type, pixels))
{ {
return; context->texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth,
format, type, pixels);
} }
context->texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth,
format, type, pixels);
} }
} }
...@@ -141,14 +141,16 @@ void GL_APIENTRY CopyTexSubImage3D(GLenum target, ...@@ -141,14 +141,16 @@ void GL_APIENTRY CopyTexSubImage3D(GLenum target,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::CopyTexSubImage3D>(target, level, xoffset, yoffset,
!ValidateCopyTexSubImage3D(context, target, level, xoffset, yoffset, zoffset, x, y, zoffset, x, y, width, height);
width, height))
if (context->skipValidation() ||
ValidateCopyTexSubImage3D(context, target, level, xoffset, yoffset, zoffset, x, y,
width, height))
{ {
return; context->copyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width,
height);
} }
context->copyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
} }
} }
...@@ -171,15 +173,16 @@ void GL_APIENTRY CompressedTexImage3D(GLenum target, ...@@ -171,15 +173,16 @@ void GL_APIENTRY CompressedTexImage3D(GLenum target,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::CompressedTexImage3D>(
!ValidateCompressedTexImage3D(context, target, level, internalformat, width, height, target, level, internalformat, width, height, depth, border, imageSize, data);
depth, border, imageSize, data))
if (context->skipValidation() ||
ValidateCompressedTexImage3D(context, target, level, internalformat, width, height,
depth, border, imageSize, data))
{ {
return; context->compressedTexImage3D(target, level, internalformat, width, height, depth,
border, imageSize, data);
} }
context->compressedTexImage3D(target, level, internalformat, width, height, depth, border,
imageSize, data);
} }
} }
...@@ -204,15 +207,17 @@ void GL_APIENTRY CompressedTexSubImage3D(GLenum target, ...@@ -204,15 +207,17 @@ void GL_APIENTRY CompressedTexSubImage3D(GLenum target,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::CompressedTexSubImage3D>(target, level, xoffset, yoffset,
!ValidateCompressedTexSubImage3D(context, target, level, xoffset, yoffset, zoffset, zoffset, width, height, depth,
width, height, depth, format, imageSize, data)) format, imageSize, data);
if (context->skipValidation() ||
ValidateCompressedTexSubImage3D(context, target, level, xoffset, yoffset, zoffset,
width, height, depth, format, imageSize, data))
{ {
return; context->compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width,
height, depth, format, imageSize, data);
} }
context->compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height,
depth, format, imageSize, data);
} }
} }
...@@ -223,12 +228,12 @@ void GL_APIENTRY GenQueries(GLsizei n, GLuint *ids) ...@@ -223,12 +228,12 @@ void GL_APIENTRY GenQueries(GLsizei n, GLuint *ids)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateGenQueries(context, n, ids)) context->gatherParams<EntryPoint::GenQueries>(n, ids);
if (context->skipValidation() || ValidateGenQueries(context, n, ids))
{ {
return; context->genQueries(n, ids);
} }
context->genQueries(n, ids);
} }
} }
...@@ -239,12 +244,12 @@ void GL_APIENTRY DeleteQueries(GLsizei n, const GLuint *ids) ...@@ -239,12 +244,12 @@ void GL_APIENTRY DeleteQueries(GLsizei n, const GLuint *ids)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateDeleteQueries(context, n, ids)) context->gatherParams<EntryPoint::DeleteQueries>(n, ids);
if (context->skipValidation() || ValidateDeleteQueries(context, n, ids))
{ {
return; context->deleteQueries(n, ids);
} }
context->deleteQueries(n, ids);
} }
} }
...@@ -255,12 +260,12 @@ GLboolean GL_APIENTRY IsQuery(GLuint id) ...@@ -255,12 +260,12 @@ GLboolean GL_APIENTRY IsQuery(GLuint id)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateIsQuery(context, id)) context->gatherParams<EntryPoint::IsQuery>(id);
if (context->skipValidation() || ValidateIsQuery(context, id))
{ {
return GetDefaultReturnValue<EntryPoint::IsQuery, GLboolean>(); return context->isQuery(id);
} }
return context->isQuery(id);
} }
return GetDefaultReturnValue<EntryPoint::IsQuery, GLboolean>(); return GetDefaultReturnValue<EntryPoint::IsQuery, GLboolean>();
...@@ -273,12 +278,12 @@ void GL_APIENTRY BeginQuery(GLenum target, GLuint id) ...@@ -273,12 +278,12 @@ void GL_APIENTRY BeginQuery(GLenum target, GLuint id)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateBeginQuery(context, target, id)) context->gatherParams<EntryPoint::BeginQuery>(target, id);
if (context->skipValidation() || ValidateBeginQuery(context, target, id))
{ {
return; context->beginQuery(target, id);
} }
context->beginQuery(target, id);
} }
} }
...@@ -289,12 +294,12 @@ void GL_APIENTRY EndQuery(GLenum target) ...@@ -289,12 +294,12 @@ void GL_APIENTRY EndQuery(GLenum target)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateEndQuery(context, target)) context->gatherParams<EntryPoint::EndQuery>(target);
if (context->skipValidation() || ValidateEndQuery(context, target))
{ {
return; context->endQuery(target);
} }
context->endQuery(target);
} }
} }
...@@ -306,12 +311,12 @@ void GL_APIENTRY GetQueryiv(GLenum target, GLenum pname, GLint *params) ...@@ -306,12 +311,12 @@ void GL_APIENTRY GetQueryiv(GLenum target, GLenum pname, GLint *params)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateGetQueryiv(context, target, pname, params)) context->gatherParams<EntryPoint::GetQueryiv>(target, pname, params);
if (context->skipValidation() || ValidateGetQueryiv(context, target, pname, params))
{ {
return; context->getQueryiv(target, pname, params);
} }
context->getQueryiv(target, pname, params);
} }
} }
...@@ -322,12 +327,12 @@ void GL_APIENTRY GetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params) ...@@ -322,12 +327,12 @@ void GL_APIENTRY GetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateGetQueryObjectuiv(context, id, pname, params)) context->gatherParams<EntryPoint::GetQueryObjectuiv>(id, pname, params);
if (context->skipValidation() || ValidateGetQueryObjectuiv(context, id, pname, params))
{ {
return; context->getQueryObjectuiv(id, pname, params);
} }
context->getQueryObjectuiv(id, pname, params);
} }
} }
...@@ -338,12 +343,12 @@ GLboolean GL_APIENTRY UnmapBuffer(GLenum target) ...@@ -338,12 +343,12 @@ GLboolean GL_APIENTRY UnmapBuffer(GLenum target)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateUnmapBuffer(context, target)) context->gatherParams<EntryPoint::UnmapBuffer>(target);
if (context->skipValidation() || ValidateUnmapBuffer(context, target))
{ {
return GetDefaultReturnValue<EntryPoint::UnmapBuffer, GLboolean>(); return context->unmapBuffer(target);
} }
return context->unmapBuffer(target);
} }
return GetDefaultReturnValue<EntryPoint::UnmapBuffer, GLboolean>(); return GetDefaultReturnValue<EntryPoint::UnmapBuffer, GLboolean>();
...@@ -357,13 +362,12 @@ void GL_APIENTRY GetBufferPointerv(GLenum target, GLenum pname, void **params) ...@@ -357,13 +362,12 @@ void GL_APIENTRY GetBufferPointerv(GLenum target, GLenum pname, void **params)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetBufferPointerv>(target, pname, params);
!ValidateGetBufferPointerv(context, target, pname, params))
if (context->skipValidation() || ValidateGetBufferPointerv(context, target, pname, params))
{ {
return; context->getBufferPointerv(target, pname, params);
} }
context->getBufferPointerv(target, pname, params);
} }
} }
...@@ -374,12 +378,12 @@ void GL_APIENTRY DrawBuffers(GLsizei n, const GLenum *bufs) ...@@ -374,12 +378,12 @@ void GL_APIENTRY DrawBuffers(GLsizei n, const GLenum *bufs)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateDrawBuffers(context, n, bufs)) context->gatherParams<EntryPoint::DrawBuffers>(n, bufs);
if (context->skipValidation() || ValidateDrawBuffers(context, n, bufs))
{ {
return; context->drawBuffers(n, bufs);
} }
context->drawBuffers(n, bufs);
} }
} }
...@@ -396,13 +400,13 @@ void GL_APIENTRY UniformMatrix2x3fv(GLint location, ...@@ -396,13 +400,13 @@ void GL_APIENTRY UniformMatrix2x3fv(GLint location,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::UniformMatrix2x3fv>(location, count, transpose, value);
!ValidateUniformMatrix2x3fv(context, location, count, transpose, value))
if (context->skipValidation() ||
ValidateUniformMatrix2x3fv(context, location, count, transpose, value))
{ {
return; context->uniformMatrix2x3fv(location, count, transpose, value);
} }
context->uniformMatrix2x3fv(location, count, transpose, value);
} }
} }
...@@ -419,13 +423,13 @@ void GL_APIENTRY UniformMatrix3x2fv(GLint location, ...@@ -419,13 +423,13 @@ void GL_APIENTRY UniformMatrix3x2fv(GLint location,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::UniformMatrix3x2fv>(location, count, transpose, value);
!ValidateUniformMatrix3x2fv(context, location, count, transpose, value))
if (context->skipValidation() ||
ValidateUniformMatrix3x2fv(context, location, count, transpose, value))
{ {
return; context->uniformMatrix3x2fv(location, count, transpose, value);
} }
context->uniformMatrix3x2fv(location, count, transpose, value);
} }
} }
...@@ -442,13 +446,13 @@ void GL_APIENTRY UniformMatrix2x4fv(GLint location, ...@@ -442,13 +446,13 @@ void GL_APIENTRY UniformMatrix2x4fv(GLint location,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::UniformMatrix2x4fv>(location, count, transpose, value);
!ValidateUniformMatrix2x4fv(context, location, count, transpose, value))
if (context->skipValidation() ||
ValidateUniformMatrix2x4fv(context, location, count, transpose, value))
{ {
return; context->uniformMatrix2x4fv(location, count, transpose, value);
} }
context->uniformMatrix2x4fv(location, count, transpose, value);
} }
} }
...@@ -465,13 +469,13 @@ void GL_APIENTRY UniformMatrix4x2fv(GLint location, ...@@ -465,13 +469,13 @@ void GL_APIENTRY UniformMatrix4x2fv(GLint location,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::UniformMatrix4x2fv>(location, count, transpose, value);
!ValidateUniformMatrix4x2fv(context, location, count, transpose, value))
if (context->skipValidation() ||
ValidateUniformMatrix4x2fv(context, location, count, transpose, value))
{ {
return; context->uniformMatrix4x2fv(location, count, transpose, value);
} }
context->uniformMatrix4x2fv(location, count, transpose, value);
} }
} }
...@@ -488,13 +492,13 @@ void GL_APIENTRY UniformMatrix3x4fv(GLint location, ...@@ -488,13 +492,13 @@ void GL_APIENTRY UniformMatrix3x4fv(GLint location,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::UniformMatrix3x4fv>(location, count, transpose, value);
!ValidateUniformMatrix3x4fv(context, location, count, transpose, value))
if (context->skipValidation() ||
ValidateUniformMatrix3x4fv(context, location, count, transpose, value))
{ {
return; context->uniformMatrix3x4fv(location, count, transpose, value);
} }
context->uniformMatrix3x4fv(location, count, transpose, value);
} }
} }
...@@ -511,13 +515,13 @@ void GL_APIENTRY UniformMatrix4x3fv(GLint location, ...@@ -511,13 +515,13 @@ void GL_APIENTRY UniformMatrix4x3fv(GLint location,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::UniformMatrix4x3fv>(location, count, transpose, value);
!ValidateUniformMatrix4x3fv(context, location, count, transpose, value))
if (context->skipValidation() ||
ValidateUniformMatrix4x3fv(context, location, count, transpose, value))
{ {
return; context->uniformMatrix4x3fv(location, count, transpose, value);
} }
context->uniformMatrix4x3fv(location, count, transpose, value);
} }
} }
...@@ -541,15 +545,16 @@ void GL_APIENTRY BlitFramebuffer(GLint srcX0, ...@@ -541,15 +545,16 @@ void GL_APIENTRY BlitFramebuffer(GLint srcX0,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::BlitFramebuffer>(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0,
!ValidateBlitFramebuffer(context, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstX1, dstY1, mask, filter);
dstY1, mask, filter))
if (context->skipValidation() ||
ValidateBlitFramebuffer(context, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1,
mask, filter))
{ {
return; context->blitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask,
filter);
} }
context->blitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask,
filter);
} }
} }
...@@ -567,14 +572,15 @@ void GL_APIENTRY RenderbufferStorageMultisample(GLenum target, ...@@ -567,14 +572,15 @@ void GL_APIENTRY RenderbufferStorageMultisample(GLenum target,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::RenderbufferStorageMultisample>(
!ValidateRenderbufferStorageMultisample(context, target, samples, internalformat, width, target, samples, internalformat, width, height);
height))
if (context->skipValidation() ||
ValidateRenderbufferStorageMultisample(context, target, samples, internalformat, width,
height))
{ {
return; context->renderbufferStorageMultisample(target, samples, internalformat, width, height);
} }
context->renderbufferStorageMultisample(target, samples, internalformat, width, height);
} }
} }
...@@ -589,13 +595,14 @@ FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint ...@@ -589,13 +595,14 @@ FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::FramebufferTextureLayer>(target, attachment, texture,
!ValidateFramebufferTextureLayer(context, target, attachment, texture, level, layer)) level, layer);
if (context->skipValidation() ||
ValidateFramebufferTextureLayer(context, target, attachment, texture, level, layer))
{ {
return; context->framebufferTextureLayer(target, attachment, texture, level, layer);
} }
context->framebufferTextureLayer(target, attachment, texture, level, layer);
} }
} }
...@@ -612,13 +619,13 @@ void *GL_APIENTRY MapBufferRange(GLenum target, ...@@ -612,13 +619,13 @@ void *GL_APIENTRY MapBufferRange(GLenum target,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::MapBufferRange>(target, offset, length, access);
!ValidateMapBufferRange(context, target, offset, length, access))
if (context->skipValidation() ||
ValidateMapBufferRange(context, target, offset, length, access))
{ {
return GetDefaultReturnValue<EntryPoint::MapBufferRange, void *>(); return context->mapBufferRange(target, offset, length, access);
} }
return context->mapBufferRange(target, offset, length, access);
} }
return GetDefaultReturnValue<EntryPoint::MapBufferRange, void *>(); return GetDefaultReturnValue<EntryPoint::MapBufferRange, void *>();
...@@ -632,13 +639,13 @@ void GL_APIENTRY FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeip ...@@ -632,13 +639,13 @@ void GL_APIENTRY FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeip
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::FlushMappedBufferRange>(target, offset, length);
!ValidateFlushMappedBufferRange(context, target, offset, length))
if (context->skipValidation() ||
ValidateFlushMappedBufferRange(context, target, offset, length))
{ {
return; context->flushMappedBufferRange(target, offset, length);
} }
context->flushMappedBufferRange(target, offset, length);
} }
} }
...@@ -649,12 +656,12 @@ void GL_APIENTRY BindVertexArray(GLuint array) ...@@ -649,12 +656,12 @@ void GL_APIENTRY BindVertexArray(GLuint array)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateBindVertexArray(context, array)) context->gatherParams<EntryPoint::BindVertexArray>(array);
if (context->skipValidation() || ValidateBindVertexArray(context, array))
{ {
return; context->bindVertexArray(array);
} }
context->bindVertexArray(array);
} }
} }
...@@ -665,12 +672,12 @@ void GL_APIENTRY DeleteVertexArrays(GLsizei n, const GLuint *arrays) ...@@ -665,12 +672,12 @@ void GL_APIENTRY DeleteVertexArrays(GLsizei n, const GLuint *arrays)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateDeleteVertexArrays(context, n, arrays)) context->gatherParams<EntryPoint::DeleteVertexArrays>(n, arrays);
if (context->skipValidation() || ValidateDeleteVertexArrays(context, n, arrays))
{ {
return; context->deleteVertexArrays(n, arrays);
} }
context->deleteVertexArrays(n, arrays);
} }
} }
...@@ -681,12 +688,12 @@ void GL_APIENTRY GenVertexArrays(GLsizei n, GLuint *arrays) ...@@ -681,12 +688,12 @@ void GL_APIENTRY GenVertexArrays(GLsizei n, GLuint *arrays)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateGenVertexArrays(context, n, arrays)) context->gatherParams<EntryPoint::GenVertexArrays>(n, arrays);
if (context->skipValidation() || ValidateGenVertexArrays(context, n, arrays))
{ {
return; context->genVertexArrays(n, arrays);
} }
context->genVertexArrays(n, arrays);
} }
} }
...@@ -697,12 +704,12 @@ GLboolean GL_APIENTRY IsVertexArray(GLuint array) ...@@ -697,12 +704,12 @@ GLboolean GL_APIENTRY IsVertexArray(GLuint array)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateIsVertexArray(context, array)) context->gatherParams<EntryPoint::IsVertexArray>(array);
if (context->skipValidation() || ValidateIsVertexArray(context, array))
{ {
return GetDefaultReturnValue<EntryPoint::IsVertexArray, GLboolean>(); return context->isVertexArray(array);
} }
return context->isVertexArray(array);
} }
return GetDefaultReturnValue<EntryPoint::IsVertexArray, GLboolean>(); return GetDefaultReturnValue<EntryPoint::IsVertexArray, GLboolean>();
...@@ -715,12 +722,12 @@ void GL_APIENTRY GetIntegeri_v(GLenum target, GLuint index, GLint *data) ...@@ -715,12 +722,12 @@ void GL_APIENTRY GetIntegeri_v(GLenum target, GLuint index, GLint *data)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateGetIntegeri_v(context, target, index, data)) context->gatherParams<EntryPoint::GetIntegeri_v>(target, index, data);
if (context->skipValidation() || ValidateGetIntegeri_v(context, target, index, data))
{ {
return; context->getIntegeri_v(target, index, data);
} }
context->getIntegeri_v(target, index, data);
} }
} }
...@@ -731,12 +738,12 @@ void GL_APIENTRY BeginTransformFeedback(GLenum primitiveMode) ...@@ -731,12 +738,12 @@ void GL_APIENTRY BeginTransformFeedback(GLenum primitiveMode)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateBeginTransformFeedback(context, primitiveMode)) context->gatherParams<EntryPoint::BeginTransformFeedback>(primitiveMode);
if (context->skipValidation() || ValidateBeginTransformFeedback(context, primitiveMode))
{ {
return; context->beginTransformFeedback(primitiveMode);
} }
context->beginTransformFeedback(primitiveMode);
} }
} }
...@@ -747,12 +754,12 @@ void GL_APIENTRY EndTransformFeedback() ...@@ -747,12 +754,12 @@ void GL_APIENTRY EndTransformFeedback()
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateEndTransformFeedback(context)) context->gatherParams<EntryPoint::EndTransformFeedback>();
if (context->skipValidation() || ValidateEndTransformFeedback(context))
{ {
return; context->endTransformFeedback();
} }
context->endTransformFeedback();
} }
} }
...@@ -767,13 +774,13 @@ BindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLs ...@@ -767,13 +774,13 @@ BindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLs
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::BindBufferRange>(target, index, buffer, offset, size);
!ValidateBindBufferRange(context, target, index, buffer, offset, size))
if (context->skipValidation() ||
ValidateBindBufferRange(context, target, index, buffer, offset, size))
{ {
return; context->bindBufferRange(target, index, buffer, offset, size);
} }
context->bindBufferRange(target, index, buffer, offset, size);
} }
} }
...@@ -784,12 +791,12 @@ void GL_APIENTRY BindBufferBase(GLenum target, GLuint index, GLuint buffer) ...@@ -784,12 +791,12 @@ void GL_APIENTRY BindBufferBase(GLenum target, GLuint index, GLuint buffer)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateBindBufferBase(context, target, index, buffer)) context->gatherParams<EntryPoint::BindBufferBase>(target, index, buffer);
if (context->skipValidation() || ValidateBindBufferBase(context, target, index, buffer))
{ {
return; context->bindBufferBase(target, index, buffer);
} }
context->bindBufferBase(target, index, buffer);
} }
} }
...@@ -806,13 +813,14 @@ void GL_APIENTRY TransformFeedbackVaryings(GLuint program, ...@@ -806,13 +813,14 @@ void GL_APIENTRY TransformFeedbackVaryings(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::TransformFeedbackVaryings>(program, count, varyings,
!ValidateTransformFeedbackVaryings(context, program, count, varyings, bufferMode)) bufferMode);
if (context->skipValidation() ||
ValidateTransformFeedbackVaryings(context, program, count, varyings, bufferMode))
{ {
return; context->transformFeedbackVaryings(program, count, varyings, bufferMode);
} }
context->transformFeedbackVaryings(program, count, varyings, bufferMode);
} }
} }
...@@ -832,14 +840,15 @@ void GL_APIENTRY GetTransformFeedbackVarying(GLuint program, ...@@ -832,14 +840,15 @@ void GL_APIENTRY GetTransformFeedbackVarying(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetTransformFeedbackVarying>(program, index, bufSize,
!ValidateGetTransformFeedbackVarying(context, program, index, bufSize, length, size, length, size, type, name);
type, name))
if (context->skipValidation() ||
ValidateGetTransformFeedbackVarying(context, program, index, bufSize, length, size,
type, name))
{ {
return; context->getTransformFeedbackVarying(program, index, bufSize, length, size, type, name);
} }
context->getTransformFeedbackVarying(program, index, bufSize, length, size, type, name);
} }
} }
...@@ -854,13 +863,13 @@ VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, cons ...@@ -854,13 +863,13 @@ VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, cons
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::VertexAttribIPointer>(index, size, type, stride, pointer);
!ValidateVertexAttribIPointer(context, index, size, type, stride, pointer))
if (context->skipValidation() ||
ValidateVertexAttribIPointer(context, index, size, type, stride, pointer))
{ {
return; context->vertexAttribIPointer(index, size, type, stride, pointer);
} }
context->vertexAttribIPointer(index, size, type, stride, pointer);
} }
} }
...@@ -872,13 +881,12 @@ void GL_APIENTRY GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params) ...@@ -872,13 +881,12 @@ void GL_APIENTRY GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetVertexAttribIiv>(index, pname, params);
!ValidateGetVertexAttribIiv(context, index, pname, params))
if (context->skipValidation() || ValidateGetVertexAttribIiv(context, index, pname, params))
{ {
return; context->getVertexAttribIiv(index, pname, params);
} }
context->getVertexAttribIiv(index, pname, params);
} }
} }
...@@ -890,13 +898,12 @@ void GL_APIENTRY GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params) ...@@ -890,13 +898,12 @@ void GL_APIENTRY GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetVertexAttribIuiv>(index, pname, params);
!ValidateGetVertexAttribIuiv(context, index, pname, params))
if (context->skipValidation() || ValidateGetVertexAttribIuiv(context, index, pname, params))
{ {
return; context->getVertexAttribIuiv(index, pname, params);
} }
context->getVertexAttribIuiv(index, pname, params);
} }
} }
...@@ -908,12 +915,12 @@ void GL_APIENTRY VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint ...@@ -908,12 +915,12 @@ void GL_APIENTRY VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateVertexAttribI4i(context, index, x, y, z, w)) context->gatherParams<EntryPoint::VertexAttribI4i>(index, x, y, z, w);
if (context->skipValidation() || ValidateVertexAttribI4i(context, index, x, y, z, w))
{ {
return; context->vertexAttribI4i(index, x, y, z, w);
} }
context->vertexAttribI4i(index, x, y, z, w);
} }
} }
...@@ -925,12 +932,12 @@ void GL_APIENTRY VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GL ...@@ -925,12 +932,12 @@ void GL_APIENTRY VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GL
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateVertexAttribI4ui(context, index, x, y, z, w)) context->gatherParams<EntryPoint::VertexAttribI4ui>(index, x, y, z, w);
if (context->skipValidation() || ValidateVertexAttribI4ui(context, index, x, y, z, w))
{ {
return; context->vertexAttribI4ui(index, x, y, z, w);
} }
context->vertexAttribI4ui(index, x, y, z, w);
} }
} }
...@@ -941,12 +948,12 @@ void GL_APIENTRY VertexAttribI4iv(GLuint index, const GLint *v) ...@@ -941,12 +948,12 @@ void GL_APIENTRY VertexAttribI4iv(GLuint index, const GLint *v)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateVertexAttribI4iv(context, index, v)) context->gatherParams<EntryPoint::VertexAttribI4iv>(index, v);
if (context->skipValidation() || ValidateVertexAttribI4iv(context, index, v))
{ {
return; context->vertexAttribI4iv(index, v);
} }
context->vertexAttribI4iv(index, v);
} }
} }
...@@ -957,12 +964,12 @@ void GL_APIENTRY VertexAttribI4uiv(GLuint index, const GLuint *v) ...@@ -957,12 +964,12 @@ void GL_APIENTRY VertexAttribI4uiv(GLuint index, const GLuint *v)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateVertexAttribI4uiv(context, index, v)) context->gatherParams<EntryPoint::VertexAttribI4uiv>(index, v);
if (context->skipValidation() || ValidateVertexAttribI4uiv(context, index, v))
{ {
return; context->vertexAttribI4uiv(index, v);
} }
context->vertexAttribI4uiv(index, v);
} }
} }
...@@ -974,13 +981,12 @@ void GL_APIENTRY GetUniformuiv(GLuint program, GLint location, GLuint *params) ...@@ -974,13 +981,12 @@ void GL_APIENTRY GetUniformuiv(GLuint program, GLint location, GLuint *params)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetUniformuiv>(program, location, params);
!ValidateGetUniformuiv(context, program, location, params))
if (context->skipValidation() || ValidateGetUniformuiv(context, program, location, params))
{ {
return; context->getUniformuiv(program, location, params);
} }
context->getUniformuiv(program, location, params);
} }
} }
...@@ -991,12 +997,12 @@ GLint GL_APIENTRY GetFragDataLocation(GLuint program, const GLchar *name) ...@@ -991,12 +997,12 @@ GLint GL_APIENTRY GetFragDataLocation(GLuint program, const GLchar *name)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateGetFragDataLocation(context, program, name)) context->gatherParams<EntryPoint::GetFragDataLocation>(program, name);
if (context->skipValidation() || ValidateGetFragDataLocation(context, program, name))
{ {
return GetDefaultReturnValue<EntryPoint::GetFragDataLocation, GLint>(); return context->getFragDataLocation(program, name);
} }
return context->getFragDataLocation(program, name);
} }
return GetDefaultReturnValue<EntryPoint::GetFragDataLocation, GLint>(); return GetDefaultReturnValue<EntryPoint::GetFragDataLocation, GLint>();
...@@ -1009,12 +1015,12 @@ void GL_APIENTRY Uniform1ui(GLint location, GLuint v0) ...@@ -1009,12 +1015,12 @@ void GL_APIENTRY Uniform1ui(GLint location, GLuint v0)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateUniform1ui(context, location, v0)) context->gatherParams<EntryPoint::Uniform1ui>(location, v0);
if (context->skipValidation() || ValidateUniform1ui(context, location, v0))
{ {
return; context->uniform1ui(location, v0);
} }
context->uniform1ui(location, v0);
} }
} }
...@@ -1025,12 +1031,12 @@ void GL_APIENTRY Uniform2ui(GLint location, GLuint v0, GLuint v1) ...@@ -1025,12 +1031,12 @@ void GL_APIENTRY Uniform2ui(GLint location, GLuint v0, GLuint v1)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateUniform2ui(context, location, v0, v1)) context->gatherParams<EntryPoint::Uniform2ui>(location, v0, v1);
if (context->skipValidation() || ValidateUniform2ui(context, location, v0, v1))
{ {
return; context->uniform2ui(location, v0, v1);
} }
context->uniform2ui(location, v0, v1);
} }
} }
...@@ -1042,12 +1048,12 @@ void GL_APIENTRY Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2) ...@@ -1042,12 +1048,12 @@ void GL_APIENTRY Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateUniform3ui(context, location, v0, v1, v2)) context->gatherParams<EntryPoint::Uniform3ui>(location, v0, v1, v2);
if (context->skipValidation() || ValidateUniform3ui(context, location, v0, v1, v2))
{ {
return; context->uniform3ui(location, v0, v1, v2);
} }
context->uniform3ui(location, v0, v1, v2);
} }
} }
...@@ -1059,12 +1065,12 @@ void GL_APIENTRY Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLu ...@@ -1059,12 +1065,12 @@ void GL_APIENTRY Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLu
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateUniform4ui(context, location, v0, v1, v2, v3)) context->gatherParams<EntryPoint::Uniform4ui>(location, v0, v1, v2, v3);
if (context->skipValidation() || ValidateUniform4ui(context, location, v0, v1, v2, v3))
{ {
return; context->uniform4ui(location, v0, v1, v2, v3);
} }
context->uniform4ui(location, v0, v1, v2, v3);
} }
} }
...@@ -1076,12 +1082,12 @@ void GL_APIENTRY Uniform1uiv(GLint location, GLsizei count, const GLuint *value) ...@@ -1076,12 +1082,12 @@ void GL_APIENTRY Uniform1uiv(GLint location, GLsizei count, const GLuint *value)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateUniform1uiv(context, location, count, value)) context->gatherParams<EntryPoint::Uniform1uiv>(location, count, value);
if (context->skipValidation() || ValidateUniform1uiv(context, location, count, value))
{ {
return; context->uniform1uiv(location, count, value);
} }
context->uniform1uiv(location, count, value);
} }
} }
...@@ -1093,12 +1099,12 @@ void GL_APIENTRY Uniform2uiv(GLint location, GLsizei count, const GLuint *value) ...@@ -1093,12 +1099,12 @@ void GL_APIENTRY Uniform2uiv(GLint location, GLsizei count, const GLuint *value)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateUniform2uiv(context, location, count, value)) context->gatherParams<EntryPoint::Uniform2uiv>(location, count, value);
if (context->skipValidation() || ValidateUniform2uiv(context, location, count, value))
{ {
return; context->uniform2uiv(location, count, value);
} }
context->uniform2uiv(location, count, value);
} }
} }
...@@ -1110,12 +1116,12 @@ void GL_APIENTRY Uniform3uiv(GLint location, GLsizei count, const GLuint *value) ...@@ -1110,12 +1116,12 @@ void GL_APIENTRY Uniform3uiv(GLint location, GLsizei count, const GLuint *value)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateUniform3uiv(context, location, count, value)) context->gatherParams<EntryPoint::Uniform3uiv>(location, count, value);
if (context->skipValidation() || ValidateUniform3uiv(context, location, count, value))
{ {
return; context->uniform3uiv(location, count, value);
} }
context->uniform3uiv(location, count, value);
} }
} }
...@@ -1127,12 +1133,12 @@ void GL_APIENTRY Uniform4uiv(GLint location, GLsizei count, const GLuint *value) ...@@ -1127,12 +1133,12 @@ void GL_APIENTRY Uniform4uiv(GLint location, GLsizei count, const GLuint *value)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateUniform4uiv(context, location, count, value)) context->gatherParams<EntryPoint::Uniform4uiv>(location, count, value);
if (context->skipValidation() || ValidateUniform4uiv(context, location, count, value))
{ {
return; context->uniform4uiv(location, count, value);
} }
context->uniform4uiv(location, count, value);
} }
} }
...@@ -1144,13 +1150,12 @@ void GL_APIENTRY ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *val ...@@ -1144,13 +1150,12 @@ void GL_APIENTRY ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *val
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ClearBufferiv>(buffer, drawbuffer, value);
!ValidateClearBufferiv(context, buffer, drawbuffer, value))
if (context->skipValidation() || ValidateClearBufferiv(context, buffer, drawbuffer, value))
{ {
return; context->clearBufferiv(buffer, drawbuffer, value);
} }
context->clearBufferiv(buffer, drawbuffer, value);
} }
} }
...@@ -1162,13 +1167,12 @@ void GL_APIENTRY ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *v ...@@ -1162,13 +1167,12 @@ void GL_APIENTRY ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *v
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ClearBufferuiv>(buffer, drawbuffer, value);
!ValidateClearBufferuiv(context, buffer, drawbuffer, value))
if (context->skipValidation() || ValidateClearBufferuiv(context, buffer, drawbuffer, value))
{ {
return; context->clearBufferuiv(buffer, drawbuffer, value);
} }
context->clearBufferuiv(buffer, drawbuffer, value);
} }
} }
...@@ -1180,13 +1184,12 @@ void GL_APIENTRY ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *v ...@@ -1180,13 +1184,12 @@ void GL_APIENTRY ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *v
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ClearBufferfv>(buffer, drawbuffer, value);
!ValidateClearBufferfv(context, buffer, drawbuffer, value))
if (context->skipValidation() || ValidateClearBufferfv(context, buffer, drawbuffer, value))
{ {
return; context->clearBufferfv(buffer, drawbuffer, value);
} }
context->clearBufferfv(buffer, drawbuffer, value);
} }
} }
...@@ -1198,13 +1201,13 @@ void GL_APIENTRY ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, G ...@@ -1198,13 +1201,13 @@ void GL_APIENTRY ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, G
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ClearBufferfi>(buffer, drawbuffer, depth, stencil);
!ValidateClearBufferfi(context, buffer, drawbuffer, depth, stencil))
if (context->skipValidation() ||
ValidateClearBufferfi(context, buffer, drawbuffer, depth, stencil))
{ {
return; context->clearBufferfi(buffer, drawbuffer, depth, stencil);
} }
context->clearBufferfi(buffer, drawbuffer, depth, stencil);
} }
} }
...@@ -1215,12 +1218,12 @@ const GLubyte *GL_APIENTRY GetStringi(GLenum name, GLuint index) ...@@ -1215,12 +1218,12 @@ const GLubyte *GL_APIENTRY GetStringi(GLenum name, GLuint index)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateGetStringi(context, name, index)) context->gatherParams<EntryPoint::GetStringi>(name, index);
if (context->skipValidation() || ValidateGetStringi(context, name, index))
{ {
return GetDefaultReturnValue<EntryPoint::GetStringi, const GLubyte *>(); return context->getStringi(name, index);
} }
return context->getStringi(name, index);
} }
return GetDefaultReturnValue<EntryPoint::GetStringi, const GLubyte *>(); return GetDefaultReturnValue<EntryPoint::GetStringi, const GLubyte *>();
...@@ -1240,14 +1243,14 @@ void GL_APIENTRY CopyBufferSubData(GLenum readTarget, ...@@ -1240,14 +1243,14 @@ void GL_APIENTRY CopyBufferSubData(GLenum readTarget,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::CopyBufferSubData>(readTarget, writeTarget, readOffset,
!ValidateCopyBufferSubData(context, readTarget, writeTarget, readOffset, writeOffset, writeOffset, size);
size))
if (context->skipValidation() || ValidateCopyBufferSubData(context, readTarget, writeTarget,
readOffset, writeOffset, size))
{ {
return; context->copyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
} }
context->copyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
} }
} }
...@@ -1264,13 +1267,14 @@ void GL_APIENTRY GetUniformIndices(GLuint program, ...@@ -1264,13 +1267,14 @@ void GL_APIENTRY GetUniformIndices(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateGetUniformIndices(context, program, uniformCount, context->gatherParams<EntryPoint::GetUniformIndices>(program, uniformCount, uniformNames,
uniformNames, uniformIndices)) uniformIndices);
if (context->skipValidation() ||
ValidateGetUniformIndices(context, program, uniformCount, uniformNames, uniformIndices))
{ {
return; context->getUniformIndices(program, uniformCount, uniformNames, uniformIndices);
} }
context->getUniformIndices(program, uniformCount, uniformNames, uniformIndices);
} }
} }
...@@ -1288,14 +1292,14 @@ void GL_APIENTRY GetActiveUniformsiv(GLuint program, ...@@ -1288,14 +1292,14 @@ void GL_APIENTRY GetActiveUniformsiv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetActiveUniformsiv>(program, uniformCount,
!ValidateGetActiveUniformsiv(context, program, uniformCount, uniformIndices, pname, uniformIndices, pname, params);
params))
if (context->skipValidation() || ValidateGetActiveUniformsiv(context, program, uniformCount,
uniformIndices, pname, params))
{ {
return; context->getActiveUniformsiv(program, uniformCount, uniformIndices, pname, params);
} }
context->getActiveUniformsiv(program, uniformCount, uniformIndices, pname, params);
} }
} }
...@@ -1307,13 +1311,13 @@ GLuint GL_APIENTRY GetUniformBlockIndex(GLuint program, const GLchar *uniformBlo ...@@ -1307,13 +1311,13 @@ GLuint GL_APIENTRY GetUniformBlockIndex(GLuint program, const GLchar *uniformBlo
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetUniformBlockIndex>(program, uniformBlockName);
!ValidateGetUniformBlockIndex(context, program, uniformBlockName))
if (context->skipValidation() ||
ValidateGetUniformBlockIndex(context, program, uniformBlockName))
{ {
return GetDefaultReturnValue<EntryPoint::GetUniformBlockIndex, GLuint>(); return context->getUniformBlockIndex(program, uniformBlockName);
} }
return context->getUniformBlockIndex(program, uniformBlockName);
} }
return GetDefaultReturnValue<EntryPoint::GetUniformBlockIndex, GLuint>(); return GetDefaultReturnValue<EntryPoint::GetUniformBlockIndex, GLuint>();
...@@ -1332,13 +1336,14 @@ void GL_APIENTRY GetActiveUniformBlockiv(GLuint program, ...@@ -1332,13 +1336,14 @@ void GL_APIENTRY GetActiveUniformBlockiv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetActiveUniformBlockiv>(program, uniformBlockIndex,
!ValidateGetActiveUniformBlockiv(context, program, uniformBlockIndex, pname, params)) pname, params);
if (context->skipValidation() ||
ValidateGetActiveUniformBlockiv(context, program, uniformBlockIndex, pname, params))
{ {
return; context->getActiveUniformBlockiv(program, uniformBlockIndex, pname, params);
} }
context->getActiveUniformBlockiv(program, uniformBlockIndex, pname, params);
} }
} }
...@@ -1356,15 +1361,16 @@ void GL_APIENTRY GetActiveUniformBlockName(GLuint program, ...@@ -1356,15 +1361,16 @@ void GL_APIENTRY GetActiveUniformBlockName(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetActiveUniformBlockName>(
!ValidateGetActiveUniformBlockName(context, program, uniformBlockIndex, bufSize, length, program, uniformBlockIndex, bufSize, length, uniformBlockName);
uniformBlockName))
if (context->skipValidation() ||
ValidateGetActiveUniformBlockName(context, program, uniformBlockIndex, bufSize, length,
uniformBlockName))
{ {
return; context->getActiveUniformBlockName(program, uniformBlockIndex, bufSize, length,
uniformBlockName);
} }
context->getActiveUniformBlockName(program, uniformBlockIndex, bufSize, length,
uniformBlockName);
} }
} }
...@@ -1378,13 +1384,14 @@ void GL_APIENTRY UniformBlockBinding(GLuint program, ...@@ -1378,13 +1384,14 @@ void GL_APIENTRY UniformBlockBinding(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::UniformBlockBinding>(program, uniformBlockIndex,
!ValidateUniformBlockBinding(context, program, uniformBlockIndex, uniformBlockBinding)) uniformBlockBinding);
if (context->skipValidation() ||
ValidateUniformBlockBinding(context, program, uniformBlockIndex, uniformBlockBinding))
{ {
return; context->uniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
} }
context->uniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
} }
} }
...@@ -1396,13 +1403,13 @@ void GL_APIENTRY DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GL ...@@ -1396,13 +1403,13 @@ void GL_APIENTRY DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GL
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::DrawArraysInstanced>(mode, first, count, instancecount);
!ValidateDrawArraysInstanced(context, mode, first, count, instancecount))
if (context->skipValidation() ||
ValidateDrawArraysInstanced(context, mode, first, count, instancecount))
{ {
return; context->drawArraysInstanced(mode, first, count, instancecount);
} }
context->drawArraysInstanced(mode, first, count, instancecount);
} }
} }
...@@ -1423,13 +1430,11 @@ void GL_APIENTRY DrawElementsInstanced(GLenum mode, ...@@ -1423,13 +1430,11 @@ void GL_APIENTRY DrawElementsInstanced(GLenum mode,
context->gatherParams<EntryPoint::DrawElementsInstanced>(mode, count, type, indices, context->gatherParams<EntryPoint::DrawElementsInstanced>(mode, count, type, indices,
instancecount); instancecount);
if (!context->skipValidation() && if (context->skipValidation() ||
!ValidateDrawElementsInstanced(context, mode, count, type, indices, instancecount)) ValidateDrawElementsInstanced(context, mode, count, type, indices, instancecount))
{ {
return; context->drawElementsInstanced(mode, count, type, indices, instancecount);
} }
context->drawElementsInstanced(mode, count, type, indices, instancecount);
} }
} }
...@@ -1440,12 +1445,12 @@ GLsync GL_APIENTRY FenceSync(GLenum condition, GLbitfield flags) ...@@ -1440,12 +1445,12 @@ GLsync GL_APIENTRY FenceSync(GLenum condition, GLbitfield flags)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateFenceSync(context, condition, flags)) context->gatherParams<EntryPoint::FenceSync>(condition, flags);
if (context->skipValidation() || ValidateFenceSync(context, condition, flags))
{ {
return GetDefaultReturnValue<EntryPoint::FenceSync, GLsync>(); return context->fenceSync(condition, flags);
} }
return context->fenceSync(condition, flags);
} }
return GetDefaultReturnValue<EntryPoint::FenceSync, GLsync>(); return GetDefaultReturnValue<EntryPoint::FenceSync, GLsync>();
...@@ -1458,12 +1463,12 @@ GLboolean GL_APIENTRY IsSync(GLsync sync) ...@@ -1458,12 +1463,12 @@ GLboolean GL_APIENTRY IsSync(GLsync sync)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateIsSync(context, sync)) context->gatherParams<EntryPoint::IsSync>(sync);
if (context->skipValidation() || ValidateIsSync(context, sync))
{ {
return GetDefaultReturnValue<EntryPoint::IsSync, GLboolean>(); return context->isSync(sync);
} }
return context->isSync(sync);
} }
return GetDefaultReturnValue<EntryPoint::IsSync, GLboolean>(); return GetDefaultReturnValue<EntryPoint::IsSync, GLboolean>();
...@@ -1476,12 +1481,12 @@ void GL_APIENTRY DeleteSync(GLsync sync) ...@@ -1476,12 +1481,12 @@ void GL_APIENTRY DeleteSync(GLsync sync)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateDeleteSync(context, sync)) context->gatherParams<EntryPoint::DeleteSync>(sync);
if (context->skipValidation() || ValidateDeleteSync(context, sync))
{ {
return; context->deleteSync(sync);
} }
context->deleteSync(sync);
} }
} }
...@@ -1493,12 +1498,12 @@ GLenum GL_APIENTRY ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeou ...@@ -1493,12 +1498,12 @@ GLenum GL_APIENTRY ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeou
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateClientWaitSync(context, sync, flags, timeout)) context->gatherParams<EntryPoint::ClientWaitSync>(sync, flags, timeout);
if (context->skipValidation() || ValidateClientWaitSync(context, sync, flags, timeout))
{ {
return GetDefaultReturnValue<EntryPoint::ClientWaitSync, GLenum>(); return context->clientWaitSync(sync, flags, timeout);
} }
return context->clientWaitSync(sync, flags, timeout);
} }
return GetDefaultReturnValue<EntryPoint::ClientWaitSync, GLenum>(); return GetDefaultReturnValue<EntryPoint::ClientWaitSync, GLenum>();
...@@ -1512,12 +1517,12 @@ void GL_APIENTRY WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) ...@@ -1512,12 +1517,12 @@ void GL_APIENTRY WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateWaitSync(context, sync, flags, timeout)) context->gatherParams<EntryPoint::WaitSync>(sync, flags, timeout);
if (context->skipValidation() || ValidateWaitSync(context, sync, flags, timeout))
{ {
return; context->waitSync(sync, flags, timeout);
} }
context->waitSync(sync, flags, timeout);
} }
} }
...@@ -1528,12 +1533,12 @@ void GL_APIENTRY GetInteger64v(GLenum pname, GLint64 *data) ...@@ -1528,12 +1533,12 @@ void GL_APIENTRY GetInteger64v(GLenum pname, GLint64 *data)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateGetInteger64v(context, pname, data)) context->gatherParams<EntryPoint::GetInteger64v>(pname, data);
if (context->skipValidation() || ValidateGetInteger64v(context, pname, data))
{ {
return; context->getInteger64v(pname, data);
} }
context->getInteger64v(pname, data);
} }
} }
...@@ -1548,13 +1553,13 @@ GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *va ...@@ -1548,13 +1553,13 @@ GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *va
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetSynciv>(sync, pname, bufSize, length, values);
!ValidateGetSynciv(context, sync, pname, bufSize, length, values))
if (context->skipValidation() ||
ValidateGetSynciv(context, sync, pname, bufSize, length, values))
{ {
return; context->getSynciv(sync, pname, bufSize, length, values);
} }
context->getSynciv(sync, pname, bufSize, length, values);
} }
} }
...@@ -1566,12 +1571,12 @@ void GL_APIENTRY GetInteger64i_v(GLenum target, GLuint index, GLint64 *data) ...@@ -1566,12 +1571,12 @@ void GL_APIENTRY GetInteger64i_v(GLenum target, GLuint index, GLint64 *data)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateGetInteger64i_v(context, target, index, data)) context->gatherParams<EntryPoint::GetInteger64i_v>(target, index, data);
if (context->skipValidation() || ValidateGetInteger64i_v(context, target, index, data))
{ {
return; context->getInteger64i_v(target, index, data);
} }
context->getInteger64i_v(target, index, data);
} }
} }
...@@ -1583,13 +1588,13 @@ void GL_APIENTRY GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *pa ...@@ -1583,13 +1588,13 @@ void GL_APIENTRY GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *pa
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetBufferParameteri64v>(target, pname, params);
!ValidateGetBufferParameteri64v(context, target, pname, params))
if (context->skipValidation() ||
ValidateGetBufferParameteri64v(context, target, pname, params))
{ {
return; context->getBufferParameteri64v(target, pname, params);
} }
context->getBufferParameteri64v(target, pname, params);
} }
} }
...@@ -1600,12 +1605,12 @@ void GL_APIENTRY GenSamplers(GLsizei count, GLuint *samplers) ...@@ -1600,12 +1605,12 @@ void GL_APIENTRY GenSamplers(GLsizei count, GLuint *samplers)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateGenSamplers(context, count, samplers)) context->gatherParams<EntryPoint::GenSamplers>(count, samplers);
if (context->skipValidation() || ValidateGenSamplers(context, count, samplers))
{ {
return; context->genSamplers(count, samplers);
} }
context->genSamplers(count, samplers);
} }
} }
...@@ -1616,12 +1621,12 @@ void GL_APIENTRY DeleteSamplers(GLsizei count, const GLuint *samplers) ...@@ -1616,12 +1621,12 @@ void GL_APIENTRY DeleteSamplers(GLsizei count, const GLuint *samplers)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateDeleteSamplers(context, count, samplers)) context->gatherParams<EntryPoint::DeleteSamplers>(count, samplers);
if (context->skipValidation() || ValidateDeleteSamplers(context, count, samplers))
{ {
return; context->deleteSamplers(count, samplers);
} }
context->deleteSamplers(count, samplers);
} }
} }
...@@ -1632,12 +1637,12 @@ GLboolean GL_APIENTRY IsSampler(GLuint sampler) ...@@ -1632,12 +1637,12 @@ GLboolean GL_APIENTRY IsSampler(GLuint sampler)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateIsSampler(context, sampler)) context->gatherParams<EntryPoint::IsSampler>(sampler);
if (context->skipValidation() || ValidateIsSampler(context, sampler))
{ {
return GetDefaultReturnValue<EntryPoint::IsSampler, GLboolean>(); return context->isSampler(sampler);
} }
return context->isSampler(sampler);
} }
return GetDefaultReturnValue<EntryPoint::IsSampler, GLboolean>(); return GetDefaultReturnValue<EntryPoint::IsSampler, GLboolean>();
...@@ -1650,12 +1655,12 @@ void GL_APIENTRY BindSampler(GLuint unit, GLuint sampler) ...@@ -1650,12 +1655,12 @@ void GL_APIENTRY BindSampler(GLuint unit, GLuint sampler)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateBindSampler(context, unit, sampler)) context->gatherParams<EntryPoint::BindSampler>(unit, sampler);
if (context->skipValidation() || ValidateBindSampler(context, unit, sampler))
{ {
return; context->bindSampler(unit, sampler);
} }
context->bindSampler(unit, sampler);
} }
} }
...@@ -1666,13 +1671,12 @@ void GL_APIENTRY SamplerParameteri(GLuint sampler, GLenum pname, GLint param) ...@@ -1666,13 +1671,12 @@ void GL_APIENTRY SamplerParameteri(GLuint sampler, GLenum pname, GLint param)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::SamplerParameteri>(sampler, pname, param);
!ValidateSamplerParameteri(context, sampler, pname, param))
if (context->skipValidation() || ValidateSamplerParameteri(context, sampler, pname, param))
{ {
return; context->samplerParameteri(sampler, pname, param);
} }
context->samplerParameteri(sampler, pname, param);
} }
} }
...@@ -1684,13 +1688,12 @@ void GL_APIENTRY SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *p ...@@ -1684,13 +1688,12 @@ void GL_APIENTRY SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *p
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::SamplerParameteriv>(sampler, pname, param);
!ValidateSamplerParameteriv(context, sampler, pname, param))
if (context->skipValidation() || ValidateSamplerParameteriv(context, sampler, pname, param))
{ {
return; context->samplerParameteriv(sampler, pname, param);
} }
context->samplerParameteriv(sampler, pname, param);
} }
} }
...@@ -1701,13 +1704,12 @@ void GL_APIENTRY SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) ...@@ -1701,13 +1704,12 @@ void GL_APIENTRY SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::SamplerParameterf>(sampler, pname, param);
!ValidateSamplerParameterf(context, sampler, pname, param))
if (context->skipValidation() || ValidateSamplerParameterf(context, sampler, pname, param))
{ {
return; context->samplerParameterf(sampler, pname, param);
} }
context->samplerParameterf(sampler, pname, param);
} }
} }
...@@ -1719,13 +1721,12 @@ void GL_APIENTRY SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat ...@@ -1719,13 +1721,12 @@ void GL_APIENTRY SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::SamplerParameterfv>(sampler, pname, param);
!ValidateSamplerParameterfv(context, sampler, pname, param))
if (context->skipValidation() || ValidateSamplerParameterfv(context, sampler, pname, param))
{ {
return; context->samplerParameterfv(sampler, pname, param);
} }
context->samplerParameterfv(sampler, pname, param);
} }
} }
...@@ -1737,13 +1738,13 @@ void GL_APIENTRY GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *para ...@@ -1737,13 +1738,13 @@ void GL_APIENTRY GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *para
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetSamplerParameteriv>(sampler, pname, params);
!ValidateGetSamplerParameteriv(context, sampler, pname, params))
if (context->skipValidation() ||
ValidateGetSamplerParameteriv(context, sampler, pname, params))
{ {
return; context->getSamplerParameteriv(sampler, pname, params);
} }
context->getSamplerParameteriv(sampler, pname, params);
} }
} }
...@@ -1755,13 +1756,13 @@ void GL_APIENTRY GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *pa ...@@ -1755,13 +1756,13 @@ void GL_APIENTRY GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *pa
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetSamplerParameterfv>(sampler, pname, params);
!ValidateGetSamplerParameterfv(context, sampler, pname, params))
if (context->skipValidation() ||
ValidateGetSamplerParameterfv(context, sampler, pname, params))
{ {
return; context->getSamplerParameterfv(sampler, pname, params);
} }
context->getSamplerParameterfv(sampler, pname, params);
} }
} }
...@@ -1772,12 +1773,12 @@ void GL_APIENTRY VertexAttribDivisor(GLuint index, GLuint divisor) ...@@ -1772,12 +1773,12 @@ void GL_APIENTRY VertexAttribDivisor(GLuint index, GLuint divisor)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateVertexAttribDivisor(context, index, divisor)) context->gatherParams<EntryPoint::VertexAttribDivisor>(index, divisor);
if (context->skipValidation() || ValidateVertexAttribDivisor(context, index, divisor))
{ {
return; context->vertexAttribDivisor(index, divisor);
} }
context->vertexAttribDivisor(index, divisor);
} }
} }
...@@ -1788,12 +1789,12 @@ void GL_APIENTRY BindTransformFeedback(GLenum target, GLuint id) ...@@ -1788,12 +1789,12 @@ void GL_APIENTRY BindTransformFeedback(GLenum target, GLuint id)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateBindTransformFeedback(context, target, id)) context->gatherParams<EntryPoint::BindTransformFeedback>(target, id);
if (context->skipValidation() || ValidateBindTransformFeedback(context, target, id))
{ {
return; context->bindTransformFeedback(target, id);
} }
context->bindTransformFeedback(target, id);
} }
} }
...@@ -1804,12 +1805,12 @@ void GL_APIENTRY DeleteTransformFeedbacks(GLsizei n, const GLuint *ids) ...@@ -1804,12 +1805,12 @@ void GL_APIENTRY DeleteTransformFeedbacks(GLsizei n, const GLuint *ids)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateDeleteTransformFeedbacks(context, n, ids)) context->gatherParams<EntryPoint::DeleteTransformFeedbacks>(n, ids);
if (context->skipValidation() || ValidateDeleteTransformFeedbacks(context, n, ids))
{ {
return; context->deleteTransformFeedbacks(n, ids);
} }
context->deleteTransformFeedbacks(n, ids);
} }
} }
...@@ -1820,12 +1821,12 @@ void GL_APIENTRY GenTransformFeedbacks(GLsizei n, GLuint *ids) ...@@ -1820,12 +1821,12 @@ void GL_APIENTRY GenTransformFeedbacks(GLsizei n, GLuint *ids)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateGenTransformFeedbacks(context, n, ids)) context->gatherParams<EntryPoint::GenTransformFeedbacks>(n, ids);
if (context->skipValidation() || ValidateGenTransformFeedbacks(context, n, ids))
{ {
return; context->genTransformFeedbacks(n, ids);
} }
context->genTransformFeedbacks(n, ids);
} }
} }
...@@ -1836,12 +1837,12 @@ GLboolean GL_APIENTRY IsTransformFeedback(GLuint id) ...@@ -1836,12 +1837,12 @@ GLboolean GL_APIENTRY IsTransformFeedback(GLuint id)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateIsTransformFeedback(context, id)) context->gatherParams<EntryPoint::IsTransformFeedback>(id);
if (context->skipValidation() || ValidateIsTransformFeedback(context, id))
{ {
return GetDefaultReturnValue<EntryPoint::IsTransformFeedback, GLboolean>(); return context->isTransformFeedback(id);
} }
return context->isTransformFeedback(id);
} }
return GetDefaultReturnValue<EntryPoint::IsTransformFeedback, GLboolean>(); return GetDefaultReturnValue<EntryPoint::IsTransformFeedback, GLboolean>();
...@@ -1854,12 +1855,12 @@ void GL_APIENTRY PauseTransformFeedback() ...@@ -1854,12 +1855,12 @@ void GL_APIENTRY PauseTransformFeedback()
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidatePauseTransformFeedback(context)) context->gatherParams<EntryPoint::PauseTransformFeedback>();
if (context->skipValidation() || ValidatePauseTransformFeedback(context))
{ {
return; context->pauseTransformFeedback();
} }
context->pauseTransformFeedback();
} }
} }
...@@ -1870,12 +1871,12 @@ void GL_APIENTRY ResumeTransformFeedback() ...@@ -1870,12 +1871,12 @@ void GL_APIENTRY ResumeTransformFeedback()
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateResumeTransformFeedback(context)) context->gatherParams<EntryPoint::ResumeTransformFeedback>();
if (context->skipValidation() || ValidateResumeTransformFeedback(context))
{ {
return; context->resumeTransformFeedback();
} }
context->resumeTransformFeedback();
} }
} }
...@@ -1893,13 +1894,14 @@ void GL_APIENTRY GetProgramBinary(GLuint program, ...@@ -1893,13 +1894,14 @@ void GL_APIENTRY GetProgramBinary(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetProgramBinary>(program, bufSize, length, binaryFormat,
!ValidateGetProgramBinary(context, program, bufSize, length, binaryFormat, binary)) binary);
if (context->skipValidation() ||
ValidateGetProgramBinary(context, program, bufSize, length, binaryFormat, binary))
{ {
return; context->getProgramBinary(program, bufSize, length, binaryFormat, binary);
} }
context->getProgramBinary(program, bufSize, length, binaryFormat, binary);
} }
} }
...@@ -1916,13 +1918,13 @@ void GL_APIENTRY ProgramBinary(GLuint program, ...@@ -1916,13 +1918,13 @@ void GL_APIENTRY ProgramBinary(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramBinary>(program, binaryFormat, binary, length);
!ValidateProgramBinary(context, program, binaryFormat, binary, length))
if (context->skipValidation() ||
ValidateProgramBinary(context, program, binaryFormat, binary, length))
{ {
return; context->programBinary(program, binaryFormat, binary, length);
} }
context->programBinary(program, binaryFormat, binary, length);
} }
} }
...@@ -1933,13 +1935,12 @@ void GL_APIENTRY ProgramParameteri(GLuint program, GLenum pname, GLint value) ...@@ -1933,13 +1935,12 @@ void GL_APIENTRY ProgramParameteri(GLuint program, GLenum pname, GLint value)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramParameteri>(program, pname, value);
!ValidateProgramParameteri(context, program, pname, value))
if (context->skipValidation() || ValidateProgramParameteri(context, program, pname, value))
{ {
return; context->programParameteri(program, pname, value);
} }
context->programParameteri(program, pname, value);
} }
} }
...@@ -1954,13 +1955,14 @@ void GL_APIENTRY InvalidateFramebuffer(GLenum target, ...@@ -1954,13 +1955,14 @@ void GL_APIENTRY InvalidateFramebuffer(GLenum target,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::InvalidateFramebuffer>(target, numAttachments,
!ValidateInvalidateFramebuffer(context, target, numAttachments, attachments)) attachments);
if (context->skipValidation() ||
ValidateInvalidateFramebuffer(context, target, numAttachments, attachments))
{ {
return; context->invalidateFramebuffer(target, numAttachments, attachments);
} }
context->invalidateFramebuffer(target, numAttachments, attachments);
} }
} }
...@@ -1980,14 +1982,16 @@ void GL_APIENTRY InvalidateSubFramebuffer(GLenum target, ...@@ -1980,14 +1982,16 @@ void GL_APIENTRY InvalidateSubFramebuffer(GLenum target,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::InvalidateSubFramebuffer>(
!ValidateInvalidateSubFramebuffer(context, target, numAttachments, attachments, x, y, target, numAttachments, attachments, x, y, width, height);
width, height))
if (context->skipValidation() ||
ValidateInvalidateSubFramebuffer(context, target, numAttachments, attachments, x, y,
width, height))
{ {
return; context->invalidateSubFramebuffer(target, numAttachments, attachments, x, y, width,
height);
} }
context->invalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height);
} }
} }
...@@ -2002,13 +2006,14 @@ TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width ...@@ -2002,13 +2006,14 @@ TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::TexStorage2D>(target, levels, internalformat, width,
!ValidateTexStorage2D(context, target, levels, internalformat, width, height)) height);
if (context->skipValidation() ||
ValidateTexStorage2D(context, target, levels, internalformat, width, height))
{ {
return; context->texStorage2D(target, levels, internalformat, width, height);
} }
context->texStorage2D(target, levels, internalformat, width, height);
} }
} }
...@@ -2027,13 +2032,14 @@ void GL_APIENTRY TexStorage3D(GLenum target, ...@@ -2027,13 +2032,14 @@ void GL_APIENTRY TexStorage3D(GLenum target,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::TexStorage3D>(target, levels, internalformat, width,
!ValidateTexStorage3D(context, target, levels, internalformat, width, height, depth)) height, depth);
if (context->skipValidation() ||
ValidateTexStorage3D(context, target, levels, internalformat, width, height, depth))
{ {
return; context->texStorage3D(target, levels, internalformat, width, height, depth);
} }
context->texStorage3D(target, levels, internalformat, width, height, depth);
} }
} }
...@@ -2051,13 +2057,14 @@ void GL_APIENTRY GetInternalformativ(GLenum target, ...@@ -2051,13 +2057,14 @@ void GL_APIENTRY GetInternalformativ(GLenum target,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetInternalformativ>(target, internalformat, pname,
!ValidateGetInternalformativ(context, target, internalformat, pname, bufSize, params)) bufSize, params);
if (context->skipValidation() ||
ValidateGetInternalformativ(context, target, internalformat, pname, bufSize, params))
{ {
return; context->getInternalformativ(target, internalformat, pname, bufSize, params);
} }
context->getInternalformativ(target, internalformat, pname, bufSize, params);
} }
} }
} // namespace gl } // namespace gl
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