Commit ed2e6aa5 by Jiajia Qin Committed by Commit Bot

GLES31: Use more compact entry point style.

This migrates to the new generation style used in GLES2 and GLES3. BUG=angleproject:2254 Change-Id: I10afa1f006ff68e8bafda2bd45dd9a048f8f7dff Reviewed-on: https://chromium-review.googlesource.com/787172 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent c7c0d1c1
...@@ -249,10 +249,7 @@ for major_version, minor_version in [[2, 0], [3, 0], [3, 1]]: ...@@ -249,10 +249,7 @@ for major_version, minor_version in [[2, 0], [3, 0], [3, 1]]:
proto = "".join(command.find("./proto").itertext()) proto = "".join(command.find("./proto").itertext())
cmd_names += [cmd_name] cmd_names += [cmd_name]
entry_point_decls += [format_entry_point_decl(cmd_name, proto, params)] entry_point_decls += [format_entry_point_decl(cmd_name, proto, params)]
if major_version == 3 and minor_version == 1: entry_point_defs += [format_entry_point_def(cmd_name, proto, params)]
entry_point_defs += [format_entry_point_def_oldstyle(cmd_name, proto, params)]
else:
entry_point_defs += [format_entry_point_def(cmd_name, proto, params)]
for type in ["header", "source"]: for type in ["header", "source"]:
if type == "header": if type == "header":
......
...@@ -22,13 +22,14 @@ void GL_APIENTRY DispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuin ...@@ -22,13 +22,14 @@ void GL_APIENTRY DispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuin
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::DispatchCompute>(num_groups_x, num_groups_y,
!ValidateDispatchCompute(context, num_groups_x, num_groups_y, num_groups_z)) num_groups_z);
if (context->skipValidation() ||
ValidateDispatchCompute(context, num_groups_x, num_groups_y, num_groups_z))
{ {
return; context->dispatchCompute(num_groups_x, num_groups_y, num_groups_z);
} }
context->dispatchCompute(num_groups_x, num_groups_y, num_groups_z);
} }
} }
...@@ -39,12 +40,12 @@ void GL_APIENTRY DispatchComputeIndirect(GLintptr indirect) ...@@ -39,12 +40,12 @@ void GL_APIENTRY DispatchComputeIndirect(GLintptr indirect)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateDispatchComputeIndirect(context, indirect)) context->gatherParams<EntryPoint::DispatchComputeIndirect>(indirect);
if (context->skipValidation() || ValidateDispatchComputeIndirect(context, indirect))
{ {
return; context->dispatchComputeIndirect(indirect);
} }
context->dispatchComputeIndirect(indirect);
} }
} }
...@@ -55,12 +56,12 @@ void GL_APIENTRY DrawArraysIndirect(GLenum mode, const void *indirect) ...@@ -55,12 +56,12 @@ void GL_APIENTRY DrawArraysIndirect(GLenum mode, const void *indirect)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateDrawArraysIndirect(context, mode, indirect)) context->gatherParams<EntryPoint::DrawArraysIndirect>(mode, indirect);
if (context->skipValidation() || ValidateDrawArraysIndirect(context, mode, indirect))
{ {
return; context->drawArraysIndirect(mode, indirect);
} }
context->drawArraysIndirect(mode, indirect);
} }
} }
...@@ -72,13 +73,13 @@ void GL_APIENTRY DrawElementsIndirect(GLenum mode, GLenum type, const void *indi ...@@ -72,13 +73,13 @@ void GL_APIENTRY DrawElementsIndirect(GLenum mode, GLenum type, const void *indi
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::DrawElementsIndirect>(mode, type, indirect);
!ValidateDrawElementsIndirect(context, mode, type, indirect))
if (context->skipValidation() ||
ValidateDrawElementsIndirect(context, mode, type, indirect))
{ {
return; context->drawElementsIndirect(mode, type, indirect);
} }
context->drawElementsIndirect(mode, type, indirect);
} }
} }
...@@ -89,13 +90,13 @@ void GL_APIENTRY FramebufferParameteri(GLenum target, GLenum pname, GLint param) ...@@ -89,13 +90,13 @@ void GL_APIENTRY FramebufferParameteri(GLenum target, GLenum pname, GLint param)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::FramebufferParameteri>(target, pname, param);
!ValidateFramebufferParameteri(context, target, pname, param))
if (context->skipValidation() ||
ValidateFramebufferParameteri(context, target, pname, param))
{ {
return; context->framebufferParameteri(target, pname, param);
} }
context->framebufferParameteri(target, pname, param);
} }
} }
...@@ -107,13 +108,13 @@ void GL_APIENTRY GetFramebufferParameteriv(GLenum target, GLenum pname, GLint *p ...@@ -107,13 +108,13 @@ void GL_APIENTRY GetFramebufferParameteriv(GLenum target, GLenum pname, GLint *p
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetFramebufferParameteriv>(target, pname, params);
!ValidateGetFramebufferParameteriv(context, target, pname, params))
if (context->skipValidation() ||
ValidateGetFramebufferParameteriv(context, target, pname, params))
{ {
return; context->getFramebufferParameteriv(target, pname, params);
} }
context->getFramebufferParameteriv(target, pname, params);
} }
} }
...@@ -130,13 +131,14 @@ void GL_APIENTRY GetProgramInterfaceiv(GLuint program, ...@@ -130,13 +131,14 @@ void GL_APIENTRY GetProgramInterfaceiv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetProgramInterfaceiv>(program, programInterface, pname,
!ValidateGetProgramInterfaceiv(context, program, programInterface, pname, params)) params);
if (context->skipValidation() ||
ValidateGetProgramInterfaceiv(context, program, programInterface, pname, params))
{ {
return; context->getProgramInterfaceiv(program, programInterface, pname, params);
} }
context->getProgramInterfaceiv(program, programInterface, pname, params);
} }
} }
...@@ -150,13 +152,13 @@ GLuint GL_APIENTRY GetProgramResourceIndex(GLuint program, ...@@ -150,13 +152,13 @@ GLuint GL_APIENTRY GetProgramResourceIndex(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetProgramResourceIndex>(program, programInterface, name);
!ValidateGetProgramResourceIndex(context, program, programInterface, name))
if (context->skipValidation() ||
ValidateGetProgramResourceIndex(context, program, programInterface, name))
{ {
return GetDefaultReturnValue<EntryPoint::GetProgramResourceIndex, GLuint>(); return context->getProgramResourceIndex(program, programInterface, name);
} }
return context->getProgramResourceIndex(program, programInterface, name);
} }
return GetDefaultReturnValue<EntryPoint::GetProgramResourceIndex, GLuint>(); return GetDefaultReturnValue<EntryPoint::GetProgramResourceIndex, GLuint>();
...@@ -177,14 +179,16 @@ void GL_APIENTRY GetProgramResourceName(GLuint program, ...@@ -177,14 +179,16 @@ void GL_APIENTRY GetProgramResourceName(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetProgramResourceName>(program, programInterface, index,
!ValidateGetProgramResourceName(context, program, programInterface, index, bufSize, bufSize, length, name);
length, name))
if (context->skipValidation() ||
ValidateGetProgramResourceName(context, program, programInterface, index, bufSize,
length, name))
{ {
return; context->getProgramResourceName(program, programInterface, index, bufSize, length,
name);
} }
context->getProgramResourceName(program, programInterface, index, bufSize, length, name);
} }
} }
...@@ -206,15 +210,16 @@ void GL_APIENTRY GetProgramResourceiv(GLuint program, ...@@ -206,15 +210,16 @@ void GL_APIENTRY GetProgramResourceiv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetProgramResourceiv>(
!ValidateGetProgramResourceiv(context, program, programInterface, index, propCount, program, programInterface, index, propCount, props, bufSize, length, params);
props, bufSize, length, params))
if (context->skipValidation() ||
ValidateGetProgramResourceiv(context, program, programInterface, index, propCount,
props, bufSize, length, params))
{ {
return; context->getProgramResourceiv(program, programInterface, index, propCount, props,
bufSize, length, params);
} }
context->getProgramResourceiv(program, programInterface, index, propCount, props, bufSize,
length, params);
} }
} }
...@@ -228,13 +233,14 @@ GLint GL_APIENTRY GetProgramResourceLocation(GLuint program, ...@@ -228,13 +233,14 @@ GLint GL_APIENTRY GetProgramResourceLocation(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetProgramResourceLocation>(program, programInterface,
!ValidateGetProgramResourceLocation(context, program, programInterface, name)) name);
if (context->skipValidation() ||
ValidateGetProgramResourceLocation(context, program, programInterface, name))
{ {
return GetDefaultReturnValue<EntryPoint::GetProgramResourceLocation, GLint>(); return context->getProgramResourceLocation(program, programInterface, name);
} }
return context->getProgramResourceLocation(program, programInterface, name);
} }
return GetDefaultReturnValue<EntryPoint::GetProgramResourceLocation, GLint>(); return GetDefaultReturnValue<EntryPoint::GetProgramResourceLocation, GLint>();
...@@ -248,13 +254,13 @@ void GL_APIENTRY UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint pro ...@@ -248,13 +254,13 @@ void GL_APIENTRY UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint pro
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::UseProgramStages>(pipeline, stages, program);
!ValidateUseProgramStages(context, pipeline, stages, program))
if (context->skipValidation() ||
ValidateUseProgramStages(context, pipeline, stages, program))
{ {
return; context->useProgramStages(pipeline, stages, program);
} }
context->useProgramStages(pipeline, stages, program);
} }
} }
...@@ -265,12 +271,12 @@ void GL_APIENTRY ActiveShaderProgram(GLuint pipeline, GLuint program) ...@@ -265,12 +271,12 @@ void GL_APIENTRY ActiveShaderProgram(GLuint pipeline, GLuint program)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateActiveShaderProgram(context, pipeline, program)) context->gatherParams<EntryPoint::ActiveShaderProgram>(pipeline, program);
if (context->skipValidation() || ValidateActiveShaderProgram(context, pipeline, program))
{ {
return; context->activeShaderProgram(pipeline, program);
} }
context->activeShaderProgram(pipeline, program);
} }
} }
...@@ -282,13 +288,13 @@ GLuint GL_APIENTRY CreateShaderProgramv(GLenum type, GLsizei count, const GLchar ...@@ -282,13 +288,13 @@ GLuint GL_APIENTRY CreateShaderProgramv(GLenum type, GLsizei count, const GLchar
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::CreateShaderProgramv>(type, count, strings);
!ValidateCreateShaderProgramv(context, type, count, strings))
if (context->skipValidation() ||
ValidateCreateShaderProgramv(context, type, count, strings))
{ {
return GetDefaultReturnValue<EntryPoint::CreateShaderProgramv, GLuint>(); return context->createShaderProgramv(type, count, strings);
} }
return context->createShaderProgramv(type, count, strings);
} }
return GetDefaultReturnValue<EntryPoint::CreateShaderProgramv, GLuint>(); return GetDefaultReturnValue<EntryPoint::CreateShaderProgramv, GLuint>();
...@@ -301,12 +307,12 @@ void GL_APIENTRY BindProgramPipeline(GLuint pipeline) ...@@ -301,12 +307,12 @@ void GL_APIENTRY BindProgramPipeline(GLuint pipeline)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateBindProgramPipeline(context, pipeline)) context->gatherParams<EntryPoint::BindProgramPipeline>(pipeline);
if (context->skipValidation() || ValidateBindProgramPipeline(context, pipeline))
{ {
return; context->bindProgramPipeline(pipeline);
} }
context->bindProgramPipeline(pipeline);
} }
} }
...@@ -317,12 +323,12 @@ void GL_APIENTRY DeleteProgramPipelines(GLsizei n, const GLuint *pipelines) ...@@ -317,12 +323,12 @@ void GL_APIENTRY DeleteProgramPipelines(GLsizei n, const GLuint *pipelines)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateDeleteProgramPipelines(context, n, pipelines)) context->gatherParams<EntryPoint::DeleteProgramPipelines>(n, pipelines);
if (context->skipValidation() || ValidateDeleteProgramPipelines(context, n, pipelines))
{ {
return; context->deleteProgramPipelines(n, pipelines);
} }
context->deleteProgramPipelines(n, pipelines);
} }
} }
...@@ -333,12 +339,12 @@ void GL_APIENTRY GenProgramPipelines(GLsizei n, GLuint *pipelines) ...@@ -333,12 +339,12 @@ void GL_APIENTRY GenProgramPipelines(GLsizei n, GLuint *pipelines)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateGenProgramPipelines(context, n, pipelines)) context->gatherParams<EntryPoint::GenProgramPipelines>(n, pipelines);
if (context->skipValidation() || ValidateGenProgramPipelines(context, n, pipelines))
{ {
return; context->genProgramPipelines(n, pipelines);
} }
context->genProgramPipelines(n, pipelines);
} }
} }
...@@ -349,12 +355,12 @@ GLboolean GL_APIENTRY IsProgramPipeline(GLuint pipeline) ...@@ -349,12 +355,12 @@ GLboolean GL_APIENTRY IsProgramPipeline(GLuint pipeline)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateIsProgramPipeline(context, pipeline)) context->gatherParams<EntryPoint::IsProgramPipeline>(pipeline);
if (context->skipValidation() || ValidateIsProgramPipeline(context, pipeline))
{ {
return GetDefaultReturnValue<EntryPoint::IsProgramPipeline, GLboolean>(); return context->isProgramPipeline(pipeline);
} }
return context->isProgramPipeline(pipeline);
} }
return GetDefaultReturnValue<EntryPoint::IsProgramPipeline, GLboolean>(); return GetDefaultReturnValue<EntryPoint::IsProgramPipeline, GLboolean>();
...@@ -368,13 +374,13 @@ void GL_APIENTRY GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *para ...@@ -368,13 +374,13 @@ void GL_APIENTRY GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *para
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetProgramPipelineiv>(pipeline, pname, params);
!ValidateGetProgramPipelineiv(context, pipeline, pname, params))
if (context->skipValidation() ||
ValidateGetProgramPipelineiv(context, pipeline, pname, params))
{ {
return; context->getProgramPipelineiv(pipeline, pname, params);
} }
context->getProgramPipelineiv(pipeline, pname, params);
} }
} }
...@@ -385,12 +391,12 @@ void GL_APIENTRY ProgramUniform1i(GLuint program, GLint location, GLint v0) ...@@ -385,12 +391,12 @@ void GL_APIENTRY ProgramUniform1i(GLuint program, GLint location, GLint v0)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateProgramUniform1i(context, program, location, v0)) context->gatherParams<EntryPoint::ProgramUniform1i>(program, location, v0);
if (context->skipValidation() || ValidateProgramUniform1i(context, program, location, v0))
{ {
return; context->programUniform1i(program, location, v0);
} }
context->programUniform1i(program, location, v0);
} }
} }
...@@ -402,13 +408,13 @@ void GL_APIENTRY ProgramUniform2i(GLuint program, GLint location, GLint v0, GLin ...@@ -402,13 +408,13 @@ void GL_APIENTRY ProgramUniform2i(GLuint program, GLint location, GLint v0, GLin
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform2i>(program, location, v0, v1);
!ValidateProgramUniform2i(context, program, location, v0, v1))
if (context->skipValidation() ||
ValidateProgramUniform2i(context, program, location, v0, v1))
{ {
return; context->programUniform2i(program, location, v0, v1);
} }
context->programUniform2i(program, location, v0, v1);
} }
} }
...@@ -420,13 +426,13 @@ void GL_APIENTRY ProgramUniform3i(GLuint program, GLint location, GLint v0, GLin ...@@ -420,13 +426,13 @@ void GL_APIENTRY ProgramUniform3i(GLuint program, GLint location, GLint v0, GLin
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform3i>(program, location, v0, v1, v2);
!ValidateProgramUniform3i(context, program, location, v0, v1, v2))
if (context->skipValidation() ||
ValidateProgramUniform3i(context, program, location, v0, v1, v2))
{ {
return; context->programUniform3i(program, location, v0, v1, v2);
} }
context->programUniform3i(program, location, v0, v1, v2);
} }
} }
...@@ -441,13 +447,13 @@ ProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, G ...@@ -441,13 +447,13 @@ ProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, G
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform4i>(program, location, v0, v1, v2, v3);
!ValidateProgramUniform4i(context, program, location, v0, v1, v2, v3))
if (context->skipValidation() ||
ValidateProgramUniform4i(context, program, location, v0, v1, v2, v3))
{ {
return; context->programUniform4i(program, location, v0, v1, v2, v3);
} }
context->programUniform4i(program, location, v0, v1, v2, v3);
} }
} }
...@@ -458,13 +464,12 @@ void GL_APIENTRY ProgramUniform1ui(GLuint program, GLint location, GLuint v0) ...@@ -458,13 +464,12 @@ void GL_APIENTRY ProgramUniform1ui(GLuint program, GLint location, GLuint v0)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform1ui>(program, location, v0);
!ValidateProgramUniform1ui(context, program, location, v0))
if (context->skipValidation() || ValidateProgramUniform1ui(context, program, location, v0))
{ {
return; context->programUniform1ui(program, location, v0);
} }
context->programUniform1ui(program, location, v0);
} }
} }
...@@ -476,13 +481,13 @@ void GL_APIENTRY ProgramUniform2ui(GLuint program, GLint location, GLuint v0, GL ...@@ -476,13 +481,13 @@ void GL_APIENTRY ProgramUniform2ui(GLuint program, GLint location, GLuint v0, GL
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform2ui>(program, location, v0, v1);
!ValidateProgramUniform2ui(context, program, location, v0, v1))
if (context->skipValidation() ||
ValidateProgramUniform2ui(context, program, location, v0, v1))
{ {
return; context->programUniform2ui(program, location, v0, v1);
} }
context->programUniform2ui(program, location, v0, v1);
} }
} }
...@@ -496,13 +501,13 @@ void GL_APIENTRY ProgramUniform3ui(GLuint program, GLint location, GLuint v0, GL ...@@ -496,13 +501,13 @@ void GL_APIENTRY ProgramUniform3ui(GLuint program, GLint location, GLuint v0, GL
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform3ui>(program, location, v0, v1, v2);
!ValidateProgramUniform3ui(context, program, location, v0, v1, v2))
if (context->skipValidation() ||
ValidateProgramUniform3ui(context, program, location, v0, v1, v2))
{ {
return; context->programUniform3ui(program, location, v0, v1, v2);
} }
context->programUniform3ui(program, location, v0, v1, v2);
} }
} }
...@@ -517,13 +522,13 @@ ProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v ...@@ -517,13 +522,13 @@ ProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform4ui>(program, location, v0, v1, v2, v3);
!ValidateProgramUniform4ui(context, program, location, v0, v1, v2, v3))
if (context->skipValidation() ||
ValidateProgramUniform4ui(context, program, location, v0, v1, v2, v3))
{ {
return; context->programUniform4ui(program, location, v0, v1, v2, v3);
} }
context->programUniform4ui(program, location, v0, v1, v2, v3);
} }
} }
...@@ -534,12 +539,12 @@ void GL_APIENTRY ProgramUniform1f(GLuint program, GLint location, GLfloat v0) ...@@ -534,12 +539,12 @@ void GL_APIENTRY ProgramUniform1f(GLuint program, GLint location, GLfloat v0)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateProgramUniform1f(context, program, location, v0)) context->gatherParams<EntryPoint::ProgramUniform1f>(program, location, v0);
if (context->skipValidation() || ValidateProgramUniform1f(context, program, location, v0))
{ {
return; context->programUniform1f(program, location, v0);
} }
context->programUniform1f(program, location, v0);
} }
} }
...@@ -551,13 +556,13 @@ void GL_APIENTRY ProgramUniform2f(GLuint program, GLint location, GLfloat v0, GL ...@@ -551,13 +556,13 @@ void GL_APIENTRY ProgramUniform2f(GLuint program, GLint location, GLfloat v0, GL
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform2f>(program, location, v0, v1);
!ValidateProgramUniform2f(context, program, location, v0, v1))
if (context->skipValidation() ||
ValidateProgramUniform2f(context, program, location, v0, v1))
{ {
return; context->programUniform2f(program, location, v0, v1);
} }
context->programUniform2f(program, location, v0, v1);
} }
} }
...@@ -572,13 +577,13 @@ ProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat ...@@ -572,13 +577,13 @@ ProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform3f>(program, location, v0, v1, v2);
!ValidateProgramUniform3f(context, program, location, v0, v1, v2))
if (context->skipValidation() ||
ValidateProgramUniform3f(context, program, location, v0, v1, v2))
{ {
return; context->programUniform3f(program, location, v0, v1, v2);
} }
context->programUniform3f(program, location, v0, v1, v2);
} }
} }
...@@ -593,13 +598,13 @@ ProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat ...@@ -593,13 +598,13 @@ ProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform4f>(program, location, v0, v1, v2, v3);
!ValidateProgramUniform4f(context, program, location, v0, v1, v2, v3))
if (context->skipValidation() ||
ValidateProgramUniform4f(context, program, location, v0, v1, v2, v3))
{ {
return; context->programUniform4f(program, location, v0, v1, v2, v3);
} }
context->programUniform4f(program, location, v0, v1, v2, v3);
} }
} }
...@@ -616,13 +621,13 @@ void GL_APIENTRY ProgramUniform1iv(GLuint program, ...@@ -616,13 +621,13 @@ void GL_APIENTRY ProgramUniform1iv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform1iv>(program, location, count, value);
!ValidateProgramUniform1iv(context, program, location, count, value))
if (context->skipValidation() ||
ValidateProgramUniform1iv(context, program, location, count, value))
{ {
return; context->programUniform1iv(program, location, count, value);
} }
context->programUniform1iv(program, location, count, value);
} }
} }
...@@ -639,13 +644,13 @@ void GL_APIENTRY ProgramUniform2iv(GLuint program, ...@@ -639,13 +644,13 @@ void GL_APIENTRY ProgramUniform2iv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform2iv>(program, location, count, value);
!ValidateProgramUniform2iv(context, program, location, count, value))
if (context->skipValidation() ||
ValidateProgramUniform2iv(context, program, location, count, value))
{ {
return; context->programUniform2iv(program, location, count, value);
} }
context->programUniform2iv(program, location, count, value);
} }
} }
...@@ -662,13 +667,13 @@ void GL_APIENTRY ProgramUniform3iv(GLuint program, ...@@ -662,13 +667,13 @@ void GL_APIENTRY ProgramUniform3iv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform3iv>(program, location, count, value);
!ValidateProgramUniform3iv(context, program, location, count, value))
if (context->skipValidation() ||
ValidateProgramUniform3iv(context, program, location, count, value))
{ {
return; context->programUniform3iv(program, location, count, value);
} }
context->programUniform3iv(program, location, count, value);
} }
} }
...@@ -685,13 +690,13 @@ void GL_APIENTRY ProgramUniform4iv(GLuint program, ...@@ -685,13 +690,13 @@ void GL_APIENTRY ProgramUniform4iv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform4iv>(program, location, count, value);
!ValidateProgramUniform4iv(context, program, location, count, value))
if (context->skipValidation() ||
ValidateProgramUniform4iv(context, program, location, count, value))
{ {
return; context->programUniform4iv(program, location, count, value);
} }
context->programUniform4iv(program, location, count, value);
} }
} }
...@@ -708,13 +713,13 @@ void GL_APIENTRY ProgramUniform1uiv(GLuint program, ...@@ -708,13 +713,13 @@ void GL_APIENTRY ProgramUniform1uiv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform1uiv>(program, location, count, value);
!ValidateProgramUniform1uiv(context, program, location, count, value))
if (context->skipValidation() ||
ValidateProgramUniform1uiv(context, program, location, count, value))
{ {
return; context->programUniform1uiv(program, location, count, value);
} }
context->programUniform1uiv(program, location, count, value);
} }
} }
...@@ -731,13 +736,13 @@ void GL_APIENTRY ProgramUniform2uiv(GLuint program, ...@@ -731,13 +736,13 @@ void GL_APIENTRY ProgramUniform2uiv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform2uiv>(program, location, count, value);
!ValidateProgramUniform2uiv(context, program, location, count, value))
if (context->skipValidation() ||
ValidateProgramUniform2uiv(context, program, location, count, value))
{ {
return; context->programUniform2uiv(program, location, count, value);
} }
context->programUniform2uiv(program, location, count, value);
} }
} }
...@@ -754,13 +759,13 @@ void GL_APIENTRY ProgramUniform3uiv(GLuint program, ...@@ -754,13 +759,13 @@ void GL_APIENTRY ProgramUniform3uiv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform3uiv>(program, location, count, value);
!ValidateProgramUniform3uiv(context, program, location, count, value))
if (context->skipValidation() ||
ValidateProgramUniform3uiv(context, program, location, count, value))
{ {
return; context->programUniform3uiv(program, location, count, value);
} }
context->programUniform3uiv(program, location, count, value);
} }
} }
...@@ -777,13 +782,13 @@ void GL_APIENTRY ProgramUniform4uiv(GLuint program, ...@@ -777,13 +782,13 @@ void GL_APIENTRY ProgramUniform4uiv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform4uiv>(program, location, count, value);
!ValidateProgramUniform4uiv(context, program, location, count, value))
if (context->skipValidation() ||
ValidateProgramUniform4uiv(context, program, location, count, value))
{ {
return; context->programUniform4uiv(program, location, count, value);
} }
context->programUniform4uiv(program, location, count, value);
} }
} }
...@@ -800,13 +805,13 @@ void GL_APIENTRY ProgramUniform1fv(GLuint program, ...@@ -800,13 +805,13 @@ void GL_APIENTRY ProgramUniform1fv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform1fv>(program, location, count, value);
!ValidateProgramUniform1fv(context, program, location, count, value))
if (context->skipValidation() ||
ValidateProgramUniform1fv(context, program, location, count, value))
{ {
return; context->programUniform1fv(program, location, count, value);
} }
context->programUniform1fv(program, location, count, value);
} }
} }
...@@ -823,13 +828,13 @@ void GL_APIENTRY ProgramUniform2fv(GLuint program, ...@@ -823,13 +828,13 @@ void GL_APIENTRY ProgramUniform2fv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform2fv>(program, location, count, value);
!ValidateProgramUniform2fv(context, program, location, count, value))
if (context->skipValidation() ||
ValidateProgramUniform2fv(context, program, location, count, value))
{ {
return; context->programUniform2fv(program, location, count, value);
} }
context->programUniform2fv(program, location, count, value);
} }
} }
...@@ -846,13 +851,13 @@ void GL_APIENTRY ProgramUniform3fv(GLuint program, ...@@ -846,13 +851,13 @@ void GL_APIENTRY ProgramUniform3fv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform3fv>(program, location, count, value);
!ValidateProgramUniform3fv(context, program, location, count, value))
if (context->skipValidation() ||
ValidateProgramUniform3fv(context, program, location, count, value))
{ {
return; context->programUniform3fv(program, location, count, value);
} }
context->programUniform3fv(program, location, count, value);
} }
} }
...@@ -869,13 +874,13 @@ void GL_APIENTRY ProgramUniform4fv(GLuint program, ...@@ -869,13 +874,13 @@ void GL_APIENTRY ProgramUniform4fv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniform4fv>(program, location, count, value);
!ValidateProgramUniform4fv(context, program, location, count, value))
if (context->skipValidation() ||
ValidateProgramUniform4fv(context, program, location, count, value))
{ {
return; context->programUniform4fv(program, location, count, value);
} }
context->programUniform4fv(program, location, count, value);
} }
} }
...@@ -893,13 +898,14 @@ void GL_APIENTRY ProgramUniformMatrix2fv(GLuint program, ...@@ -893,13 +898,14 @@ void GL_APIENTRY ProgramUniformMatrix2fv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniformMatrix2fv>(program, location, count,
!ValidateProgramUniformMatrix2fv(context, program, location, count, transpose, value)) transpose, value);
if (context->skipValidation() ||
ValidateProgramUniformMatrix2fv(context, program, location, count, transpose, value))
{ {
return; context->programUniformMatrix2fv(program, location, count, transpose, value);
} }
context->programUniformMatrix2fv(program, location, count, transpose, value);
} }
} }
...@@ -917,13 +923,14 @@ void GL_APIENTRY ProgramUniformMatrix3fv(GLuint program, ...@@ -917,13 +923,14 @@ void GL_APIENTRY ProgramUniformMatrix3fv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniformMatrix3fv>(program, location, count,
!ValidateProgramUniformMatrix3fv(context, program, location, count, transpose, value)) transpose, value);
if (context->skipValidation() ||
ValidateProgramUniformMatrix3fv(context, program, location, count, transpose, value))
{ {
return; context->programUniformMatrix3fv(program, location, count, transpose, value);
} }
context->programUniformMatrix3fv(program, location, count, transpose, value);
} }
} }
...@@ -941,13 +948,14 @@ void GL_APIENTRY ProgramUniformMatrix4fv(GLuint program, ...@@ -941,13 +948,14 @@ void GL_APIENTRY ProgramUniformMatrix4fv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniformMatrix4fv>(program, location, count,
!ValidateProgramUniformMatrix4fv(context, program, location, count, transpose, value)) transpose, value);
if (context->skipValidation() ||
ValidateProgramUniformMatrix4fv(context, program, location, count, transpose, value))
{ {
return; context->programUniformMatrix4fv(program, location, count, transpose, value);
} }
context->programUniformMatrix4fv(program, location, count, transpose, value);
} }
} }
...@@ -965,13 +973,14 @@ void GL_APIENTRY ProgramUniformMatrix2x3fv(GLuint program, ...@@ -965,13 +973,14 @@ void GL_APIENTRY ProgramUniformMatrix2x3fv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniformMatrix2x3fv>(program, location, count,
!ValidateProgramUniformMatrix2x3fv(context, program, location, count, transpose, value)) transpose, value);
if (context->skipValidation() ||
ValidateProgramUniformMatrix2x3fv(context, program, location, count, transpose, value))
{ {
return; context->programUniformMatrix2x3fv(program, location, count, transpose, value);
} }
context->programUniformMatrix2x3fv(program, location, count, transpose, value);
} }
} }
...@@ -989,13 +998,14 @@ void GL_APIENTRY ProgramUniformMatrix3x2fv(GLuint program, ...@@ -989,13 +998,14 @@ void GL_APIENTRY ProgramUniformMatrix3x2fv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniformMatrix3x2fv>(program, location, count,
!ValidateProgramUniformMatrix3x2fv(context, program, location, count, transpose, value)) transpose, value);
if (context->skipValidation() ||
ValidateProgramUniformMatrix3x2fv(context, program, location, count, transpose, value))
{ {
return; context->programUniformMatrix3x2fv(program, location, count, transpose, value);
} }
context->programUniformMatrix3x2fv(program, location, count, transpose, value);
} }
} }
...@@ -1013,13 +1023,14 @@ void GL_APIENTRY ProgramUniformMatrix2x4fv(GLuint program, ...@@ -1013,13 +1023,14 @@ void GL_APIENTRY ProgramUniformMatrix2x4fv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniformMatrix2x4fv>(program, location, count,
!ValidateProgramUniformMatrix2x4fv(context, program, location, count, transpose, value)) transpose, value);
if (context->skipValidation() ||
ValidateProgramUniformMatrix2x4fv(context, program, location, count, transpose, value))
{ {
return; context->programUniformMatrix2x4fv(program, location, count, transpose, value);
} }
context->programUniformMatrix2x4fv(program, location, count, transpose, value);
} }
} }
...@@ -1037,13 +1048,14 @@ void GL_APIENTRY ProgramUniformMatrix4x2fv(GLuint program, ...@@ -1037,13 +1048,14 @@ void GL_APIENTRY ProgramUniformMatrix4x2fv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniformMatrix4x2fv>(program, location, count,
!ValidateProgramUniformMatrix4x2fv(context, program, location, count, transpose, value)) transpose, value);
if (context->skipValidation() ||
ValidateProgramUniformMatrix4x2fv(context, program, location, count, transpose, value))
{ {
return; context->programUniformMatrix4x2fv(program, location, count, transpose, value);
} }
context->programUniformMatrix4x2fv(program, location, count, transpose, value);
} }
} }
...@@ -1061,13 +1073,14 @@ void GL_APIENTRY ProgramUniformMatrix3x4fv(GLuint program, ...@@ -1061,13 +1073,14 @@ void GL_APIENTRY ProgramUniformMatrix3x4fv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniformMatrix3x4fv>(program, location, count,
!ValidateProgramUniformMatrix3x4fv(context, program, location, count, transpose, value)) transpose, value);
if (context->skipValidation() ||
ValidateProgramUniformMatrix3x4fv(context, program, location, count, transpose, value))
{ {
return; context->programUniformMatrix3x4fv(program, location, count, transpose, value);
} }
context->programUniformMatrix3x4fv(program, location, count, transpose, value);
} }
} }
...@@ -1085,13 +1098,14 @@ void GL_APIENTRY ProgramUniformMatrix4x3fv(GLuint program, ...@@ -1085,13 +1098,14 @@ void GL_APIENTRY ProgramUniformMatrix4x3fv(GLuint program,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::ProgramUniformMatrix4x3fv>(program, location, count,
!ValidateProgramUniformMatrix4x3fv(context, program, location, count, transpose, value)) transpose, value);
if (context->skipValidation() ||
ValidateProgramUniformMatrix4x3fv(context, program, location, count, transpose, value))
{ {
return; context->programUniformMatrix4x3fv(program, location, count, transpose, value);
} }
context->programUniformMatrix4x3fv(program, location, count, transpose, value);
} }
} }
...@@ -1102,12 +1116,12 @@ void GL_APIENTRY ValidateProgramPipeline(GLuint pipeline) ...@@ -1102,12 +1116,12 @@ void GL_APIENTRY ValidateProgramPipeline(GLuint pipeline)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateValidateProgramPipeline(context, pipeline)) context->gatherParams<EntryPoint::ValidateProgramPipeline>(pipeline);
if (context->skipValidation() || ValidateValidateProgramPipeline(context, pipeline))
{ {
return; context->validateProgramPipeline(pipeline);
} }
context->validateProgramPipeline(pipeline);
} }
} }
...@@ -1124,13 +1138,14 @@ void GL_APIENTRY GetProgramPipelineInfoLog(GLuint pipeline, ...@@ -1124,13 +1138,14 @@ void GL_APIENTRY GetProgramPipelineInfoLog(GLuint pipeline,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetProgramPipelineInfoLog>(pipeline, bufSize, length,
!ValidateGetProgramPipelineInfoLog(context, pipeline, bufSize, length, infoLog)) infoLog);
if (context->skipValidation() ||
ValidateGetProgramPipelineInfoLog(context, pipeline, bufSize, length, infoLog))
{ {
return; context->getProgramPipelineInfoLog(pipeline, bufSize, length, infoLog);
} }
context->getProgramPipelineInfoLog(pipeline, bufSize, length, infoLog);
} }
} }
...@@ -1150,13 +1165,14 @@ void GL_APIENTRY BindImageTexture(GLuint unit, ...@@ -1150,13 +1165,14 @@ void GL_APIENTRY BindImageTexture(GLuint unit,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateBindImageTexture(context, unit, texture, level, context->gatherParams<EntryPoint::BindImageTexture>(unit, texture, level, layered, layer,
layered, layer, access, format)) access, format);
if (context->skipValidation() ||
ValidateBindImageTexture(context, unit, texture, level, layered, layer, access, format))
{ {
return; context->bindImageTexture(unit, texture, level, layered, layer, access, format);
} }
context->bindImageTexture(unit, texture, level, layered, layer, access, format);
} }
} }
...@@ -1168,12 +1184,12 @@ void GL_APIENTRY GetBooleani_v(GLenum target, GLuint index, GLboolean *data) ...@@ -1168,12 +1184,12 @@ void GL_APIENTRY GetBooleani_v(GLenum target, GLuint index, GLboolean *data)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateGetBooleani_v(context, target, index, data)) context->gatherParams<EntryPoint::GetBooleani_v>(target, index, data);
if (context->skipValidation() || ValidateGetBooleani_v(context, target, index, data))
{ {
return; context->getBooleani_v(target, index, data);
} }
context->getBooleani_v(target, index, data);
} }
} }
...@@ -1184,12 +1200,12 @@ void GL_APIENTRY MemoryBarrier(GLbitfield barriers) ...@@ -1184,12 +1200,12 @@ void GL_APIENTRY MemoryBarrier(GLbitfield barriers)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateMemoryBarrier(context, barriers)) context->gatherParams<EntryPoint::MemoryBarrier>(barriers);
if (context->skipValidation() || ValidateMemoryBarrier(context, barriers))
{ {
return; context->memoryBarrier(barriers);
} }
context->memoryBarrier(barriers);
} }
} }
...@@ -1200,12 +1216,12 @@ void GL_APIENTRY MemoryBarrierByRegion(GLbitfield barriers) ...@@ -1200,12 +1216,12 @@ void GL_APIENTRY MemoryBarrierByRegion(GLbitfield barriers)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateMemoryBarrierByRegion(context, barriers)) context->gatherParams<EntryPoint::MemoryBarrierByRegion>(barriers);
if (context->skipValidation() || ValidateMemoryBarrierByRegion(context, barriers))
{ {
return; context->memoryBarrierByRegion(barriers);
} }
context->memoryBarrierByRegion(barriers);
} }
} }
...@@ -1224,15 +1240,16 @@ void GL_APIENTRY TexStorage2DMultisample(GLenum target, ...@@ -1224,15 +1240,16 @@ void GL_APIENTRY TexStorage2DMultisample(GLenum target,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::TexStorage2DMultisample>(
!ValidateTexStorage2DMultisample(context, target, samples, internalformat, width, target, samples, internalformat, width, height, fixedsamplelocations);
height, fixedsamplelocations))
if (context->skipValidation() ||
ValidateTexStorage2DMultisample(context, target, samples, internalformat, width, height,
fixedsamplelocations))
{ {
return; context->texStorage2DMultisample(target, samples, internalformat, width, height,
fixedsamplelocations);
} }
context->texStorage2DMultisample(target, samples, internalformat, width, height,
fixedsamplelocations);
} }
} }
...@@ -1243,12 +1260,12 @@ void GL_APIENTRY GetMultisamplefv(GLenum pname, GLuint index, GLfloat *val) ...@@ -1243,12 +1260,12 @@ void GL_APIENTRY GetMultisamplefv(GLenum pname, GLuint index, GLfloat *val)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateGetMultisamplefv(context, pname, index, val)) context->gatherParams<EntryPoint::GetMultisamplefv>(pname, index, val);
if (context->skipValidation() || ValidateGetMultisamplefv(context, pname, index, val))
{ {
return; context->getMultisamplefv(pname, index, val);
} }
context->getMultisamplefv(pname, index, val);
} }
} }
...@@ -1259,12 +1276,12 @@ void GL_APIENTRY SampleMaski(GLuint maskNumber, GLbitfield mask) ...@@ -1259,12 +1276,12 @@ void GL_APIENTRY SampleMaski(GLuint maskNumber, GLbitfield mask)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateSampleMaski(context, maskNumber, mask)) context->gatherParams<EntryPoint::SampleMaski>(maskNumber, mask);
if (context->skipValidation() || ValidateSampleMaski(context, maskNumber, mask))
{ {
return; context->sampleMaski(maskNumber, mask);
} }
context->sampleMaski(maskNumber, mask);
} }
} }
...@@ -1276,13 +1293,13 @@ void GL_APIENTRY GetTexLevelParameteriv(GLenum target, GLint level, GLenum pname ...@@ -1276,13 +1293,13 @@ void GL_APIENTRY GetTexLevelParameteriv(GLenum target, GLint level, GLenum pname
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetTexLevelParameteriv>(target, level, pname, params);
!ValidateGetTexLevelParameteriv(context, target, level, pname, params))
if (context->skipValidation() ||
ValidateGetTexLevelParameteriv(context, target, level, pname, params))
{ {
return; context->getTexLevelParameteriv(target, level, pname, params);
} }
context->getTexLevelParameteriv(target, level, pname, params);
} }
} }
...@@ -1295,13 +1312,13 @@ void GL_APIENTRY GetTexLevelParameterfv(GLenum target, GLint level, GLenum pname ...@@ -1295,13 +1312,13 @@ void GL_APIENTRY GetTexLevelParameterfv(GLenum target, GLint level, GLenum pname
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::GetTexLevelParameterfv>(target, level, pname, params);
!ValidateGetTexLevelParameterfv(context, target, level, pname, params))
if (context->skipValidation() ||
ValidateGetTexLevelParameterfv(context, target, level, pname, params))
{ {
return; context->getTexLevelParameterfv(target, level, pname, params);
} }
context->getTexLevelParameterfv(target, level, pname, params);
} }
} }
...@@ -1317,13 +1334,13 @@ void GL_APIENTRY BindVertexBuffer(GLuint bindingindex, ...@@ -1317,13 +1334,13 @@ void GL_APIENTRY BindVertexBuffer(GLuint bindingindex,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::BindVertexBuffer>(bindingindex, buffer, offset, stride);
!ValidateBindVertexBuffer(context, bindingindex, buffer, offset, stride))
if (context->skipValidation() ||
ValidateBindVertexBuffer(context, bindingindex, buffer, offset, stride))
{ {
return; context->bindVertexBuffer(bindingindex, buffer, offset, stride);
} }
context->bindVertexBuffer(bindingindex, buffer, offset, stride);
} }
} }
...@@ -1341,14 +1358,15 @@ void GL_APIENTRY VertexAttribFormat(GLuint attribindex, ...@@ -1341,14 +1358,15 @@ void GL_APIENTRY VertexAttribFormat(GLuint attribindex,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::VertexAttribFormat>(attribindex, size, type, normalized,
!ValidateVertexAttribFormat(context, attribindex, size, type, normalized, relativeoffset);
relativeoffset))
if (context->skipValidation() ||
ValidateVertexAttribFormat(context, attribindex, size, type, normalized,
relativeoffset))
{ {
return; context->vertexAttribFormat(attribindex, size, type, normalized, relativeoffset);
} }
context->vertexAttribFormat(attribindex, size, type, normalized, relativeoffset);
} }
} }
...@@ -1365,13 +1383,14 @@ void GL_APIENTRY VertexAttribIFormat(GLuint attribindex, ...@@ -1365,13 +1383,14 @@ void GL_APIENTRY VertexAttribIFormat(GLuint attribindex,
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::VertexAttribIFormat>(attribindex, size, type,
!ValidateVertexAttribIFormat(context, attribindex, size, type, relativeoffset)) relativeoffset);
if (context->skipValidation() ||
ValidateVertexAttribIFormat(context, attribindex, size, type, relativeoffset))
{ {
return; context->vertexAttribIFormat(attribindex, size, type, relativeoffset);
} }
context->vertexAttribIFormat(attribindex, size, type, relativeoffset);
} }
} }
...@@ -1382,13 +1401,13 @@ void GL_APIENTRY VertexAttribBinding(GLuint attribindex, GLuint bindingindex) ...@@ -1382,13 +1401,13 @@ void GL_APIENTRY VertexAttribBinding(GLuint attribindex, GLuint bindingindex)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::VertexAttribBinding>(attribindex, bindingindex);
!ValidateVertexAttribBinding(context, attribindex, bindingindex))
if (context->skipValidation() ||
ValidateVertexAttribBinding(context, attribindex, bindingindex))
{ {
return; context->vertexAttribBinding(attribindex, bindingindex);
} }
context->vertexAttribBinding(attribindex, bindingindex);
} }
} }
...@@ -1399,13 +1418,13 @@ void GL_APIENTRY VertexBindingDivisor(GLuint bindingindex, GLuint divisor) ...@@ -1399,13 +1418,13 @@ void GL_APIENTRY VertexBindingDivisor(GLuint bindingindex, GLuint divisor)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && context->gatherParams<EntryPoint::VertexBindingDivisor>(bindingindex, divisor);
!ValidateVertexBindingDivisor(context, bindingindex, divisor))
if (context->skipValidation() ||
ValidateVertexBindingDivisor(context, bindingindex, divisor))
{ {
return; context->vertexBindingDivisor(bindingindex, divisor);
} }
context->vertexBindingDivisor(bindingindex, divisor);
} }
} }
} // 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