diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index aaf36a99633e28c5982cd8cc8fa076ec68f10e72..9df1ecff7b00f023110a8e4a2bcae35a308f4007 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -1703,21 +1703,6 @@ dri2_set_damage_region(_EGLDisplay *disp, _EGLSurface *surf, EGLint *rects, return EGL_TRUE; } -static EGLBoolean -dri2_post_sub_buffer(_EGLDisplay *disp, _EGLSurface *surf, EGLint x, EGLint y, - EGLint width, EGLint height) -{ - struct dri2_egl_display *dri2_dpy = dri2_egl_display_lock(disp); - EGLBoolean ret = EGL_FALSE; - - if (dri2_dpy->vtbl->post_sub_buffer) - ret = dri2_dpy->vtbl->post_sub_buffer(disp, surf, x, y, width, height); - - mtx_unlock(&dri2_dpy->lock); - - return ret; -} - static EGLBoolean dri2_copy_buffers(_EGLDisplay *disp, _EGLSurface *surf, void *native_pixmap_target) @@ -3350,7 +3335,6 @@ const _EGLDriver _eglDriver = { .SwapBuffers = dri2_swap_buffers, .SwapBuffersWithDamageEXT = dri2_swap_buffers_with_damage, .SetDamageRegion = dri2_set_damage_region, - .PostSubBufferNV = dri2_post_sub_buffer, .CopyBuffers = dri2_copy_buffers, .QueryBufferAge = dri2_query_buffer_age, .CreateImageKHR = dri2_create_image, diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index 405b65a967f9ddff4446e5ad0b4e95bcb7050501..df583b2823fe3dc1c9bdaa29565c11ba74948dbb 100644 --- a/src/egl/drivers/dri2/egl_dri2.h +++ b/src/egl/drivers/dri2/egl_dri2.h @@ -139,10 +139,6 @@ struct dri2_egl_display_vtbl { _EGLSurface *surface, const EGLint *rects, EGLint n_rects); - /* optional */ - EGLBoolean (*post_sub_buffer)(_EGLDisplay *disp, _EGLSurface *surf, EGLint x, - EGLint y, EGLint width, EGLint height); - /* optional */ EGLBoolean (*copy_buffers)(_EGLDisplay *disp, _EGLSurface *surf, void *native_pixmap_target); diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c index a759c8dd8e65f4e92096aed64b18e16ef81f66be..a35bd60c085cc0cc1c80e01194cc3984106d2b90 100644 --- a/src/egl/drivers/dri2/platform_x11.c +++ b/src/egl/drivers/dri2/platform_x11.c @@ -507,9 +507,6 @@ dri2_x11_create_surface(_EGLDisplay *disp, EGLint type, _EGLConfig *conf, swrastCreateDrawable(dri2_dpy, dri2_surf); } - /* we always copy the back buffer to front */ - dri2_surf->base.PostSubBufferSupportedNV = EGL_TRUE; - return &dri2_surf->base; cleanup_dri_drawable: @@ -1127,51 +1124,6 @@ dri2_x11_swap_buffers(_EGLDisplay *disp, _EGLSurface *draw) return EGL_TRUE; } -#ifdef HAVE_X11_DRI2 -static EGLBoolean -dri2_x11_swap_buffers_region(_EGLDisplay *disp, _EGLSurface *draw, - EGLint numRects, const EGLint *rects) -{ - struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); - struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw); - EGLBoolean ret; - xcb_xfixes_region_t region; - xcb_rectangle_t rectangles[16]; - - if (numRects > (int)ARRAY_SIZE(rectangles)) - return dri2_copy_region(disp, draw, dri2_surf->region); - - for (int i = 0; i < numRects; i++) { - rectangles[i].x = rects[i * 4]; - rectangles[i].y = - dri2_surf->base.Height - rects[i * 4 + 1] - rects[i * 4 + 3]; - rectangles[i].width = rects[i * 4 + 2]; - rectangles[i].height = rects[i * 4 + 3]; - } - - region = xcb_generate_id(dri2_dpy->conn); - xcb_xfixes_create_region(dri2_dpy->conn, region, numRects, rectangles); - ret = dri2_copy_region(disp, draw, region); - xcb_xfixes_destroy_region(dri2_dpy->conn, region); - - return ret; -} - -static EGLBoolean -dri2_x11_post_sub_buffer(_EGLDisplay *disp, _EGLSurface *draw, EGLint x, - EGLint y, EGLint width, EGLint height) -{ - const EGLint rect[4] = {x, y, width, height}; - - if (x < 0 || y < 0 || width < 0 || height < 0) - _eglError(EGL_BAD_PARAMETER, "eglPostSubBufferNV"); - - return dri2_x11_swap_buffers_region(disp, draw, 1, rect); -} -#else -#define dri2_x11_post_sub_buffer NULL -#endif - static EGLBoolean dri2_x11_kopper_swap_buffers_with_damage(_EGLDisplay *disp, _EGLSurface *draw, const EGLint *rects, EGLint numRects) @@ -1545,7 +1497,6 @@ static const struct dri2_egl_display_vtbl dri2_x11_swrast_display_vtbl = { .create_image = dri2_create_image_khr, .swap_buffers = dri2_x11_swap_buffers, .swap_buffers_with_damage = dri2_x11_swap_buffers_with_damage, - .post_sub_buffer = dri2_x11_post_sub_buffer, .copy_buffers = dri2_x11_copy_buffers, .query_buffer_age = dri2_swrast_query_buffer_age, /* XXX: should really implement this since X11 has pixmaps */ @@ -1564,7 +1515,6 @@ static const struct dri2_egl_display_vtbl dri2_x11_kopper_display_vtbl = { .swap_interval = dri2_kopper_swap_interval, .swap_buffers = dri2_x11_swap_buffers, .swap_buffers_with_damage = dri2_x11_kopper_swap_buffers_with_damage, - .post_sub_buffer = dri2_x11_post_sub_buffer, .copy_buffers = dri2_x11_copy_buffers, .query_buffer_age = dri2_kopper_query_buffer_age, /* XXX: should really implement this since X11 has pixmaps */ diff --git a/src/egl/generate/eglFunctionList.py b/src/egl/generate/eglFunctionList.py index a228ffc5fed9abe1bcee4f79195fe2fb381ce5b8..77f445084362b72febbead88f0647a6b6b729ed6 100644 --- a/src/egl/generate/eglFunctionList.py +++ b/src/egl/generate/eglFunctionList.py @@ -203,9 +203,6 @@ EGL_FUNCTIONS = ( _eglFunc("eglExportDMABUFImageQueryMESA", "display"), _eglFunc("eglExportDMABUFImageMESA", "display"), - # EGL_NV_post_sub_buffer - _eglFunc("eglPostSubBufferNV", "display"), - # EGL_WL_bind_wayland_display _eglFunc("eglCreateWaylandBufferFromImageWL", "display"), _eglFunc("eglUnbindWaylandDisplayWL", "display"), diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 3b9c47eda1d57a6219a59f4c1caa0752e4c0cd99..9d0c571426cf68a0ce08ccdd00bea1058f2c9da3 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -606,7 +606,6 @@ _eglCreateExtensionsString(_EGLDisplay *disp) _EGL_CHECK_EXTENSION(NOK_texture_from_pixmap); _EGL_CHECK_EXTENSION(NV_context_priority_realtime); - _EGL_CHECK_EXTENSION(NV_post_sub_buffer); _EGL_CHECK_EXTENSION(WL_bind_wayland_display); _EGL_CHECK_EXTENSION(WL_create_wayland_buffer_from_image); @@ -2380,28 +2379,6 @@ eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImage image) RETURN_EGL_EVAL(disp, ret); } -static EGLBoolean EGLAPIENTRY -eglPostSubBufferNV(EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, - EGLint width, EGLint height) -{ - _EGLDisplay *disp = _eglLockDisplay(dpy); - _EGLSurface *surf = _eglLookupSurface(surface, disp); - EGLBoolean ret = EGL_FALSE; - - _EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf); - - _EGL_CHECK_SURFACE(disp, surf, EGL_FALSE); - - if (!disp->Extensions.NV_post_sub_buffer) - RETURN_EGL_EVAL(disp, EGL_FALSE); - - egl_relax (disp, &surf->Resource) { - ret = disp->Driver->PostSubBufferNV(disp, surf, x, y, width, height); - } - - RETURN_EGL_EVAL(disp, ret); -} - static EGLBoolean EGLAPIENTRY eglGetSyncValuesCHROMIUM(EGLDisplay dpy, EGLSurface surface, EGLuint64KHR *ust, EGLuint64KHR *msc, EGLuint64KHR *sbc) diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h index 0827de421c07d32af776f041a3feb0a52c36d86e..b66a386281ed631d6c927d31d6aac1858dd75309 100644 --- a/src/egl/main/egldisplay.h +++ b/src/egl/main/egldisplay.h @@ -152,7 +152,6 @@ struct _egl_extensions { EGLBoolean NOK_texture_from_pixmap; - EGLBoolean NV_post_sub_buffer; EGLBoolean NV_context_priority_realtime; EGLBoolean WL_bind_wayland_display; diff --git a/src/egl/main/egldriver.h b/src/egl/main/egldriver.h index bc1285d492f336ab0f81ee777a2c376b5c9c0e2b..3f27405cea4c90356f6922eef7b417820c71d18c 100644 --- a/src/egl/main/egldriver.h +++ b/src/egl/main/egldriver.h @@ -168,11 +168,6 @@ struct _egl_driver { _EGLSurface *surface, const EGLint *rects, EGLint n_rects); - /* for EGL_NV_post_sub_buffer */ - EGLBoolean (*PostSubBufferNV)(_EGLDisplay *disp, _EGLSurface *surface, - EGLint x, EGLint y, EGLint width, - EGLint height); - /* for EGL_EXT_buffer_age/EGL_KHR_partial_update */ EGLint (*QueryBufferAge)(_EGLDisplay *disp, _EGLSurface *surface); diff --git a/src/egl/main/eglentrypoint.h b/src/egl/main/eglentrypoint.h index 6e7d0be9ca7325205c16498d1bb48c45b9f0d3eb..fa63ee7094eff6c2c01a79ac0bf3c2c1538738b6 100644 --- a/src/egl/main/eglentrypoint.h +++ b/src/egl/main/eglentrypoint.h @@ -59,7 +59,6 @@ EGL_ENTRYPOINT(eglGetSyncValuesCHROMIUM) EGL_ENTRYPOINT(eglInitialize) EGL_ENTRYPOINT(eglLabelObjectKHR) EGL_ENTRYPOINT(eglMakeCurrent) -EGL_ENTRYPOINT(eglPostSubBufferNV) EGL_ENTRYPOINT(eglQueryAPI) EGL_ENTRYPOINT(eglQueryContext) EGL_ENTRYPOINT(eglQueryDebugKHR) diff --git a/src/egl/main/eglsurface.c b/src/egl/main/eglsurface.c index 0f9f6ae40639132b879dfed961eac7a9149cc7a3..8ca8f947fc4d607b78c57388ed6b3a8e8aa06d60 100644 --- a/src/egl/main/eglsurface.c +++ b/src/egl/main/eglsurface.c @@ -229,17 +229,6 @@ _eglParseSurfaceAttribList(_EGLSurface *surf, const EGLint *attrib_list) } surf->PresentOpaque = val; break; - case EGL_POST_SUB_BUFFER_SUPPORTED_NV: - if (!disp->Extensions.NV_post_sub_buffer || type != EGL_WINDOW_BIT) { - err = EGL_BAD_ATTRIBUTE; - break; - } - if (val != EGL_TRUE && val != EGL_FALSE) { - err = EGL_BAD_PARAMETER; - break; - } - surf->PostSubBufferSupportedNV = val; - break; case EGL_SURFACE_COMPRESSION_EXT: if (type != EGL_WINDOW_BIT) { err = EGL_BAD_ATTRIBUTE; @@ -430,7 +419,6 @@ _eglInitSurface(_EGLSurface *surf, _EGLDisplay *disp, EGLint type, surf->VerticalResolution = EGL_UNKNOWN; surf->AspectRatio = EGL_UNKNOWN; - surf->PostSubBufferSupportedNV = EGL_FALSE; surf->SetDamageRegionCalled = EGL_FALSE; surf->BufferAgeRead = EGL_FALSE; @@ -558,9 +546,6 @@ _eglQuerySurface(_EGLDisplay *disp, _EGLSurface *surface, EGLint attribute, *value = surface->GLColorspace; break; - case EGL_POST_SUB_BUFFER_SUPPORTED_NV: - *value = surface->PostSubBufferSupportedNV; - break; case EGL_BUFFER_AGE_EXT: /* Both EXT_buffer_age and KHR_partial_update accept EGL_BUFFER_AGE_EXT. * To be precise, the KHR one accepts EGL_BUFFER_AGE_KHR which is an diff --git a/src/egl/main/eglsurface.h b/src/egl/main/eglsurface.h index 907fa16230bcde88d86ed575b2df4552efc65d51..1907a17174ca06c0d4ad759125f1576f28f95079 100644 --- a/src/egl/main/eglsurface.h +++ b/src/egl/main/eglsurface.h @@ -165,8 +165,6 @@ struct _egl_surface { /* True if the surface is bound to an OpenGL ES texture */ EGLBoolean BoundToTexture; - EGLBoolean PostSubBufferSupportedNV; - EGLBoolean ProtectedContent; EGLBoolean PresentOpaque;