From 778f92e170477968cabac3d69f320e3cae47e27f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 9 Dec 2016 11:08:57 +0800 Subject: [PATCH] egl: Use correct proc to meta_egl_stream_consumer_aquire_attrib It should be eglStreamConsumerAcquireAttribNV and not eglStreamConsumerAcquireAttribEXT as the EXT variant is not defined in any extension. https://bugzilla.gnome.org/show_bug.cgi?id=773629 --- src/backends/meta-egl-ext.h | 16 ++++++++++++++++ src/backends/meta-egl.c | 10 ++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/backends/meta-egl-ext.h b/src/backends/meta-egl-ext.h index 78fd9a2e7..29e13e3d8 100644 --- a/src/backends/meta-egl-ext.h +++ b/src/backends/meta-egl-ext.h @@ -77,4 +77,20 @@ EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireAttribEXT (EGLDisplay dpy, #define EGL_DRM_FLIP_EVENT_DATA_NV 0x333E #endif /* EGL_NV_output_drm_flip_event */ +#ifndef EGL_NV_stream_attrib +#define EGL_NV_stream_attrib 1 +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamAttribNV(EGLDisplay dpy, const EGLAttrib *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglSetStreamAttribNV(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib value); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamAttribNV(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib *value); +EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireAttribNV(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseAttribNV(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); +#endif +typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMATTRIBNVPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSTREAMATTRIBNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib value); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMATTRIBNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib *value); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREATTRIBNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEATTRIBNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); +#endif /* EGL_NV_stream_attrib */ + #endif /* META_EGL_EXT_H */ diff --git a/src/backends/meta-egl.c b/src/backends/meta-egl.c index b1e8b663b..ffd13df31 100644 --- a/src/backends/meta-egl.c +++ b/src/backends/meta-egl.c @@ -60,11 +60,10 @@ struct _MetaEgl PFNEGLSTREAMCONSUMEROUTPUTEXTPROC eglStreamConsumerOutputEXT; - PFNEGLSTREAMCONSUMERACQUIREATTRIBEXTPROC eglStreamConsumerAcquireAttribEXT; - PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC eglStreamConsumerGLTextureExternalKHR; PFNEGLSTREAMCONSUMERACQUIREKHRPROC eglStreamConsumerAcquireKHR; + PFNEGLSTREAMCONSUMERACQUIREATTRIBNVPROC eglStreamConsumerAcquireAttribNV; PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC eglCreateStreamFromFileDescriptorKHR; }; @@ -629,10 +628,10 @@ meta_egl_stream_consumer_acquire_attrib (MetaEgl *egl, EGLAttrib *attrib_list, GError **error) { - if (!is_egl_proc_valid (egl->eglStreamConsumerAcquireAttribEXT, error)) + if (!is_egl_proc_valid (egl->eglStreamConsumerAcquireAttribNV, error)) return FALSE; - if (!egl->eglStreamConsumerAcquireAttribEXT (display, stream, attrib_list)) + if (!egl->eglStreamConsumerAcquireAttribNV (display, stream, attrib_list)) { set_egl_error (error); return FALSE; @@ -734,11 +733,10 @@ meta_egl_constructed (GObject *object) GET_EGL_PROC_ADDR (eglStreamConsumerOutputEXT); - GET_EGL_PROC_ADDR (eglStreamConsumerAcquireAttribEXT); - GET_EGL_PROC_ADDR (eglStreamConsumerGLTextureExternalKHR); GET_EGL_PROC_ADDR (eglStreamConsumerAcquireKHR); + GET_EGL_PROC_ADDR (eglStreamConsumerAcquireAttribNV); GET_EGL_PROC_ADDR (eglCreateStreamFromFileDescriptorKHR); }