From 5ce7e1ced090a19d6be5492d630ab340e707655b Mon Sep 17 00:00:00 2001 From: Joogab Yun Date: Thu, 11 May 2017 10:43:22 +0900 Subject: [PATCH] Revert "[evas_gl_thread] change mode of glTexImage2D to finish for GLES1.1" This reverts commit 76cb3476759840ce6ee91c6028e0539fb46ab0d4. Change-Id: Iec7521cc4d65b9ae65968893bfc9034b3999ca53 --- .../evas_gl_thread_evgl_api_generated.c | 30 +++++++++++++++++++ .../gl_common/evas_gl_thread_evgl_generated.c | 30 +++++++++++++++++++ .../gl_common/evas_gl_thread_gl_generated.c | 30 +++++++++++++++++++ src/utils/evas/gl_api_def.txt | 6 ++-- 4 files changed, 93 insertions(+), 3 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_thread_evgl_api_generated.c b/src/modules/evas/engines/gl_common/evas_gl_thread_evgl_api_generated.c index 1830fd5c31..a113f9654e 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_thread_evgl_api_generated.c +++ b/src/modules/evas/engines/gl_common/evas_gl_thread_evgl_api_generated.c @@ -6001,6 +6001,8 @@ typedef struct GLenum format; GLenum type; const void* pixels; + int command_allocated; + GLTEXIMAGE2D_COPY_VARIABLE; /* TODO */ } EVGL_API_Thread_Command_glTexImage2D; @@ -6022,6 +6024,10 @@ _evgl_api_thread_glTexImage2D(void *data) thread_data->type, thread_data->pixels); + GLTEXIMAGE2D_COPY_VARIABLE_FREE; /* TODO */ + + if (thread_data->command_allocated) + eina_mempool_free(_mp_command, thread_data); } EAPI void @@ -6038,6 +6044,22 @@ glTexImage2D_evgl_api_thread_cmd(GLenum target, GLint level, GLint internalforma EVGL_API_Thread_Command_glTexImage2D thread_data_local; EVGL_API_Thread_Command_glTexImage2D *thread_data = &thread_data_local; + /* command_allocated flag init. */ + thread_data->command_allocated = 0; + + if (!evas_gl_thread_force_finish()) + { /* _flush */ + EVGL_API_Thread_Command_glTexImage2D *thread_data_new; + thread_data_new = eina_mempool_malloc(_mp_command, + sizeof(EVGL_API_Thread_Command_glTexImage2D)); + if (thread_data_new) + { + thread_data = thread_data_new; + thread_data->command_allocated = 1; + thread_mode = EVAS_GL_THREAD_MODE_FLUSH; + } + } + thread_data->target = target; thread_data->level = level; thread_data->internalformat = internalformat; @@ -6048,6 +6070,14 @@ glTexImage2D_evgl_api_thread_cmd(GLenum target, GLint level, GLint internalforma thread_data->type = type; thread_data->pixels = pixels; + GLTEXIMAGE2D_COPY_VARIABLE_INIT; /* TODO */ + + if (thread_mode == EVAS_GL_THREAD_MODE_FINISH) + goto finish; + + GLTEXIMAGE2D_COPY_TO_MEMPOOL; /* TODO */ + +finish: evas_gl_thread_cmd_enqueue(EVAS_GL_THREAD_TYPE_EVGL, _evgl_api_thread_glTexImage2D, thread_data, diff --git a/src/modules/evas/engines/gl_common/evas_gl_thread_evgl_generated.c b/src/modules/evas/engines/gl_common/evas_gl_thread_evgl_generated.c index 2c11f43bbe..c4cdeb3b80 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_thread_evgl_generated.c +++ b/src/modules/evas/engines/gl_common/evas_gl_thread_evgl_generated.c @@ -3911,6 +3911,8 @@ typedef struct GLenum format; GLenum type; const void *pixels; + int command_allocated; + GLTEXIMAGE2D_COPY_VARIABLE; /* TODO */ } EVGL_Thread_Command_glTexImage2D; @@ -3930,6 +3932,10 @@ _evgl_thread_glTexImage2D(void *data) thread_data->type, thread_data->pixels); + GLTEXIMAGE2D_COPY_VARIABLE_FREE; /* TODO */ + + if (thread_data->command_allocated) + eina_mempool_free(_mp_command, thread_data); } EAPI void @@ -3946,6 +3952,22 @@ glTexImage2D_evgl_thread_cmd(GLenum target, GLint level, GLint internalformat, G EVGL_Thread_Command_glTexImage2D thread_data_local; EVGL_Thread_Command_glTexImage2D *thread_data = &thread_data_local; + /* command_allocated flag init. */ + thread_data->command_allocated = 0; + + if (!evas_gl_thread_force_finish()) + { /* _flush */ + EVGL_Thread_Command_glTexImage2D *thread_data_new; + thread_data_new = eina_mempool_malloc(_mp_command, + sizeof(EVGL_Thread_Command_glTexImage2D)); + if (thread_data_new) + { + thread_data = thread_data_new; + thread_data->command_allocated = 1; + thread_mode = EVAS_GL_THREAD_MODE_FLUSH; + } + } + thread_data->target = target; thread_data->level = level; thread_data->internalformat = internalformat; @@ -3956,6 +3978,14 @@ glTexImage2D_evgl_thread_cmd(GLenum target, GLint level, GLint internalformat, G thread_data->type = type; thread_data->pixels = pixels; + GLTEXIMAGE2D_COPY_VARIABLE_INIT; /* TODO */ + + if (thread_mode == EVAS_GL_THREAD_MODE_FINISH) + goto finish; + + GLTEXIMAGE2D_COPY_TO_MEMPOOL; /* TODO */ + +finish: evas_gl_thread_cmd_enqueue(EVAS_GL_THREAD_TYPE_EVGL, _evgl_thread_glTexImage2D, thread_data, diff --git a/src/modules/evas/engines/gl_common/evas_gl_thread_gl_generated.c b/src/modules/evas/engines/gl_common/evas_gl_thread_gl_generated.c index de204bcfda..496e54fefa 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_thread_gl_generated.c +++ b/src/modules/evas/engines/gl_common/evas_gl_thread_gl_generated.c @@ -4157,6 +4157,8 @@ typedef struct GLenum format; GLenum type; const void *pixels; + int command_allocated; + GLTEXIMAGE2D_COPY_VARIABLE; /* TODO */ } Evas_Thread_Command_glTexImage2D; @@ -4176,6 +4178,10 @@ _gl_thread_glTexImage2D(void *data) thread_data->type, thread_data->pixels); + GLTEXIMAGE2D_COPY_VARIABLE_FREE; /* TODO */ + + if (thread_data->command_allocated) + eina_mempool_free(_mp_command, thread_data); } EAPI void @@ -4192,6 +4198,22 @@ glTexImage2D_thread_cmd(GLenum target, GLint level, GLint internalformat, GLsize Evas_Thread_Command_glTexImage2D thread_data_local; Evas_Thread_Command_glTexImage2D *thread_data = &thread_data_local; + /* command_allocated flag init. */ + thread_data->command_allocated = 0; + + if (!evas_gl_thread_force_finish()) + { /* _flush */ + Evas_Thread_Command_glTexImage2D *thread_data_new; + thread_data_new = eina_mempool_malloc(_mp_command, + sizeof(Evas_Thread_Command_glTexImage2D)); + if (thread_data_new) + { + thread_data = thread_data_new; + thread_data->command_allocated = 1; + thread_mode = EVAS_GL_THREAD_MODE_FLUSH; + } + } + thread_data->target = target; thread_data->level = level; thread_data->internalformat = internalformat; @@ -4202,6 +4224,14 @@ glTexImage2D_thread_cmd(GLenum target, GLint level, GLint internalformat, GLsize thread_data->type = type; thread_data->pixels = pixels; + GLTEXIMAGE2D_COPY_VARIABLE_INIT; /* TODO */ + + if (thread_mode == EVAS_GL_THREAD_MODE_FINISH) + goto finish; + + GLTEXIMAGE2D_COPY_TO_MEMPOOL; /* TODO */ + +finish: evas_gl_thread_cmd_enqueue(EVAS_GL_THREAD_TYPE_GL, _gl_thread_glTexImage2D, thread_data, diff --git a/src/utils/evas/gl_api_def.txt b/src/utils/evas/gl_api_def.txt index c6bbb2203d..d6f05489c6 100644 --- a/src/utils/evas/gl_api_def.txt +++ b/src/utils/evas/gl_api_def.txt @@ -114,7 +114,7 @@ # Texture Image Specification -| EVAS | void | glTexImage2D | GLenum target,GLint level,GLint internalformat,GLsizei width,GLsizei height,GLint border,GLenum format,GLenum type,const void *pixels | finish | noext | userDefined | | +| EVAS | void | glTexImage2D | GLenum target,GLint level,GLint internalformat,GLsizei width,GLsizei height,GLint border,GLenum format,GLenum type,const void *pixels | flush | noext | userDefined | | | EVAS | void | glTexSubImage2D | GLenum target,GLint level,GLint xoffset,GLint yoffset,GLsizei width,GLsizei height,GLenum format,GLenum type,const void *pixels | flush | noext | userDefined | | # Compressed Texture Images @@ -324,7 +324,7 @@ # Texture Image Specification -| EVAS GL | void | glTexImage2D | GLenum target,GLint level,GLint internalformat,GLsizei width,GLsizei height,GLint border,GLenum format,GLenum type,const void *pixels | finish | noext | userDefined | | +| EVAS GL | void | glTexImage2D | GLenum target,GLint level,GLint internalformat,GLsizei width,GLsizei height,GLint border,GLenum format,GLenum type,const void *pixels | flush | noext | userDefined | | | EVAS GL | void | glTexSubImage2D | GLenum target,GLint level,GLint xoffset,GLint yoffset,GLsizei width,GLsizei height,GLenum format,GLenum type,const void *pixels | flush | noext | userDefined | | # Compressed Texture Images @@ -527,7 +527,7 @@ | EVAS GL API | void | glStencilMaskSeparate | GLenum face, GLuint mask | finish | noext | | | | EVAS GL API | void | glStencilOp | GLenum fail, GLenum zfail, GLenum zpass | finish | noext | | | | EVAS GL API | void | glStencilOpSeparate | GLenum face, GLenum fail, GLenum zfail, GLenum zpass | finish | noext | | | -| EVAS GL API | void | glTexImage2D | GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels | finish | noext | userDefined | | +| EVAS GL API | void | glTexImage2D | GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels | flush | noext | userDefined | | | EVAS GL API | void | glTexParameterf | GLenum target, GLenum pname, GLfloat param | flush | noext | | | | EVAS GL API | void | glTexParameterfv | GLenum target, GLenum pname, const GLfloat* params | flush | noext | _mp_default, sizeof(GLfloat), params | | | EVAS GL API | void | glTexParameteri | GLenum target, GLenum pname, GLint param | flush | noext | | | -- 2.34.1