Revert "egl: implement new functions from EGL_EXT_image_flush_external"
authorTapani Pälli <tapani.palli@intel.com>
Tue, 12 Nov 2019 15:32:33 +0000 (17:32 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Thu, 14 Nov 2019 05:46:04 +0000 (07:46 +0200)
This reverts commit c1c574fdf18f2aeb1c03f9670bf00e1dcd22d99d.

This series caused unexpected flickering artifacts with Iris driver on
Chrome OS and EGL_EXT_image_flush_external spec has not been published
yet.

Acked-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
src/egl/drivers/dri2/egl_dri2.c
src/egl/generate/egl.xml
src/egl/generate/eglFunctionList.py
src/egl/main/eglapi.c
src/egl/main/eglapi.h
src/egl/main/egldisplay.h
src/egl/main/eglentrypoint.h

index 3015ad5ae146fccc257b507daacc51e6e67c5acd..e9468dcf9911df0c631fd034478826bec1d3e681 100644 (file)
@@ -801,7 +801,6 @@ dri2_setup_screen(_EGLDisplay *disp)
       }
 
       disp->Extensions.KHR_image_base = EGL_TRUE;
-      disp->Extensions.EXT_image_flush_external = EGL_TRUE;
       disp->Extensions.KHR_gl_renderbuffer_image = EGL_TRUE;
       if (dri2_dpy->image->base.version >= 5 &&
           dri2_dpy->image->createImageFromTexture) {
@@ -3476,37 +3475,6 @@ dri2_interop_export_object(_EGLDisplay *disp, _EGLContext *ctx,
    return dri2_dpy->interop->export_object(dri2_ctx->dri_context, in, out);
 }
 
-static void
-dri2_image_flush_external(_EGLDisplay *disp, _EGLContext *ctx,
-                          _EGLImage *image)
-{
-   struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
-   struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx);
-   struct dri2_egl_image *dri2_img = dri2_egl_image(image);
-
-   if (dri2_dpy->image->base.version < 18)
-      return;
-
-   dri2_dpy->image->imageFlushExternal(dri2_ctx->dri_context,
-                                       dri2_img->dri_image, 0);
-}
-
-static void
-dri2_image_invalidate_external(_EGLDisplay *disp, _EGLContext *ctx,
-                               _EGLImage *image)
-{
-   struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
-   struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx);
-   struct dri2_egl_image *dri2_img = dri2_egl_image(image);
-
-   if (dri2_dpy->image->base.version < 18)
-      return;
-
-   dri2_dpy->image->imageInvalidateExternal(dri2_ctx->dri_context,
-                                            dri2_img->dri_image, 0);
-}
-
-
 /**
  * This is the main entrypoint into the driver, called by libEGL.
  * Gets an _EGLDriver object and init its dispatch table.
@@ -3565,6 +3533,4 @@ _eglInitDriver(_EGLDriver *dri2_drv)
    dri2_drv->API.GLInteropExportObject = dri2_interop_export_object;
    dri2_drv->API.DupNativeFenceFDANDROID = dri2_dup_native_fence_fd;
    dri2_drv->API.SetBlobCacheFuncsANDROID = dri2_set_blob_cache_funcs;
-   dri2_drv->API.ImageFlushExternal = dri2_image_flush_external;
-   dri2_drv->API.ImageInvalidateExternal = dri2_image_invalidate_external;
 }
index 8194c7316c8ed10c4286a067bbfc561bbef7da2c..10e3424208983b6512549d43af78076b592f03ad 100644 (file)
             <param><ptype>EGLint</ptype> <name>external_win_id</name></param>
             <param><ptype>EGLint</ptype> <name>policy</name></param>
         </command>
-        <command>
-            <proto><ptype>EGLBoolean</ptype> <name>eglImageFlushExternalEXT</name></proto>
-            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
-            <param><ptype>EGLImageKHR</ptype> <name>image</name></param>
-            <param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
-        </command>
-        <command>
-            <proto><ptype>EGLBoolean</ptype> <name>eglImageInvalidateExternalEXT</name></proto>
-            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
-            <param><ptype>EGLImageKHR</ptype> <name>image</name></param>
-            <param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
-        </command>
     </commands>
 
     <!-- SECTION: EGL API interface definitions. -->
index 2f53349303752dd2f34c7375a7ff9d6617afc9e2..192280f58f0205b2f0dc9cd3504410bd7b72e2e7 100644 (file)
@@ -213,7 +213,5 @@ EGL_FUNCTIONS = (
     _eglFunc("eglGetDisplayDriverName",              "display"),
     _eglFunc("eglGetDisplayDriverConfig",            "display"),
 
-    _eglFunc("eglImageFlushExternalEXT",             "display"),
-    _eglFunc("eglImageInvalidateExternalEXT",        "display"),
 )
 
index 68db0bd4cb93182c69b6945179c40473b33dd1c3..51557be0864a43f3f4621fc04e130e614caa4c0c 100644 (file)
@@ -499,7 +499,6 @@ _eglCreateExtensionsString(_EGLDisplay *disp)
    _EGL_CHECK_EXTENSION(EXT_create_context_robustness);
    _EGL_CHECK_EXTENSION(EXT_image_dma_buf_import);
    _EGL_CHECK_EXTENSION(EXT_image_dma_buf_import_modifiers);
-   _EGL_CHECK_EXTENSION(EXT_image_flush_external);
    _EGL_CHECK_EXTENSION(EXT_surface_CTA861_3_metadata);
    _EGL_CHECK_EXTENSION(EXT_surface_SMPTE2086_metadata);
    _EGL_CHECK_EXTENSION(EXT_swap_buffers_with_damage);
@@ -2748,55 +2747,6 @@ eglGetDisplayDriverName(EGLDisplay dpy)
     RETURN_EGL_EVAL(disp, ret);
 }
 
-static EGLBoolean EGLAPIENTRY
-eglImageFlushExternalEXT(EGLDisplay dpy, EGLImageKHR image,
-                         const EGLAttrib *attrib_list)
-{
-   _EGLDisplay *disp = _eglLockDisplay(dpy);
-   _EGLContext *ctx = _eglGetCurrentContext();
-   _EGLImage *img = _eglLookupImage(image, disp);
-   _EGLDriver *drv;
-
-   _EGL_FUNC_START(disp, EGL_OBJECT_IMAGE_KHR, img, EGL_FALSE);
-   _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
-
-   if (attrib_list && attrib_list[0] != EGL_NONE)
-      RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
-
-   if (!ctx || !disp->Extensions.EXT_image_flush_external)
-      RETURN_EGL_EVAL(disp, EGL_FALSE);
-   if (!img)
-      RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
-
-
-   drv->API.ImageFlushExternal(disp, ctx, img);
-   RETURN_EGL_EVAL(disp, EGL_TRUE);
-}
-
-static EGLBoolean EGLAPIENTRY
-eglImageInvalidateExternalEXT(EGLDisplay dpy, EGLImageKHR image,
-                              const EGLAttrib *attrib_list)
-{
-   _EGLDisplay *disp = _eglLockDisplay(dpy);
-   _EGLContext *ctx = _eglGetCurrentContext();
-   _EGLImage *img = _eglLookupImage(image, disp);
-   _EGLDriver *drv;
-
-   _EGL_FUNC_START(disp, EGL_OBJECT_IMAGE_KHR, img, EGL_FALSE);
-   _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
-
-   if (attrib_list && attrib_list[0] != EGL_NONE)
-      RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
-
-   if (!ctx || !disp->Extensions.EXT_image_flush_external)
-      RETURN_EGL_EVAL(disp, EGL_FALSE);
-   if (!img)
-      RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
-
-   drv->API.ImageInvalidateExternal(disp, ctx, img);
-   RETURN_EGL_EVAL(disp, EGL_TRUE);
-}
-
 __eglMustCastToProperFunctionPointerType EGLAPIENTRY
 eglGetProcAddress(const char *procname)
 {
index 76891dcd25b4361afdb373f0d8b5c5855d528055..968f4b277250855436351ed0e544a62a91bdcf2f 100644 (file)
@@ -189,11 +189,6 @@ struct _egl_api
    void (*SetBlobCacheFuncsANDROID) (_EGLDriver *drv, _EGLDisplay *disp,
                                      EGLSetBlobFuncANDROID set,
                                      EGLGetBlobFuncANDROID get);
-
-   void (*ImageFlushExternal)(_EGLDisplay *disp, _EGLContext *ctx,
-                              _EGLImage *image);
-   void (*ImageInvalidateExternal)(_EGLDisplay *disp, _EGLContext *ctx,
-                                   _EGLImage *image);
 };
 
 #ifdef __cplusplus
index 940b71e318ed2a5d26ed21f8fd8c235c7b3c8c61..02ac4fb9a9dc2ada68321d1fb5c5572d6bec5f08 100644 (file)
@@ -105,7 +105,6 @@ struct _egl_extensions
    EGLBoolean EXT_create_context_robustness;
    EGLBoolean EXT_image_dma_buf_import;
    EGLBoolean EXT_image_dma_buf_import_modifiers;
-   EGLBoolean EXT_image_flush_external;
    EGLBoolean EXT_pixel_format_float;
    EGLBoolean EXT_surface_CTA861_3_metadata;
    EGLBoolean EXT_surface_SMPTE2086_metadata;
index b708078f550a276e6929f97dc177493a5778c63a..44e971e023a56c82d42a4c7b989b051de17ead0f 100644 (file)
@@ -51,8 +51,6 @@ EGL_ENTRYPOINT(eglGetProcAddress)
 EGL_ENTRYPOINT(eglGetSyncAttrib)
 EGL_ENTRYPOINT(eglGetSyncAttribKHR)
 EGL_ENTRYPOINT(eglGetSyncValuesCHROMIUM)
-EGL_ENTRYPOINT(eglImageFlushExternalEXT)
-EGL_ENTRYPOINT(eglImageInvalidateExternalEXT)
 EGL_ENTRYPOINT(eglInitialize)
 EGL_ENTRYPOINT(eglLabelObjectKHR)
 EGL_ENTRYPOINT(eglMakeCurrent)