From 999065996c9ecaf524257b3da320303c00a69dfc Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Thu, 1 Aug 2019 16:54:00 +0200 Subject: [PATCH] eolian: remove __builtin_free_cb This has long been unused. If we need to replace this eventually, it should be done correctly. --- src/bindings/luajit/eolian.lua | 6 +- src/lib/eolian/Eolian.h | 3 +- src/lib/eolian/database_type.c | 11 - src/lib/eolian/database_validate.c | 1 - src/lib/eolian/eo_lexer.h | 1 - src/modules/evas/engines/gl_common/evas_gl_api.c | 368 +++++++++++++++++++---- src/tests/eolian/data/typedef.eo | 2 - src/tests/eolian/data/typedef_ref.h | 4 - src/tests/eolian/data/typedef_ref_stub.h | 4 - src/tests/eolian/eolian_parsing.c | 2 - 10 files changed, 319 insertions(+), 83 deletions(-) diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index 085f614..55ae838 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -169,8 +169,7 @@ ffi.cdef [[ EOLIAN_TYPE_BUILTIN_STRINGSHARE, EOLIAN_TYPE_BUILTIN_STRBUF, - EOLIAN_TYPE_BUILTIN_VOID_PTR, - EOLIAN_TYPE_BUILTIN_FREE_CB + EOLIAN_TYPE_BUILTIN_VOID_PTR } Eolian_Type_Builtin_Type; typedef enum { @@ -973,8 +972,7 @@ M.type_builtin_type = { STRINGSHARE = 46, STRBUF = 47, - VOID_PTR = 48, - FREE_CB = 49 + VOID_PTR = 48 } M.typedecl_type = { diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index 4d74308..2c23da3 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -348,8 +348,7 @@ typedef enum EOLIAN_TYPE_BUILTIN_STRINGSHARE, EOLIAN_TYPE_BUILTIN_STRBUF, - EOLIAN_TYPE_BUILTIN_VOID_PTR, - EOLIAN_TYPE_BUILTIN_FREE_CB + EOLIAN_TYPE_BUILTIN_VOID_PTR } Eolian_Type_Builtin_Type; typedef enum diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c index 66d8a97..b0d1ac1 100644 --- a/src/lib/eolian/database_type.c +++ b/src/lib/eolian/database_type.c @@ -189,17 +189,6 @@ static void _atype_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf) { eina_strbuf_append(buf, "typedef "); - - if (tp->base_type->type == EOLIAN_TYPE_REGULAR) - { - if (!strcmp(tp->base_type->base.name, "__builtin_free_cb")) - { - eina_strbuf_append(buf, "void (*"); - eina_strbuf_append(buf, tp->base.c_name); - eina_strbuf_append(buf, ")(void *data)"); - return; - } - } database_type_to_str(tp->base_type, buf, tp->base.c_name, EOLIAN_C_TYPE_DEFAULT); } diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c index c594572..1ca8240 100644 --- a/src/lib/eolian/database_validate.c +++ b/src/lib/eolian/database_validate.c @@ -291,7 +291,6 @@ _validate_type(Validate_State *vals, Eolian_Type *tp) { case KW_void_ptr: case KW___undefined_type: - case KW___builtin_free_cb: if (vals->stable) { _eo_parser_log(&tp->base, diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h index e2ce990..c70b1c9 100644 --- a/src/lib/eolian/eo_lexer.h +++ b/src/lib/eolian/eo_lexer.h @@ -64,7 +64,6 @@ enum Tokens KW(mstring), KW(string), KW(stringshare), KW(strbuf), \ \ KW(void_ptr), \ - KW(__builtin_free_cb), \ KW(function), \ KW(__undefined_type), \ \ diff --git a/src/modules/evas/engines/gl_common/evas_gl_api.c b/src/modules/evas/engines/gl_common/evas_gl_api.c index 6c3a44a..249ddd8 100755 --- a/src/modules/evas/engines/gl_common/evas_gl_api.c +++ b/src/modules/evas/engines/gl_common/evas_gl_api.c @@ -865,58 +865,7 @@ _evgl_glFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLi } } - _gles3_api.glFramebufferTexture(target, attachment, texture, level); -} - -static void -_evgl_glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) -{ - EVGL_Resource *rsc; - EVGL_Context *ctx; - - if (!(rsc=_evgl_tls_resource_get())) - { - ERR("Unable to execute GL command. Error retrieving tls"); - return; - } - - if (!rsc->current_eng) - { - ERR("Unable to retrive Current Engine"); - return; - } - - ctx = rsc->current_ctx; - if (!ctx) - { - ERR("Unable to retrive Current Context"); - return; - } - - if (!_evgl_direct_enabled()) - { - if (ctx->version == EVAS_GL_GLES_3_X) - { - if (target == GL_DRAW_FRAMEBUFFER || target == GL_FRAMEBUFFER) - { - if (ctx->current_draw_fbo == 0) - { - SET_GL_ERROR(GL_INVALID_OPERATION); - return; - } - } - else if (target == GL_READ_FRAMEBUFFER) - { - if (ctx->current_read_fbo == 0) - { - SET_GL_ERROR(GL_INVALID_OPERATION); - return; - } - } - } - } - - _gles3_api.glFramebufferTextureLayer(target, attachment, texture, level, layer); + _gles3_api.glFramebufferTexture(target, attachment, texture, level); } @@ -3209,6 +3158,111 @@ _normal_gles3_api_get(Evas_GL_API *funcs, int minor_version) ORD(glVertexAttribIFormat); ORD(glVertexAttribBinding); ORD(glVertexBindingDivisor); + case 0: + ORD(glBeginQuery); + ORD(glBeginTransformFeedback); + ORD(glBindBufferBase); + ORD(glBindBufferRange); + ORD(glBindSampler); + ORD(glBindTransformFeedback); + ORD(glBindVertexArray); + ORD(glBlitFramebuffer); + ORD(glClearBufferfi); + ORD(glClearBufferfv); + ORD(glClearBufferiv); + ORD(glClearBufferuiv); + ORD(glClientWaitSync); + ORD(glCompressedTexImage3D); + ORD(glCompressedTexSubImage3D); + ORD(glCopyBufferSubData); + ORD(glCopyTexSubImage3D); + ORD(glDeleteQueries); + ORD(glDeleteSamplers); + ORD(glDeleteSync); + ORD(glDeleteTransformFeedbacks); + ORD(glDeleteVertexArrays); + ORD(glDrawArraysInstanced); + ORD(glDrawBuffers); + ORD(glDrawElementsInstanced); + ORD(glDrawRangeElements); + ORD(glEndQuery); + ORD(glEndTransformFeedback); + ORD(glFenceSync); + ORD(glFlushMappedBufferRange); + ORD(glFramebufferTextureLayer); + ORD(glGenQueries); + ORD(glGenSamplers); + ORD(glGenTransformFeedbacks); + ORD(glGenVertexArrays); + ORD(glGetActiveUniformBlockiv); + ORD(glGetActiveUniformBlockName); + ORD(glGetActiveUniformsiv); + ORD(glGetBufferParameteri64v); + ORD(glGetBufferPointerv); + ORD(glGetFragDataLocation); + ORD(glGetInteger64i_v); + ORD(glGetInteger64v); + ORD(glGetIntegeri_v); + ORD(glGetInternalformativ); + ORD(glGetProgramBinary); + ORD(glGetQueryiv); + ORD(glGetQueryObjectuiv); + ORD(glGetSamplerParameterfv); + ORD(glGetSamplerParameteriv); + ORD(glGetStringi); + ORD(glGetSynciv); + ORD(glGetTransformFeedbackVarying); + ORD(glGetUniformBlockIndex); + ORD(glGetUniformIndices); + ORD(glGetUniformuiv); + ORD(glGetVertexAttribIiv); + ORD(glGetVertexAttribIuiv); + ORD(glInvalidateFramebuffer); + ORD(glInvalidateSubFramebuffer); + ORD(glIsQuery); + ORD(glIsSampler); + ORD(glIsSync); + ORD(glIsTransformFeedback); + ORD(glIsVertexArray); + ORD(glMapBufferRange); + ORD(glPauseTransformFeedback); + ORD(glProgramBinary); + ORD(glProgramParameteri); + ORD(glReadBuffer); + ORD(glRenderbufferStorageMultisample); + ORD(glResumeTransformFeedback); + ORD(glSamplerParameterf); + ORD(glSamplerParameterfv); + ORD(glSamplerParameteri); + ORD(glSamplerParameteriv); + ORD(glTexImage3D); + ORD(glTexStorage2D); + ORD(glTexStorage3D); + ORD(glTexSubImage3D); + ORD(glTransformFeedbackVaryings); + ORD(glUniform1ui); + ORD(glUniform1uiv); + ORD(glUniform2ui); + ORD(glUniform2uiv); + ORD(glUniform3ui); + ORD(glUniform3uiv); + ORD(glUniform4ui); + ORD(glUniform4uiv); + ORD(glUniformBlockBinding); + ORD(glUniformMatrix2x3fv); + ORD(glUniformMatrix3x2fv); + ORD(glUniformMatrix2x4fv); + ORD(glUniformMatrix4x2fv); + ORD(glUniformMatrix3x4fv); + ORD(glUniformMatrix4x3fv); + ORD(glUnmapBuffer); + ORD(glVertexAttribDivisor); + ORD(glVertexAttribI4i); + ORD(glVertexAttribI4iv); + ORD(glVertexAttribI4ui); + ORD(glVertexAttribI4uiv); + ORD(glVertexAttribIPointer); + ORD(glWaitSync); } #undef ORD @@ -3591,6 +3645,111 @@ _debug_gles3_api_get(Evas_GL_API *funcs, int minor_version) ORD(glVertexAttribIFormat); ORD(glVertexAttribBinding); ORD(glVertexBindingDivisor); + case 0: + ORD(glBeginQuery); + ORD(glBeginTransformFeedback); + ORD(glBindBufferBase); + ORD(glBindBufferRange); + ORD(glBindSampler); + ORD(glBindTransformFeedback); + ORD(glBindVertexArray); + ORD(glBlitFramebuffer); + ORD(glClearBufferfi); + ORD(glClearBufferfv); + ORD(glClearBufferiv); + ORD(glClearBufferuiv); + ORD(glClientWaitSync); + ORD(glCompressedTexImage3D); + ORD(glCompressedTexSubImage3D); + ORD(glCopyBufferSubData); + ORD(glCopyTexSubImage3D); + ORD(glDeleteQueries); + ORD(glDeleteSamplers); + ORD(glDeleteSync); + ORD(glDeleteTransformFeedbacks); + ORD(glDeleteVertexArrays); + ORD(glDrawArraysInstanced); + ORD(glDrawBuffers); + ORD(glDrawElementsInstanced); + ORD(glDrawRangeElements); + ORD(glEndQuery); + ORD(glEndTransformFeedback); + ORD(glFenceSync); + ORD(glFlushMappedBufferRange); + ORD(glFramebufferTextureLayer); + ORD(glGenQueries); + ORD(glGenSamplers); + ORD(glGenTransformFeedbacks); + ORD(glGenVertexArrays); + ORD(glGetActiveUniformBlockiv); + ORD(glGetActiveUniformBlockName); + ORD(glGetActiveUniformsiv); + ORD(glGetBufferParameteri64v); + ORD(glGetBufferPointerv); + ORD(glGetFragDataLocation); + ORD(glGetInteger64i_v); + ORD(glGetInteger64v); + ORD(glGetIntegeri_v); + ORD(glGetInternalformativ); + ORD(glGetProgramBinary); + ORD(glGetQueryiv); + ORD(glGetQueryObjectuiv); + ORD(glGetSamplerParameterfv); + ORD(glGetSamplerParameteriv); + ORD(glGetStringi); + ORD(glGetSynciv); + ORD(glGetTransformFeedbackVarying); + ORD(glGetUniformBlockIndex); + ORD(glGetUniformIndices); + ORD(glGetUniformuiv); + ORD(glGetVertexAttribIiv); + ORD(glGetVertexAttribIuiv); + ORD(glInvalidateFramebuffer); + ORD(glInvalidateSubFramebuffer); + ORD(glIsQuery); + ORD(glIsSampler); + ORD(glIsSync); + ORD(glIsTransformFeedback); + ORD(glIsVertexArray); + ORD(glMapBufferRange); + ORD(glPauseTransformFeedback); + ORD(glProgramBinary); + ORD(glProgramParameteri); + ORD(glReadBuffer); + ORD(glRenderbufferStorageMultisample); + ORD(glResumeTransformFeedback); + ORD(glSamplerParameterf); + ORD(glSamplerParameterfv); + ORD(glSamplerParameteri); + ORD(glSamplerParameteriv); + ORD(glTexImage3D); + ORD(glTexStorage2D); + ORD(glTexStorage3D); + ORD(glTexSubImage3D); + ORD(glTransformFeedbackVaryings); + ORD(glUniform1ui); + ORD(glUniform1uiv); + ORD(glUniform2ui); + ORD(glUniform2uiv); + ORD(glUniform3ui); + ORD(glUniform3uiv); + ORD(glUniform4ui); + ORD(glUniform4uiv); + ORD(glUniformBlockBinding); + ORD(glUniformMatrix2x3fv); + ORD(glUniformMatrix3x2fv); + ORD(glUniformMatrix2x4fv); + ORD(glUniformMatrix4x2fv); + ORD(glUniformMatrix3x4fv); + ORD(glUniformMatrix4x3fv); + ORD(glUnmapBuffer); + ORD(glVertexAttribDivisor); + ORD(glVertexAttribI4i); + ORD(glVertexAttribI4iv); + ORD(glVertexAttribI4ui); + ORD(glVertexAttribI4uiv); + ORD(glVertexAttribIPointer); + ORD(glWaitSync); } #undef ORD @@ -3846,6 +4005,111 @@ _evgl_load_gles3_apis(void *dl_handle, Evas_GL_API *funcs, int minor_version, ORD(glVertexAttribIFormat); ORD(glVertexAttribBinding); ORD(glVertexBindingDivisor); + case 0: + ORD(glBeginQuery); + ORD(glBeginTransformFeedback); + ORD(glBindBufferBase); + ORD(glBindBufferRange); + ORD(glBindSampler); + ORD(glBindTransformFeedback); + ORD(glBindVertexArray); + ORD(glBlitFramebuffer); + ORD(glClearBufferfi); + ORD(glClearBufferfv); + ORD(glClearBufferiv); + ORD(glClearBufferuiv); + ORD(glClientWaitSync); + ORD(glCompressedTexImage3D); + ORD(glCompressedTexSubImage3D); + ORD(glCopyBufferSubData); + ORD(glCopyTexSubImage3D); + ORD(glDeleteQueries); + ORD(glDeleteSamplers); + ORD(glDeleteSync); + ORD(glDeleteTransformFeedbacks); + ORD(glDeleteVertexArrays); + ORD(glDrawArraysInstanced); + ORD(glDrawBuffers); + ORD(glDrawElementsInstanced); + ORD(glDrawRangeElements); + ORD(glEndQuery); + ORD(glEndTransformFeedback); + ORD(glFenceSync); + ORD(glFlushMappedBufferRange); + ORD(glFramebufferTextureLayer); + ORD(glGenQueries); + ORD(glGenSamplers); + ORD(glGenTransformFeedbacks); + ORD(glGenVertexArrays); + ORD(glGetActiveUniformBlockiv); + ORD(glGetActiveUniformBlockName); + ORD(glGetActiveUniformsiv); + ORD(glGetBufferParameteri64v); + ORD(glGetBufferPointerv); + ORD(glGetFragDataLocation); + ORD(glGetInteger64i_v); + ORD(glGetInteger64v); + ORD(glGetIntegeri_v); + ORD(glGetInternalformativ); + ORD(glGetProgramBinary); + ORD(glGetQueryiv); + ORD(glGetQueryObjectuiv); + ORD(glGetSamplerParameterfv); + ORD(glGetSamplerParameteriv); + ORD(glGetStringi); + ORD(glGetSynciv); + ORD(glGetTransformFeedbackVarying); + ORD(glGetUniformBlockIndex); + ORD(glGetUniformIndices); + ORD(glGetUniformuiv); + ORD(glGetVertexAttribIiv); + ORD(glGetVertexAttribIuiv); + ORD(glInvalidateFramebuffer); + ORD(glInvalidateSubFramebuffer); + ORD(glIsQuery); + ORD(glIsSampler); + ORD(glIsSync); + ORD(glIsTransformFeedback); + ORD(glIsVertexArray); + ORD(glMapBufferRange); + ORD(glPauseTransformFeedback); + ORD(glProgramBinary); + ORD(glProgramParameteri); + ORD(glReadBuffer); + ORD(glRenderbufferStorageMultisample); + ORD(glResumeTransformFeedback); + ORD(glSamplerParameterf); + ORD(glSamplerParameterfv); + ORD(glSamplerParameteri); + ORD(glSamplerParameteriv); + ORD(glTexImage3D); + ORD(glTexStorage2D); + ORD(glTexStorage3D); + ORD(glTexSubImage3D); + ORD(glTransformFeedbackVaryings); + ORD(glUniform1ui); + ORD(glUniform1uiv); + ORD(glUniform2ui); + ORD(glUniform2uiv); + ORD(glUniform3ui); + ORD(glUniform3uiv); + ORD(glUniform4ui); + ORD(glUniform4uiv); + ORD(glUniformBlockBinding); + ORD(glUniformMatrix2x3fv); + ORD(glUniformMatrix3x2fv); + ORD(glUniformMatrix2x4fv); + ORD(glUniformMatrix4x2fv); + ORD(glUniformMatrix3x4fv); + ORD(glUniformMatrix4x3fv); + ORD(glUnmapBuffer); + ORD(glVertexAttribDivisor); + ORD(glVertexAttribI4i); + ORD(glVertexAttribI4iv); + ORD(glVertexAttribI4ui); + ORD(glVertexAttribI4uiv); + ORD(glVertexAttribIPointer); + ORD(glWaitSync); } #undef ORD diff --git a/src/tests/eolian/data/typedef.eo b/src/tests/eolian/data/typedef.eo index ab4d991..2e01732 100644 --- a/src/tests/eolian/data/typedef.eo +++ b/src/tests/eolian/data/typedef.eo @@ -8,8 +8,6 @@ type @extern Evas.Pants: float; /* not generated */ type @beta Undef: __undefined_type; /* not generated */ -type @beta Free: __builtin_free_cb; /* specially generated */ - enum Enum.Bar { legacy: bar; diff --git a/src/tests/eolian/data/typedef_ref.h b/src/tests/eolian/data/typedef_ref.h index c03f18c..24583b5 100644 --- a/src/tests/eolian/data/typedef_ref.h +++ b/src/tests/eolian/data/typedef_ref.h @@ -19,10 +19,6 @@ typedef Evas_Coord Evas_Coord2; typedef Evas_Coord2 Evas_Coord3; -#ifdef EFL_BETA_API_SUPPORT -typedef void (*Free)(void *data); -#endif /* EFL_BETA_API_SUPPORT */ - typedef enum { BAR_FIRST_ITEM = 0, diff --git a/src/tests/eolian/data/typedef_ref_stub.h b/src/tests/eolian/data/typedef_ref_stub.h index 3bbb7d2..0f6f4ec 100644 --- a/src/tests/eolian/data/typedef_ref_stub.h +++ b/src/tests/eolian/data/typedef_ref_stub.h @@ -11,9 +11,5 @@ typedef Evas_Coord Evas_Coord2; typedef Evas_Coord2 Evas_Coord3; -#ifdef EFL_BETA_API_SUPPORT -typedef void (*Free)(void *data); -#endif /* EFL_BETA_API_SUPPORT */ - #endif diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c index f1294b7..7d680af 100644 --- a/src/tests/eolian/eolian_parsing.c +++ b/src/tests/eolian/eolian_parsing.c @@ -402,8 +402,6 @@ EFL_START_TEST(eolian_typedef) fail_if(!eina_iterator_next(iter, (void**)&tdl)); /* not generated undefined type, skip */ fail_if(!eina_iterator_next(iter, (void**)&tdl)); - /* free cb, tested by generation tests */ - fail_if(!eina_iterator_next(iter, (void**)&tdl)); fail_if(eina_iterator_next(iter, (void**)&tdl)); eolian_state_free(eos); -- 2.7.4