summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinhyung Jo <jinhyung.jo@samsung.com>2017-12-08 16:50:24 +0900
committerJinhyung Jo <jinhyung.jo@samsung.com>2017-12-08 16:50:27 +0900
commit06d9ec59b302ec045a5769e44e48d5b22bb8b548 (patch)
tree4ac6bf29c10979eaf48021d4d054f496ce688d1a
parentec14310c1b1b9bc7aa825d3d56f8239082592af4 (diff)
parenta3abe35c05262394e388edecc1045d3c2ebbabbe (diff)
downloadqemu-tizen_studio_2.0_p2.4.tar.gz
qemu-tizen_studio_2.0_p2.4.tar.bz2
qemu-tizen_studio_2.0_p2.4.zip
Merge branch 'tizen' into tizen_studio_2.0_p2.4tizen_studio_3.0_p2.4tizen_studio_2.0_p2.4
Change-Id: I18bf19d63cbe5bb88ed8b38c4d098f8f3dd8c06e Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
-rw-r--r--hw/yagl/yagl_apis/gles/yagl_host_gles_calls.c66
-rw-r--r--hw/yagl/yagl_drivers/gles_ogl/yagl_gles_ogl.c1
-rw-r--r--hw/yagl/yagl_gles_driver.h1
-rw-r--r--package/changelog3
-rw-r--r--package/pkginfo.manifest2
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 4cc0efb7d6..d48ff49144 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