CoreGL: Add support for OVR extensions 64/109064/3 tizen_3.0_tv accepted/tizen/3.0/common/20170119.105903 accepted/tizen/3.0/ivi/20170119.021025 accepted/tizen/3.0/mobile/20170119.020932 accepted/tizen/3.0/tv/20170119.020951 accepted/tizen/3.0/wearable/20170119.021008 accepted/tizen/common/20170119.171703 accepted/tizen/ivi/20170118.223552 accepted/tizen/mobile/20170118.223500 accepted/tizen/tv/20170118.223519 accepted/tizen/unified/20170309.034704 accepted/tizen/wearable/20170118.223534 submit/tizen/20170118.080808 submit/tizen_3.0/20170118.081015 submit/tizen_unified/20170308.100410
authorZhaowei Yuan <zhaowei.yuan@samsung.com>
Fri, 6 Jan 2017 17:51:04 +0000 (01:51 +0800)
committerGwan-gyeong Mun <kk.moon@samsung.com>
Wed, 11 Jan 2017 08:02:47 +0000 (00:02 -0800)
These OVR extensions include glFramebufferTextureMultiviewOVR,
and glFramebufferTextureMultisampleMultiviewOVR

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

src/headers/sym_gl2.h
src/modules/fastpath/coregl_fastpath.c
src/modules/fastpath/coregl_fastpath_gl.c
src/modules/tracepath/coregl_tracepath_gl.c

index c47029d..be1d79a 100644 (file)
@@ -886,6 +886,12 @@ _COREGL_EXT_SYMBOL(void, glCompressedTexSubImage3DOES, (GLenum target,
                                   GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize,
                                   const GLvoid *data))
 
+_COREGL_EXT_SYMBOL(void, glFramebufferTextureMultiviewOVR, (GLenum target, GLenum attachment,
+                   GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews))
+_COREGL_EXT_SYMBOL(void, glFramebufferTextureMultisampleMultiviewOVR, (GLenum target,
+                   GLenum attachment, GLuint texture, GLint level, GLsizei samples,
+                   GLint baseViewIndex, GLsizei numViews))
+
 /*
 _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_ANGLE_framebuffer_blit", 1.1, -1)
 _COREGL_EXT_SYMBOL(void, glBlitFramebufferANGLE, (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter))
index cab9955..d33c157 100644 (file)
@@ -549,6 +549,8 @@ fastpath_apply_overrides_gl(int enable)
                COREGL_OVERRIDE(fastpath_, glSamplerParameterIuivEXT);
                COREGL_OVERRIDE(fastpath_, glTexBufferRangeEXT);
                COREGL_OVERRIDE(fastpath_, glTexBufferEXT);
+               COREGL_OVERRIDE(fastpath_, glFramebufferTextureMultiviewOVR);
+               COREGL_OVERRIDE(fastpath_, glFramebufferTextureMultisampleMultiviewOVR);
                /* Start overriding GLES 3.0 */
                if (driver_gl_version >= COREGL_GLAPI_3) {
                        COREGL_OVERRIDE(fastpath_, glReadBuffer);
index 9c9f6c2..6a1ac02 100644 (file)
@@ -9096,3 +9096,52 @@ fastpath_glTexBufferEXT(GLenum target, GLenum internalformat, GLuint buffer)
 finish:
        _COREGL_FASTPATH_FUNC_END();
 }
+
+void
+fastpath_glFramebufferTextureMultiviewOVR(GLenum target, GLenum attachment, GLuint texture,
+                                                          GLint level, GLint baseViewIndex, GLsizei numViews)
+{
+       GLuint real_obj;
+
+       DEFINE_FASTPAH_GL_FUNC();
+       _COREGL_FASTPATH_FUNC_BEGIN();
+       INIT_FASTPATH_GL_FUNC();
+
+       if (GET_REAL_OBJ(GL_OBJECT_TYPE_TEXTURE, texture, &real_obj) != 1) {
+               _set_gl_error(GL_INVALID_VALUE);
+               goto finish;
+       }
+
+       _orig_fastpath_glFramebufferTextureMultiviewOVR(target, attachment, real_obj,
+                                                           level, baseViewIndex, numViews);
+
+       goto finish;
+
+finish:
+       _COREGL_FASTPATH_FUNC_END();
+}
+
+void
+fastpath_glFramebufferTextureMultisampleMultiviewOVR (GLenum target, GLenum attachment,
+                                                          GLuint texture, GLint level, GLsizei samples,
+                                                          GLint baseViewIndex, GLsizei numViews)
+{
+       GLuint real_obj;
+
+       DEFINE_FASTPAH_GL_FUNC();
+       _COREGL_FASTPATH_FUNC_BEGIN();
+       INIT_FASTPATH_GL_FUNC();
+
+       if (GET_REAL_OBJ(GL_OBJECT_TYPE_TEXTURE, texture, &real_obj) != 1) {
+               _set_gl_error(GL_INVALID_VALUE);
+               goto finish;
+       }
+
+       _orig_fastpath_glFramebufferTextureMultisampleMultiviewOVR(target, attachment, real_obj, level,
+                                                                      samples, baseViewIndex, numViews);
+
+       goto finish;
+
+finish:
+       _COREGL_FASTPATH_FUNC_END();
+}
index 10f5b2f..53ef4dd 100644 (file)
@@ -9173,3 +9173,30 @@ tracepath_glTexBufferEXT(GLenum target, GLenum internalformat, GLuint buffer)
 finish:
        _COREGL_TRACEPATH_FUNC_END();
 }
+
+void
+tracepath_glFramebufferTextureMultiviewOVR(GLenum target, GLenum attachment,
+                   GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews)
+{
+       _COREGL_TRACEPATH_FUNC_BEGIN();
+       _orig_tracepath_glFramebufferTextureMultiviewOVR(target, attachment, texture, level,
+                                                            baseViewIndex, numViews);
+       goto finish;
+
+finish:
+       _COREGL_TRACEPATH_FUNC_END();
+}
+
+void
+tracepath_glFramebufferTextureMultisampleMultiviewOVR(GLenum target,
+                   GLenum attachment, GLuint texture, GLint level, GLsizei samples,
+                   GLint baseViewIndex, GLsizei numViews)
+{
+       _COREGL_TRACEPATH_FUNC_BEGIN();
+       _orig_tracepath_glFramebufferTextureMultisampleMultiviewOVR(target, attachment, texture, level,
+                                                                       samples, baseViewIndex, numViews);
+       goto finish;
+
+finish:
+       _COREGL_TRACEPATH_FUNC_END();
+}