diff options
author | Jinhyung Jo <jinhyung.jo@samsung.com> | 2017-12-08 16:50:36 +0900 |
---|---|---|
committer | Jinhyung Jo <jinhyung.jo@samsung.com> | 2017-12-08 16:50:39 +0900 |
commit | edc0b4a9506ab053ffe7fba61aa4e97093ab3a9f (patch) | |
tree | b2bc4b796bff6ba3e2a5f941b5d5d66feefa35a6 | |
parent | 553088f3ef1dc34c2fcd7e1460451f9dcd73e4e2 (diff) | |
parent | a3abe35c05262394e388edecc1045d3c2ebbabbe (diff) | |
download | qemu-tizen_studio_3.0_p3.0.tar.gz qemu-tizen_studio_3.0_p3.0.tar.bz2 qemu-tizen_studio_3.0_p3.0.zip |
Merge branch 'tizen' into tizen_studio_2.0_p3.0tizen_studio_3.0_p3.0tizen_studio_2.0_p3.0
Change-Id: I0eac99c6f3fa006c53a4770099e691ebc38dda96
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
-rw-r--r-- | hw/yagl/yagl_apis/gles/yagl_host_gles_calls.c | 66 | ||||
-rw-r--r-- | hw/yagl/yagl_drivers/gles_ogl/yagl_gles_ogl.c | 1 | ||||
-rw-r--r-- | hw/yagl/yagl_gles_driver.h | 1 | ||||
-rw-r--r-- | package/changelog | 3 | ||||
-rw-r--r-- | package/pkginfo.manifest | 2 |
5 files changed, 72 insertions, 1 deletions
diff --git a/hw/yagl/yagl_apis/gles/yagl_host_gles_calls.c b/hw/yagl/yagl_apis/gles/yagl_host_gles_calls.c index af3efbd11d..66bd7a451f 100644 --- a/hw/yagl/yagl_apis/gles/yagl_host_gles_calls.c +++ b/hw/yagl/yagl_apis/gles/yagl_host_gles_calls.c @@ -1724,7 +1724,73 @@ void yagl_host_glDetachShader(GLuint program, void yagl_host_glCompileShader(GLuint shader) { +#ifndef CONFIG_DARWIN gles_api_ts->driver->CompileShader(yagl_gles_object_get(shader)); +#else + GLint tmp = 0; + + YAGL_LOG_FUNC_SET(glCompileShader); + + gles_api_ts->driver->CompileShader(yagl_gles_object_get(shader)); + + gles_api_ts->driver->GetShaderiv(yagl_gles_object_get(shader), GL_COMPILE_STATUS, &tmp); + if (tmp == GL_FALSE) { + char *buff; + char *substring; + const char textue2d_err[] = "undeclared identifier 'texture2D'"; + const char texture_lookup_define[] = "#define TextureLookup texture2D"; + + tmp = 0; + gles_api_ts->driver->GetShaderiv(yagl_gles_object_get(shader), GL_INFO_LOG_LENGTH, &tmp); + buff = g_malloc0(tmp); + gles_api_ts->driver->GetShaderInfoLog(yagl_gles_object_get(shader), tmp, NULL, buff); + if (gles_api_ts->driver->gl_version < yagl_gl_3_2 || + strstr(buff, textue2d_err) == NULL) { + YAGL_LOG_ERROR("Unable to compile shader %s", buff); + g_free(buff); + return; + } + YAGL_LOG_DEBUG("Unable to compile shader %s", buff); + g_free(buff); + + tmp = 0; + gles_api_ts->driver->GetShaderiv(yagl_gles_object_get(shader), GL_SHADER_SOURCE_LENGTH, &tmp); + buff = g_malloc0(tmp); + gles_api_ts->driver->GetShaderSource(yagl_gles_object_get(shader), tmp, NULL, buff); + YAGL_LOG_DEBUG("Shader Source: \n%s", buff); + + substring = strstr(buff, texture_lookup_define); + if (substring) { + const GLchar *strings[1]; + GLint lenghts[1]; + + /* texture2D -> texture\n\n */ + substring[strlen(texture_lookup_define) - 1] = '\n'; + substring[strlen(texture_lookup_define) - 2] = '\n'; + + strings[0] = buff; + lenghts[0] = tmp - 1; + + gles_api_ts->driver->ShaderSource(yagl_gles_object_get(shader), + 1, + strings, + lenghts); + gles_api_ts->driver->CompileShader(yagl_gles_object_get(shader)); + gles_api_ts->driver->GetShaderiv(yagl_gles_object_get(shader), GL_COMPILE_STATUS, &tmp); + if (!tmp) { + YAGL_LOG_ERROR("Unable to compile the patched shader source: \n%s", buff); + g_free(buff); + + tmp = 0; + gles_api_ts->driver->GetShaderiv(yagl_gles_object_get(shader), GL_INFO_LOG_LENGTH, &tmp); + buff = g_malloc0(tmp); + gles_api_ts->driver->GetShaderInfoLog(yagl_gles_object_get(shader), tmp, NULL, buff); + YAGL_LOG_ERROR("Cause of compilation failure: %s", buff); + } + } + g_free(buff); + } +#endif } void yagl_host_glBindAttribLocation(GLuint program, diff --git a/hw/yagl/yagl_drivers/gles_ogl/yagl_gles_ogl.c b/hw/yagl/yagl_drivers/gles_ogl/yagl_gles_ogl.c index 15cff43eac..70e255834a 100644 --- a/hw/yagl/yagl_drivers/gles_ogl/yagl_gles_ogl.c +++ b/hw/yagl/yagl_drivers/gles_ogl/yagl_gles_ogl.c @@ -117,6 +117,7 @@ struct yagl_gles_driver *yagl_gles_ogl_create(struct yagl_dyn_lib *dyn_lib, YAGL_GLES_OGL_GET_PROC(driver, GetProgramInfoLog, glGetProgramInfoLog); YAGL_GLES_OGL_GET_PROC(driver, GetShaderiv, glGetShaderiv); YAGL_GLES_OGL_GET_PROC(driver, GetShaderInfoLog, glGetShaderInfoLog); + YAGL_GLES_OGL_GET_PROC(driver, GetShaderSource, glGetShaderSource); YAGL_GLES_OGL_GET_PROC(driver, GetUniformfv, glGetUniformfv); YAGL_GLES_OGL_GET_PROC(driver, GetUniformiv, glGetUniformiv); YAGL_GLES_OGL_GET_PROC(driver, GetUniformLocation, glGetUniformLocation); diff --git a/hw/yagl/yagl_gles_driver.h b/hw/yagl/yagl_gles_driver.h index 22eafbd62c..6e64f7a441 100644 --- a/hw/yagl/yagl_gles_driver.h +++ b/hw/yagl/yagl_gles_driver.h @@ -183,6 +183,7 @@ struct yagl_gles_driver YAGL_GLES_DRIVER_FUNC4(GetProgramInfoLog, GLuint, GLsizei, GLsizei*, GLchar*, program, bufsize, length, infolog) YAGL_GLES_DRIVER_FUNC3(GetShaderiv, GLuint, GLenum, GLint*, shader, pname, params) YAGL_GLES_DRIVER_FUNC4(GetShaderInfoLog, GLuint, GLsizei, GLsizei*, GLchar*, shader, bufsize, length, infolog) + YAGL_GLES_DRIVER_FUNC4(GetShaderSource, GLuint, GLsizei, GLsizei*, GLchar*, shader, bufsize, length, source) YAGL_GLES_DRIVER_FUNC3(GetUniformfv, GLuint, GLint, GLfloat*, program, location, params) YAGL_GLES_DRIVER_FUNC3(GetUniformiv, GLuint, GLint, GLint*, program, location, params) YAGL_GLES_DRIVER_FUNC_RET2(int, GetUniformLocation, GLuint, const GLchar*, program, name) diff --git a/package/changelog b/package/changelog index 28ef6d8107..2e65d65032 100644 --- a/package/changelog +++ b/package/changelog @@ -1,3 +1,6 @@ +* 2.8.0.17 +- YaGL: hot fix web app broken issue on macOS. +== Jinhyung Jo <jinhyung.jo@samsung.com> 2017-12-08 * 2.8.0.16 - VIGS: Add support of hardware YUV420 conversion == Jinhyung Jo <jinhyung.jo@samsung.com> 2017-11-28 diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest index 04dee6bd64..909b7d2736 100644 --- a/package/pkginfo.manifest +++ b/package/pkginfo.manifest @@ -1,4 +1,4 @@ -Version: 2.8.0.16 +Version: 2.8.0.17 Maintainer: SeokYeon Hwang <syeon.hwang@samsung.com> Source: emulator |