X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Ftests%2Fdispatch_sanity.cpp;h=32b082bcb28fdb6461ec527bb240f5b19ae9074e;hb=a29318bf0a0385fa4fdedbdc3fb6e1f6f0d87884;hp=bea6e964b410a1f648aab30f5e322bb9e8b881e2;hpb=ac8448dd9779478b570ef15f7232cfcf22f2d3db;p=mesa.git diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index bea6e964b41..32b082bcb28 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -41,7 +41,6 @@ #include -extern "C" { #include "GL/gl.h" #include "GL/glext.h" #include "main/compiler.h" @@ -62,7 +61,6 @@ extern "C" { #endif #include "main/dispatch.h" -} struct function { const char *name; @@ -84,6 +82,7 @@ public: struct dd_function_table driver_functions; struct gl_context share_list; struct gl_context ctx; + _glapi_proc *nop_table; }; void @@ -95,6 +94,9 @@ DispatchSanity_test::SetUp() memset(&ctx, 0, sizeof(ctx)); _mesa_init_driver_functions(&driver_functions); + + const unsigned size = _glapi_get_dispatch_table_size(); + nop_table = (_glapi_proc *) _glapi_new_nop_table(size); } void @@ -121,19 +123,20 @@ offset_to_proc_name_safe(unsigned offset) } /* Scan through the dispatch table and check that all the functions in - * _glapi_proc *table exist. When found, set their pointers in the table - * to _mesa_generic_nop. */ + * _glapi_proc *table exist. + */ static void -validate_functions(struct gl_context *ctx, const struct function *function_table) +validate_functions(struct gl_context *ctx, const struct function *function_table, + const _glapi_proc *nop_table) { _glapi_proc *table = (_glapi_proc *) ctx->Exec; for (unsigned i = 0; function_table[i].name != NULL; i++) { - /* The context version is >= the GL version where the - function was introduced. Therefore, the function cannot - be set to the nop function. + /* The context version is >= the GL version where the function was + * introduced. Therefore, the function cannot be set to the nop + * function. */ - bool cant_be_nop = ctx->Version >= function_table[i].Version; + const bool cant_be_nop = ctx->Version >= function_table[i].Version; const int offset = (function_table[i].offset != -1) ? function_table[i].offset @@ -145,25 +148,26 @@ validate_functions(struct gl_context *ctx, const struct function *function_table _glapi_get_proc_offset(function_table[i].name)) << "Function: " << function_table[i].name; if (cant_be_nop) { - EXPECT_NE((_glapi_proc) _mesa_generic_nop, table[offset]) + EXPECT_NE(nop_table[offset], table[offset]) << "Function: " << function_table[i].name << " at offset " << offset; } - table[offset] = (_glapi_proc) _mesa_generic_nop; + table[offset] = nop_table[offset]; } } /* Scan through the table and ensure that there is nothing except - * _mesa_generic_nop (as set by validate_functions(). */ + * nop functions (as set by validate_functions(). + */ static void -validate_nops(struct gl_context *ctx) +validate_nops(struct gl_context *ctx, const _glapi_proc *nop_table) { _glapi_proc *table = (_glapi_proc *) ctx->Exec; const unsigned size = _glapi_get_dispatch_table_size(); for (unsigned i = 0; i < size; i++) { - EXPECT_EQ((_glapi_proc) _mesa_generic_nop, table[i]) + EXPECT_EQ(nop_table[i], table[i]) << "i = " << i << " (" << offset_to_proc_name_safe(i) << ")"; } } @@ -171,30 +175,30 @@ validate_nops(struct gl_context *ctx) TEST_F(DispatchSanity_test, GL31_CORE) { SetUpCtx(API_OPENGL_CORE, 31); - validate_functions(&ctx, gl_core_functions_possible); - validate_nops(&ctx); + validate_functions(&ctx, gl_core_functions_possible, nop_table); + validate_nops(&ctx, nop_table); } TEST_F(DispatchSanity_test, GLES11) { SetUpCtx(API_OPENGLES, 11); - validate_functions(&ctx, gles11_functions_possible); - validate_nops(&ctx); + validate_functions(&ctx, gles11_functions_possible, nop_table); + validate_nops(&ctx, nop_table); } TEST_F(DispatchSanity_test, GLES2) { SetUpCtx(API_OPENGLES2, 20); - validate_functions(&ctx, gles2_functions_possible); - validate_nops(&ctx); + validate_functions(&ctx, gles2_functions_possible, nop_table); + validate_nops(&ctx, nop_table); } TEST_F(DispatchSanity_test, GLES3) { SetUpCtx(API_OPENGLES2, 30); - validate_functions(&ctx, gles2_functions_possible); - validate_functions(&ctx, gles3_functions_possible); - validate_nops(&ctx); + validate_functions(&ctx, gles2_functions_possible, nop_table); + validate_functions(&ctx, gles3_functions_possible, nop_table); + validate_nops(&ctx, nop_table); } const struct function gl_core_functions_possible[] = { @@ -542,11 +546,11 @@ const struct function gl_core_functions_possible[] = { { "glVertexAttribDivisor", 33, -1 }, /* GL 4.0 */ -// { "glMinSampleShading", 40, -1 }, // XXX: Add to xml -// { "glBlendEquationi", 40, -1 }, // XXX: Add to xml -// { "glBlendEquationSeparatei", 40, -1 }, // XXX: Add to xml -// { "glBlendFunci", 40, -1 }, // XXX: Add to xml -// { "glBlendFuncSeparatei", 40, -1 }, // XXX: Add to xml + { "glMinSampleShading", 40, -1 }, + { "glBlendEquationi", 40, -1 }, + { "glBlendEquationSeparatei", 40, -1 }, + { "glBlendFunci", 40, -1 }, + { "glBlendFuncSeparatei", 40, -1 }, /* GL 4.3 */ { "glIsRenderbuffer", 43, -1 }, @@ -603,7 +607,7 @@ const struct function gl_core_functions_possible[] = { { "glBlendEquationSeparateiARB", 43, -1 }, { "glBlendFunciARB", 43, -1 }, { "glBlendFuncSeparateiARB", 43, -1 }, -// { "glMinSampleShadingARB", 43, -1 }, // XXX: Add to xml + { "glMinSampleShadingARB", 43, -1 }, // XXX: Add to xml // { "glNamedStringARB", 43, -1 }, // XXX: Add to xml // { "glDeleteNamedStringARB", 43, -1 }, // XXX: Add to xml // { "glCompileShaderIncludeARB", 43, -1 }, // XXX: Add to xml @@ -667,26 +671,26 @@ const struct function gl_core_functions_possible[] = { { "glVertexAttribP3uiv", 43, -1 }, { "glVertexAttribP4ui", 43, -1 }, { "glVertexAttribP4uiv", 43, -1 }, -// { "glDrawArraysIndirect", 43, -1 }, // XXX: Add to xml -// { "glDrawElementsIndirect", 43, -1 }, // XXX: Add to xml -// { "glUniform1d", 43, -1 }, // XXX: Add to xml -// { "glUniform2d", 43, -1 }, // XXX: Add to xml -// { "glUniform3d", 43, -1 }, // XXX: Add to xml -// { "glUniform4d", 43, -1 }, // XXX: Add to xml -// { "glUniform1dv", 43, -1 }, // XXX: Add to xml -// { "glUniform2dv", 43, -1 }, // XXX: Add to xml -// { "glUniform3dv", 43, -1 }, // XXX: Add to xml -// { "glUniform4dv", 43, -1 }, // XXX: Add to xml -// { "glUniformMatrix2dv", 43, -1 }, // XXX: Add to xml -// { "glUniformMatrix3dv", 43, -1 }, // XXX: Add to xml -// { "glUniformMatrix4dv", 43, -1 }, // XXX: Add to xml -// { "glUniformMatrix2x3dv", 43, -1 }, // XXX: Add to xml -// { "glUniformMatrix2x4dv", 43, -1 }, // XXX: Add to xml -// { "glUniformMatrix3x2dv", 43, -1 }, // XXX: Add to xml -// { "glUniformMatrix3x4dv", 43, -1 }, // XXX: Add to xml -// { "glUniformMatrix4x2dv", 43, -1 }, // XXX: Add to xml -// { "glUniformMatrix4x3dv", 43, -1 }, // XXX: Add to xml -// { "glGetUniformdv", 43, -1 }, // XXX: Add to xml + { "glDrawArraysIndirect", 43, -1 }, + { "glDrawElementsIndirect", 43, -1 }, + { "glUniform1d", 40, -1 }, + { "glUniform2d", 40, -1 }, + { "glUniform3d", 40, -1 }, + { "glUniform4d", 40, -1 }, + { "glUniform1dv", 40, -1 }, + { "glUniform2dv", 40, -1 }, + { "glUniform3dv", 40, -1 }, + { "glUniform4dv", 40, -1 }, + { "glUniformMatrix2dv", 40, -1 }, + { "glUniformMatrix3dv", 40, -1 }, + { "glUniformMatrix4dv", 40, -1 }, + { "glUniformMatrix2x3dv", 40, -1 }, + { "glUniformMatrix2x4dv", 40, -1 }, + { "glUniformMatrix3x2dv", 40, -1 }, + { "glUniformMatrix3x4dv", 40, -1 }, + { "glUniformMatrix4x2dv", 40, -1 }, + { "glUniformMatrix4x3dv", 40, -1 }, + { "glGetUniformdv", 43, -1 }, // { "glGetSubroutineUniformLocation", 43, -1 }, // XXX: Add to xml // { "glGetSubroutineIndex", 43, -1 }, // XXX: Add to xml // { "glGetActiveSubroutineUniformiv", 43, -1 }, // XXX: Add to xml @@ -716,91 +720,87 @@ const struct function gl_core_functions_possible[] = { { "glGetProgramBinary", 43, -1 }, { "glProgramBinary", 43, -1 }, { "glProgramParameteri", 43, -1 }, -// { "glUseProgramStages", 43, -1 }, // XXX: Add to xml -// { "glActiveShaderProgram", 43, -1 }, // XXX: Add to xml -// { "glCreateShaderProgramv", 43, -1 }, // XXX: Add to xml -// { "glBindProgramPipeline", 43, -1 }, // XXX: Add to xml -// { "glDeleteProgramPipelines", 43, -1 }, // XXX: Add to xml -// { "glGenProgramPipelines", 43, -1 }, // XXX: Add to xml -// { "glIsProgramPipeline", 43, -1 }, // XXX: Add to xml -// { "glGetProgramPipelineiv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform1i", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform1iv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform1f", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform1fv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform1d", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform1dv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform1ui", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform1uiv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform2i", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform2iv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform2f", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform2fv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform2d", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform2dv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform2ui", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform2uiv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform3i", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform3iv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform3f", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform3fv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform3d", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform3dv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform3ui", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform3uiv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform4i", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform4iv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform4f", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform4fv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform4d", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform4dv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform4ui", 43, -1 }, // XXX: Add to xml -// { "glProgramUniform4uiv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniformMatrix2fv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniformMatrix3fv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniformMatrix4fv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniformMatrix2dv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniformMatrix3dv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniformMatrix4dv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniformMatrix2x3fv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniformMatrix3x2fv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniformMatrix2x4fv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniformMatrix4x2fv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniformMatrix3x4fv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniformMatrix4x3fv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniformMatrix2x3dv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniformMatrix3x2dv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniformMatrix2x4dv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniformMatrix4x2dv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniformMatrix3x4dv", 43, -1 }, // XXX: Add to xml -// { "glProgramUniformMatrix4x3dv", 43, -1 }, // XXX: Add to xml -// { "glValidateProgramPipeline", 43, -1 }, // XXX: Add to xml -// { "glGetProgramPipelineInfoLog", 43, -1 }, // XXX: Add to xml -// { "glVertexAttribL1d", 43, -1 }, // XXX: Add to xml -// { "glVertexAttribL2d", 43, -1 }, // XXX: Add to xml -// { "glVertexAttribL3d", 43, -1 }, // XXX: Add to xml -// { "glVertexAttribL4d", 43, -1 }, // XXX: Add to xml -// { "glVertexAttribL1dv", 43, -1 }, // XXX: Add to xml -// { "glVertexAttribL2dv", 43, -1 }, // XXX: Add to xml -// { "glVertexAttribL3dv", 43, -1 }, // XXX: Add to xml -// { "glVertexAttribL4dv", 43, -1 }, // XXX: Add to xml -// { "glVertexAttribLPointer", 43, -1 }, // XXX: Add to xml -// { "glGetVertexAttribLdv", 43, -1 }, // XXX: Add to xml -// { "glViewportArrayv", 43, -1 }, // XXX: Add to xml -// { "glViewportIndexedf", 43, -1 }, // XXX: Add to xml -// { "glViewportIndexedfv", 43, -1 }, // XXX: Add to xml -// { "glScissorArrayv", 43, -1 }, // XXX: Add to xml -// { "glScissorIndexed", 43, -1 }, // XXX: Add to xml -// { "glScissorIndexedv", 43, -1 }, // XXX: Add to xml -// { "glDepthRangeArrayv", 43, -1 }, // XXX: Add to xml -// { "glDepthRangeIndexed", 43, -1 }, // XXX: Add to xml -// { "glGetFloati_v", 43, -1 }, // XXX: Add to xml -// { "glGetDoublei_v", 43, -1 }, // XXX: Add to xml + { "glUseProgramStages", 43, -1 }, + { "glActiveShaderProgram", 43, -1 }, + { "glCreateShaderProgramv", 43, -1 }, + { "glBindProgramPipeline", 43, -1 }, + { "glDeleteProgramPipelines", 43, -1 }, + { "glGenProgramPipelines", 43, -1 }, + { "glIsProgramPipeline", 43, -1 }, + { "glGetProgramPipelineiv", 43, -1 }, + { "glProgramUniform1i", 43, -1 }, + { "glProgramUniform1iv", 43, -1 }, + { "glProgramUniform1f", 43, -1 }, + { "glProgramUniform1fv", 43, -1 }, + { "glProgramUniform1d", 40, -1 }, + { "glProgramUniform1dv", 40, -1 }, + { "glProgramUniform1ui", 43, -1 }, + { "glProgramUniform1uiv", 43, -1 }, + { "glProgramUniform2i", 43, -1 }, + { "glProgramUniform2iv", 43, -1 }, + { "glProgramUniform2f", 43, -1 }, + { "glProgramUniform2fv", 43, -1 }, + { "glProgramUniform2d", 40, -1 }, + { "glProgramUniform2dv", 40, -1 }, + { "glProgramUniform2ui", 43, -1 }, + { "glProgramUniform2uiv", 43, -1 }, + { "glProgramUniform3i", 43, -1 }, + { "glProgramUniform3iv", 43, -1 }, + { "glProgramUniform3f", 43, -1 }, + { "glProgramUniform3fv", 43, -1 }, + { "glProgramUniform3d", 40, -1 }, + { "glProgramUniform3dv", 40, -1 }, + { "glProgramUniform3ui", 43, -1 }, + { "glProgramUniform3uiv", 43, -1 }, + { "glProgramUniform4i", 43, -1 }, + { "glProgramUniform4iv", 43, -1 }, + { "glProgramUniform4f", 43, -1 }, + { "glProgramUniform4fv", 43, -1 }, + { "glProgramUniform4d", 40, -1 }, + { "glProgramUniform4dv", 40, -1 }, + { "glProgramUniform4ui", 43, -1 }, + { "glProgramUniform4uiv", 43, -1 }, + { "glProgramUniformMatrix2fv", 43, -1 }, + { "glProgramUniformMatrix3fv", 43, -1 }, + { "glProgramUniformMatrix4fv", 43, -1 }, + { "glProgramUniformMatrix2dv", 40, -1 }, + { "glProgramUniformMatrix3dv", 40, -1 }, + { "glProgramUniformMatrix4dv", 40, -1 }, + { "glProgramUniformMatrix2x3fv", 43, -1 }, + { "glProgramUniformMatrix3x2fv", 43, -1 }, + { "glProgramUniformMatrix2x4fv", 43, -1 }, + { "glProgramUniformMatrix4x2fv", 43, -1 }, + { "glProgramUniformMatrix3x4fv", 43, -1 }, + { "glProgramUniformMatrix4x3fv", 43, -1 }, + { "glProgramUniformMatrix2x3dv", 40, -1 }, + { "glProgramUniformMatrix3x2dv", 40, -1 }, + { "glProgramUniformMatrix2x4dv", 40, -1 }, + { "glProgramUniformMatrix4x2dv", 40, -1 }, + { "glProgramUniformMatrix3x4dv", 40, -1 }, + { "glProgramUniformMatrix4x3dv", 40, -1 }, + { "glValidateProgramPipeline", 43, -1 }, + { "glGetProgramPipelineInfoLog", 43, -1 }, + { "glVertexAttribL1d", 41, -1 }, + { "glVertexAttribL2d", 41, -1 }, + { "glVertexAttribL3d", 41, -1 }, + { "glVertexAttribL4d", 41, -1 }, + { "glVertexAttribL1dv", 41, -1 }, + { "glVertexAttribL2dv", 41, -1 }, + { "glVertexAttribL3dv", 41, -1 }, + { "glVertexAttribL4dv", 41, -1 }, + { "glVertexAttribLPointer", 41, -1 }, + { "glGetVertexAttribLdv", 41, -1 }, + { "glViewportArrayv", 43, -1 }, + { "glViewportIndexedf", 43, -1 }, + { "glViewportIndexedfv", 43, -1 }, + { "glScissorArrayv", 43, -1 }, + { "glScissorIndexed", 43, -1 }, + { "glScissorIndexedv", 43, -1 }, + { "glDepthRangeArrayv", 43, -1 }, + { "glDepthRangeIndexed", 43, -1 }, + { "glGetFloati_v", 43, -1 }, + { "glGetDoublei_v", 43, -1 }, // { "glCreateSyncFromCLeventARB", 43, -1 }, // XXX: Add to xml - { "glDebugMessageControlARB", 43, -1 }, - { "glDebugMessageInsertARB", 43, -1 }, - { "glDebugMessageCallbackARB", 43, -1 }, - { "glGetDebugMessageLogARB", 43, -1 }, { "glGetGraphicsResetStatusARB", 43, -1 }, { "glGetnMapdvARB", 43, -1 }, { "glGetnMapfvARB", 43, -1 }, @@ -827,39 +827,29 @@ const struct function gl_core_functions_possible[] = { { "glDrawTransformFeedbackInstanced", 43, -1 }, { "glDrawTransformFeedbackStreamInstanced", 43, -1 }, // { "glGetInternalformativ", 43, -1 }, // XXX: Add to xml -// { "glGetActiveAtomicCounterBufferiv", 43, -1 }, // XXX: Add to xml -// { "glBindImageTexture", 43, -1 }, // XXX: Add to xml -// { "glMemoryBarrier", 43, -1 }, // XXX: Add to xml + { "glGetActiveAtomicCounterBufferiv", 43, -1 }, + { "glBindImageTexture", 43, -1 }, + { "glMemoryBarrier", 43, -1 }, { "glTexStorage1D", 43, -1 }, { "glTexStorage2D", 43, -1 }, { "glTexStorage3D", 43, -1 }, { "glTextureStorage1DEXT", 43, -1 }, { "glTextureStorage2DEXT", 43, -1 }, { "glTextureStorage3DEXT", 43, -1 }, -// { "glDebugMessageControl", 43, -1 }, // XXX: Add to xml -// { "glDebugMessageInsert", 43, -1 }, // XXX: Add to xml -// { "glDebugMessageCallback", 43, -1 }, // XXX: Add to xml -// { "glGetDebugMessageLog", 43, -1 }, // XXX: Add to xml -// { "glPushDebugGroup", 43, -1 }, // XXX: Add to xml -// { "glPopDebugGroup", 43, -1 }, // XXX: Add to xml -// { "glObjectLabel", 43, -1 }, // XXX: Add to xml -// { "glGetObjectLabel", 43, -1 }, // XXX: Add to xml -// { "glObjectPtrLabel", 43, -1 }, // XXX: Add to xml -// { "glGetObjectPtrLabel", 43, -1 }, // XXX: Add to xml -// { "glClearBufferData", 43, -1 }, // XXX: Add to xml -// { "glClearBufferSubData", 43, -1 }, // XXX: Add to xml + { "glClearBufferData", 43, -1 }, + { "glClearBufferSubData", 43, -1 }, // { "glClearNamedBufferDataEXT", 43, -1 }, // XXX: Add to xml // { "glClearNamedBufferSubDataEXT", 43, -1 }, // XXX: Add to xml -// { "glDispatchCompute", 43, -1 }, // XXX: Add to xml -// { "glDispatchComputeIndirect", 43, -1 }, // XXX: Add to xml -// { "glCopyImageSubData", 43, -1 }, // XXX: Add to xml -// { "glTextureView", 43, -1 }, // XXX: Add to xml -// { "glBindVertexBuffer", 43, -1 }, // XXX: Add to xml -// { "glVertexAttribFormat", 43, -1 }, // XXX: Add to xml -// { "glVertexAttribIFormat", 43, -1 }, // XXX: Add to xml -// { "glVertexAttribLFormat", 43, -1 }, // XXX: Add to xml -// { "glVertexAttribBinding", 43, -1 }, // XXX: Add to xml -// { "glVertexBindingDivisor", 43, -1 }, // XXX: Add to xml + { "glDispatchCompute", 43, -1 }, + { "glDispatchComputeIndirect", 43, -1 }, + { "glCopyImageSubData", 43, -1 }, + { "glTextureView", 43, -1 }, + { "glBindVertexBuffer", 43, -1 }, + { "glVertexAttribFormat", 43, -1 }, + { "glVertexAttribIFormat", 43, -1 }, + { "glVertexAttribLFormat", 43, -1 }, + { "glVertexAttribBinding", 43, -1 }, + { "glVertexBindingDivisor", 43, -1 }, // { "glVertexArrayBindVertexBufferEXT", 43, -1 }, // XXX: Add to xml // { "glVertexArrayVertexAttribFormatEXT", 43, -1 }, // XXX: Add to xml // { "glVertexArrayVertexAttribIFormatEXT", 43, -1 }, // XXX: Add to xml @@ -877,14 +867,14 @@ const struct function gl_core_functions_possible[] = { { "glInvalidateBufferData", 43, -1 }, { "glInvalidateFramebuffer", 43, -1 }, { "glInvalidateSubFramebuffer", 43, -1 }, -// { "glMultiDrawArraysIndirect", 43, -1 }, // XXX: Add to xml -// { "glMultiDrawElementsIndirect", 43, -1 }, // XXX: Add to xml -// { "glGetProgramInterfaceiv", 43, -1 }, // XXX: Add to xml -// { "glGetProgramResourceIndex", 43, -1 }, // XXX: Add to xml -// { "glGetProgramResourceName", 43, -1 }, // XXX: Add to xml -// { "glGetProgramResourceiv", 43, -1 }, // XXX: Add to xml -// { "glGetProgramResourceLocation", 43, -1 }, // XXX: Add to xml -// { "glGetProgramResourceLocationIndex", 43, -1 }, // XXX: Add to xml + { "glMultiDrawArraysIndirect", 43, -1 }, + { "glMultiDrawElementsIndirect", 43, -1 }, + { "glGetProgramInterfaceiv", 43, -1 }, + { "glGetProgramResourceIndex", 43, -1 }, + { "glGetProgramResourceName", 43, -1 }, + { "glGetProgramResourceiv", 43, -1 }, + { "glGetProgramResourceLocation", 43, -1 }, + { "glGetProgramResourceLocationIndex", 43, -1 }, // { "glShaderStorageBlockBinding", 43, -1 }, // XXX: Add to xml { "glTexBufferRange", 43, -1 }, // { "glTextureBufferRangeEXT", 43, -1 }, // XXX: Add to xml @@ -896,7 +886,15 @@ const struct function gl_core_functions_possible[] = { /* GL_ARB_internalformat_query */ { "glGetInternalformativ", 30, -1 }, - /* GL_KHR_debug */ + /* GL_ARB_multi_bind */ + { "glBindBuffersBase", 44, -1 }, + { "glBindBuffersRange", 44, -1 }, + { "glBindTextures", 44, -1 }, + { "glBindSamplers", 44, -1 }, + { "glBindImageTextures", 44, -1 }, + { "glBindVertexBuffers", 44, -1 }, + + /* GL_KHR_debug/GL_ARB_debug_output */ { "glPushDebugGroup", 11, -1 }, { "glPopDebugGroup", 11, -1 }, { "glDebugMessageCallback", 11, -1 }, @@ -907,6 +905,144 @@ const struct function gl_core_functions_possible[] = { { "glGetObjectPtrLabel", 11, -1 }, { "glObjectLabel", 11, -1 }, { "glObjectPtrLabel", 11, -1 }, + /* aliased versions checked above */ + //{ "glDebugMessageControlARB", 11, -1 }, + //{ "glDebugMessageInsertARB", 11, -1 }, + //{ "glDebugMessageCallbackARB", 11, -1 }, + //{ "glGetDebugMessageLogARB", 11, -1 }, + + /* GL_AMD_performance_monitor */ + { "glGetPerfMonitorGroupsAMD", 11, -1 }, + { "glGetPerfMonitorCountersAMD", 11, -1 }, + { "glGetPerfMonitorGroupStringAMD", 11, -1 }, + { "glGetPerfMonitorCounterStringAMD", 11, -1 }, + { "glGetPerfMonitorCounterInfoAMD", 11, -1 }, + { "glGenPerfMonitorsAMD", 11, -1 }, + { "glDeletePerfMonitorsAMD", 11, -1 }, + { "glSelectPerfMonitorCountersAMD", 11, -1 }, + { "glBeginPerfMonitorAMD", 11, -1 }, + { "glEndPerfMonitorAMD", 11, -1 }, + { "glGetPerfMonitorCounterDataAMD", 11, -1 }, + + /* GL_INTEL_performance_query */ + { "glGetFirstPerfQueryIdINTEL", 30, -1 }, + { "glGetNextPerfQueryIdINTEL", 30, -1 }, + { "glGetPerfQueryIdByNameINTEL", 30, -1 }, + { "glGetPerfQueryInfoINTEL", 30, -1 }, + { "glGetPerfCounterInfoINTEL", 30, -1 }, + { "glCreatePerfQueryINTEL", 30, -1 }, + { "glDeletePerfQueryINTEL", 30, -1 }, + { "glBeginPerfQueryINTEL", 30, -1 }, + { "glEndPerfQueryINTEL", 30, -1 }, + { "glGetPerfQueryDataINTEL", 30, -1 }, + + /* GL_NV_vdpau_interop */ + { "glVDPAUInitNV", 11, -1 }, + { "glVDPAUFiniNV", 11, -1 }, + { "glVDPAURegisterVideoSurfaceNV", 11, -1 }, + { "glVDPAURegisterOutputSurfaceNV", 11, -1 }, + { "glVDPAUIsSurfaceNV", 11, -1 }, + { "glVDPAUUnregisterSurfaceNV", 11, -1 }, + { "glVDPAUGetSurfaceivNV", 11, -1 }, + { "glVDPAUSurfaceAccessNV", 11, -1 }, + { "glVDPAUMapSurfacesNV", 11, -1 }, + { "glVDPAUUnmapSurfacesNV", 11, -1 }, + + /* GL_ARB_buffer_storage */ + { "glBufferStorage", 43, -1 }, + + /* GL_ARB_clear_texture */ + { "glClearTexImage", 13, -1 }, + { "glClearTexSubImage", 13, -1 }, + + /* GL_ARB_clip_control */ + { "glClipControl", 45, -1 }, + + /* GL_ARB_direct_state_access */ + { "glCreateTransformFeedbacks", 45, -1 }, + { "glTransformFeedbackBufferBase", 45, -1 }, + { "glTransformFeedbackBufferRange", 45, -1 }, + { "glGetTransformFeedbackiv", 45, -1 }, + { "glGetTransformFeedbacki_v", 45, -1 }, + { "glGetTransformFeedbacki64_v", 45, -1 }, + { "glCreateBuffers", 45, -1 }, + { "glNamedBufferStorage", 45, -1 }, + { "glNamedBufferData", 45, -1 }, + { "glNamedBufferSubData", 45, -1 }, + { "glCopyNamedBufferSubData", 45, -1 }, + { "glClearNamedBufferData", 45, -1 }, + { "glClearNamedBufferSubData", 45, -1 }, + { "glMapNamedBuffer", 45, -1 }, + { "glMapNamedBufferRange", 45, -1 }, + { "glUnmapNamedBuffer", 45, -1 }, + { "glFlushMappedNamedBufferRange", 45, -1 }, + { "glGetNamedBufferParameteriv", 45, -1 }, + { "glGetNamedBufferParameteri64v", 45, -1 }, + { "glGetNamedBufferPointerv", 45, -1 }, + { "glGetNamedBufferSubData", 45, -1 }, + { "glCreateFramebuffers", 45, -1 }, + { "glNamedFramebufferRenderbuffer", 45, -1 }, + { "glCreateRenderbuffers", 45, -1 }, + { "glNamedRenderbufferStorage", 45, -1 }, + { "glNamedRenderbufferStorageMultisample", 45, -1 }, + { "glGetNamedRenderbufferParameteriv", 45, -1 }, + { "glCreateTextures", 45, -1 }, + { "glTextureStorage1D", 45, -1 }, + { "glTextureStorage2D", 45, -1 }, + { "glTextureStorage3D", 45, -1 }, + { "glTextureSubImage1D", 45, -1 }, + { "glTextureSubImage2D", 45, -1 }, + { "glTextureSubImage3D", 45, -1 }, + { "glBindTextureUnit", 45, -1 }, + { "glTextureParameterf", 45, -1 }, + { "glTextureParameterfv", 45, -1 }, + { "glTextureParameteri", 45, -1 }, + { "glTextureParameterIiv", 45, -1 }, + { "glTextureParameterIuiv", 45, -1 }, + { "glTextureParameteriv", 45, -1 }, + { "glGetTextureLevelParameterfv", 45, -1 }, + { "glGetTextureLevelParameteriv", 45, -1 }, + { "glGetTextureParameterfv", 45, -1 }, + { "glGetTextureParameterIiv", 45, -1 }, + { "glGetTextureParameterIuiv", 45, -1 }, + { "glGetTextureParameteriv", 45, -1 }, + { "glCopyTextureSubImage1D", 45, -1 }, + { "glCopyTextureSubImage2D", 45, -1 }, + { "glCopyTextureSubImage3D", 45, -1 }, + { "glGetTextureImage", 45, -1 }, + { "glGetCompressedTextureImage", 45, -1 }, + { "glCompressedTextureSubImage1D", 45, -1 }, + { "glCompressedTextureSubImage2D", 45, -1 }, + { "glCompressedTextureSubImage3D", 45, -1 }, + { "glGenerateTextureMipmap", 45, -1 }, + { "glTextureStorage2DMultisample", 45, -1 }, + { "glTextureStorage3DMultisample", 45, -1 }, + { "glTextureBuffer", 45, -1 }, + { "glTextureBufferRange", 45, -1 }, + { "glCreateVertexArrays", 45, -1 }, + { "glDisableVertexArrayAttrib", 45, -1 }, + { "glEnableVertexArrayAttrib", 45, -1 }, + { "glVertexArrayElementBuffer", 45, -1 }, + { "glVertexArrayVertexBuffer", 45, -1 }, + { "glVertexArrayVertexBuffers", 45, -1 }, + { "glVertexArrayAttribFormat", 45, -1 }, + { "glVertexArrayAttribIFormat", 45, -1 }, + { "glVertexArrayAttribLFormat", 45, -1 }, + { "glVertexArrayAttribBinding", 45, -1 }, + { "glVertexArrayBindingDivisor", 45, -1 }, + { "glGetVertexArrayiv", 45, -1 }, + { "glGetVertexArrayIndexediv", 45, -1 }, + { "glGetVertexArrayIndexed64iv", 45, -1 }, + { "glCreateSamplers", 45, -1 }, + { "glCreateProgramPipelines", 45, -1 }, + { "glCreateQueries", 45, -1 }, + { "glGetQueryBufferObjectiv", 45, -1 }, + { "glGetQueryBufferObjectuiv", 45, -1 }, + { "glGetQueryBufferObjecti64v", 45, -1 }, + { "glGetQueryBufferObjectui64v", 45, -1 }, + + /* GL_EXT_polygon_offset_clamp */ + { "glPolygonOffsetClampEXT", 11, -1 }, { NULL, 0, -1 } }; @@ -1276,6 +1412,56 @@ const struct function gles2_functions_possible[] = { { "glGetProgramBinaryOES", 20, -1 }, { "glProgramBinaryOES", 20, -1 }, + /* GL_EXT_separate_shader_objects - Also part of OpenGL ES 3.1. */ + { "glProgramParameteriEXT", 20, -1 }, + { "glUseProgramStagesEXT", 20, -1 }, + { "glActiveShaderProgramEXT", 20, -1 }, + { "glCreateShaderProgramvEXT", 20, -1 }, + { "glBindProgramPipelineEXT", 20, -1 }, + { "glDeleteProgramPipelinesEXT", 20, -1 }, + { "glGenProgramPipelinesEXT", 20, -1 }, + { "glIsProgramPipelineEXT", 20, -1 }, + { "glGetProgramPipelineivEXT", 20, -1 }, + { "glProgramUniform1iEXT", 20, -1 }, + { "glProgramUniform1ivEXT", 20, -1 }, + { "glProgramUniform1fEXT", 20, -1 }, + { "glProgramUniform1fvEXT", 20, -1 }, + { "glProgramUniform2iEXT", 20, -1 }, + { "glProgramUniform2ivEXT", 20, -1 }, + { "glProgramUniform2fEXT", 20, -1 }, + { "glProgramUniform2fvEXT", 20, -1 }, + { "glProgramUniform3iEXT", 20, -1 }, + { "glProgramUniform3ivEXT", 20, -1 }, + { "glProgramUniform3fEXT", 20, -1 }, + { "glProgramUniform3fvEXT", 20, -1 }, + { "glProgramUniform4iEXT", 20, -1 }, + { "glProgramUniform4ivEXT", 20, -1 }, + { "glProgramUniform4fEXT", 20, -1 }, + { "glProgramUniform4fvEXT", 20, -1 }, + { "glProgramUniformMatrix2fvEXT", 20, -1 }, + { "glProgramUniformMatrix3fvEXT", 20, -1 }, + { "glProgramUniformMatrix4fvEXT", 20, -1 }, + { "glProgramUniformMatrix2x3fvEXT", 20, -1 }, + { "glProgramUniformMatrix3x2fvEXT", 20, -1 }, + { "glProgramUniformMatrix2x4fvEXT", 20, -1 }, + { "glProgramUniformMatrix4x2fvEXT", 20, -1 }, + { "glProgramUniformMatrix3x4fvEXT", 20, -1 }, + { "glProgramUniformMatrix4x3fvEXT", 20, -1 }, + { "glValidateProgramPipelineEXT", 20, -1 }, + { "glGetProgramPipelineInfoLogEXT", 20, -1 }, + + /* GL_INTEL_performance_query */ + { "glGetFirstPerfQueryIdINTEL", 20, -1 }, + { "glGetNextPerfQueryIdINTEL", 20, -1 }, + { "glGetPerfQueryIdByNameINTEL", 20, -1 }, + { "glGetPerfQueryInfoINTEL", 20, -1 }, + { "glGetPerfCounterInfoINTEL", 20, -1 }, + { "glCreatePerfQueryINTEL", 20, -1 }, + { "glDeletePerfQueryINTEL", 20, -1 }, + { "glBeginPerfQueryINTEL", 20, -1 }, + { "glEndPerfQueryINTEL", 20, -1 }, + { "glGetPerfQueryDataINTEL", 20, -1 }, + { NULL, 0, -1 } }; @@ -1359,7 +1545,7 @@ const struct function gles3_functions_possible[] = { // { "glMapBufferRange", 30, -1 }, { "glPauseTransformFeedback", 30, -1 }, // glProgramBinary aliases glProgramBinaryOES in GLES 2 - { "glProgramParameteri", 30, -1 }, + // glProgramParameteri aliases glProgramParameteriEXT in GLES 2 // We check for the aliased -NV version in GLES 2 // { "glReadBuffer", 30, -1 }, { "glRenderbufferStorageMultisample", 30, -1 }, @@ -1399,5 +1585,16 @@ const struct function gles3_functions_possible[] = { { "glVertexAttribI4uiv", 30, -1 }, { "glVertexAttribIPointer", 30, -1 }, { "glWaitSync", 30, -1 }, + + /* GL_EXT_separate_shader_objects - Also part of OpenGL ES 3.1. */ + { "glProgramUniform1uiEXT", 30, -1 }, + { "glProgramUniform1uivEXT", 30, -1 }, + { "glProgramUniform2uiEXT", 30, -1 }, + { "glProgramUniform2uivEXT", 30, -1 }, + { "glProgramUniform3uiEXT", 30, -1 }, + { "glProgramUniform3uivEXT", 30, -1 }, + { "glProgramUniform4uiEXT", 30, -1 }, + { "glProgramUniform4uivEXT", 30, -1 }, + { NULL, 0, -1 } };