diff options
author | Zhigang Gong <zhigang.gong@linux.intel.com> | 2011-08-24 17:17:48 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2011-09-26 16:47:02 +0800 |
commit | d4f4d1272e1745752840eb7e8ec04eb155ac38d1 (patch) | |
tree | 9cb5ad512eecb1e7bb2dcb7ff345d965b8812d07 /glamor/glamor_egl.c | |
parent | 6cb4abca697c24bdc644502cce8a2ca9bbf131e3 (diff) |
glamor-egl: Fix direct call for glEGLImageTargetTexture2DOES.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'glamor/glamor_egl.c')
-rw-r--r-- | glamor/glamor_egl.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c index a92993b7a..7848c51ef 100644 --- a/glamor/glamor_egl.c +++ b/glamor/glamor_egl.c @@ -42,6 +42,7 @@ #if GLAMOR_GLES2 #include <GLES2/gl2.h> +#include <GLES2/gl2ext.h> #else #include <GL/gl.h> #endif @@ -80,7 +81,7 @@ struct glamor_screen_private { PFNEGLCREATEDRMIMAGEMESA egl_create_drm_image_mesa; PFNEGLEXPORTDRMIMAGEMESA egl_export_drm_image_mesa; PFNEGLCREATEIMAGEKHRPROC egl_create_image_khr; - + PFNGLEGLIMAGETARGETTEXTURE2DOESPROC egl_image_target_texture2d_oes; }; int xf86GlamorEGLPrivateIndex = -1; @@ -128,7 +129,8 @@ _glamor_create_egl_screen_image(ScrnInfoPtr scrn, int width, int height, int str glBindTexture(GL_TEXTURE_2D, texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, image); + + (glamor->egl_image_target_texture2d_oes)(GL_TEXTURE_2D, image); glamor_set_screen_pixmap_texture(screen, width, height, texture); glamor->root = image; @@ -247,8 +249,12 @@ Bool glamor_egl_init(ScreenPtr screen, int fd) glamor->egl_create_image_khr = (PFNEGLCREATEIMAGEKHRPROC) eglGetProcAddress("eglCreateImageKHR"); + glamor->egl_image_target_texture2d_oes = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) + eglGetProcAddress("glEGLImageTargetTexture2DOES"); + if (!glamor->egl_create_image_khr - || !glamor->egl_export_drm_image_mesa) { + || !glamor->egl_export_drm_image_mesa + || !glamor->egl_image_target_texture2d_oes) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "eglGetProcAddress() failed\n"); return FALSE; |