coregl_fastpath: Bypass fast path handling for GLES API 1.x 85/86385/2
authorZhaowei Yuan <zhaowei.yuan@samsung.com>
Wed, 31 Aug 2016 15:05:25 +0000 (23:05 +0800)
committerGwan-gyeong Mun <kk.moon@samsung.com>
Fri, 2 Sep 2016 12:56:20 +0000 (05:56 -0700)
If current GLES API version is 1.x, fastpath_eglCreateImageKHR
should call eglCreateImageKHR directly without any fast path
handling

Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I21a7a24e444c156dff30931e9a888a787beafad8

src/modules/fastpath/coregl_fastpath_egl.c

index c8b9e5f..07a14ff 100644 (file)
@@ -1352,9 +1352,15 @@ fastpath_eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target,
 {
        void *ret = NULL;
        EGLContext real_ctx = EGL_NO_CONTEXT;
-       EGLClientBuffer real_obj;
+       EGLClientBuffer real_obj = NULL;
        GL_Object_Type type = 0;
 
+       if (current_gl_api_version == COREGL_GLAPI_1) {
+               ret = _orig_fastpath_eglCreateImageKHR(dpy, real_ctx, target, real_obj,
+                                                                                          attrib_list);
+               goto finish;
+       }
+
        if ((EGLint)buffer & GL_OBJECT_TYPE_TEXTURE)
                type = GL_OBJECT_TYPE_TEXTURE;
        else if ((EGLint)buffer & GL_OBJECT_TYPE_RENDERBUFFER)