egl: Retire NOK_swap_region support.
It's never been ported to DRI3, but nobody seems to care. Since DRI2 is untested at this point, just drop the code. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33517>
This commit is contained in:
@@ -1686,27 +1686,6 @@ dri2_swap_buffers_with_damage(_EGLDisplay *disp, _EGLSurface *surf,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
dri2_swap_buffers_region(_EGLDisplay *disp, _EGLSurface *surf, EGLint numRects,
|
||||
const EGLint *rects)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct dri_drawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(surf);
|
||||
EGLBoolean ret;
|
||||
|
||||
if (!dri2_dpy->vtbl->swap_buffers_region)
|
||||
return EGL_FALSE;
|
||||
ret = dri2_dpy->vtbl->swap_buffers_region(disp, surf, numRects, rects);
|
||||
|
||||
/* SwapBuffers marks the end of the frame; reset the damage region for
|
||||
* use again next time.
|
||||
*/
|
||||
if (ret && disp->Extensions.KHR_partial_update)
|
||||
dri_set_damage_region(dri_drawable, 0, NULL);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
dri2_set_damage_region(_EGLDisplay *disp, _EGLSurface *surf, EGLint *rects,
|
||||
EGLint n_rects)
|
||||
@@ -3370,7 +3349,6 @@ const _EGLDriver _eglDriver = {
|
||||
.SwapInterval = dri2_swap_interval,
|
||||
.SwapBuffers = dri2_swap_buffers,
|
||||
.SwapBuffersWithDamageEXT = dri2_swap_buffers_with_damage,
|
||||
.SwapBuffersRegionNOK = dri2_swap_buffers_region,
|
||||
.SetDamageRegion = dri2_set_damage_region,
|
||||
.PostSubBufferNV = dri2_post_sub_buffer,
|
||||
.CopyBuffers = dri2_copy_buffers,
|
||||
|
||||
@@ -139,10 +139,6 @@ struct dri2_egl_display_vtbl {
|
||||
_EGLSurface *surface,
|
||||
const EGLint *rects, EGLint n_rects);
|
||||
|
||||
/* optional */
|
||||
EGLBoolean (*swap_buffers_region)(_EGLDisplay *disp, _EGLSurface *surf,
|
||||
EGLint numRects, const EGLint *rects);
|
||||
|
||||
/* optional */
|
||||
EGLBoolean (*post_sub_buffer)(_EGLDisplay *disp, _EGLSurface *surf, EGLint x,
|
||||
EGLint y, EGLint width, EGLint height);
|
||||
|
||||
@@ -1169,7 +1169,6 @@ dri2_x11_post_sub_buffer(_EGLDisplay *disp, _EGLSurface *draw, EGLint x,
|
||||
return dri2_x11_swap_buffers_region(disp, draw, 1, rect);
|
||||
}
|
||||
#else
|
||||
#define dri2_x11_swap_buffers_region NULL
|
||||
#define dri2_x11_post_sub_buffer NULL
|
||||
#endif
|
||||
|
||||
@@ -1545,7 +1544,6 @@ static const struct dri2_egl_display_vtbl dri2_x11_swrast_display_vtbl = {
|
||||
.destroy_surface = dri2_x11_destroy_surface,
|
||||
.create_image = dri2_create_image_khr,
|
||||
.swap_buffers = dri2_x11_swap_buffers,
|
||||
.swap_buffers_region = dri2_x11_swap_buffers_region,
|
||||
.swap_buffers_with_damage = dri2_x11_swap_buffers_with_damage,
|
||||
.post_sub_buffer = dri2_x11_post_sub_buffer,
|
||||
.copy_buffers = dri2_x11_copy_buffers,
|
||||
@@ -1565,7 +1563,6 @@ static const struct dri2_egl_display_vtbl dri2_x11_kopper_display_vtbl = {
|
||||
.create_image = dri2_create_image_khr,
|
||||
.swap_interval = dri2_kopper_swap_interval,
|
||||
.swap_buffers = dri2_x11_swap_buffers,
|
||||
.swap_buffers_region = dri2_x11_swap_buffers_region,
|
||||
.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,
|
||||
@@ -1586,7 +1583,6 @@ static const struct dri2_egl_display_vtbl dri2_x11_display_vtbl = {
|
||||
.create_image = dri2_x11_create_image_khr,
|
||||
.swap_interval = dri2_x11_swap_interval,
|
||||
.swap_buffers = dri2_x11_swap_buffers,
|
||||
.swap_buffers_region = dri2_x11_swap_buffers_region,
|
||||
.post_sub_buffer = dri2_x11_post_sub_buffer,
|
||||
.copy_buffers = dri2_x11_copy_buffers,
|
||||
.query_surface = dri2_query_surface,
|
||||
|
||||
@@ -203,9 +203,6 @@ EGL_FUNCTIONS = (
|
||||
_eglFunc("eglExportDMABUFImageQueryMESA", "display"),
|
||||
_eglFunc("eglExportDMABUFImageMESA", "display"),
|
||||
|
||||
# EGL_NOK_swap_region
|
||||
_eglFunc("eglSwapBuffersRegionNOK", "display"),
|
||||
|
||||
# EGL_NV_post_sub_buffer
|
||||
_eglFunc("eglPostSubBufferNV", "display"),
|
||||
|
||||
|
||||
@@ -603,7 +603,6 @@ _eglCreateExtensionsString(_EGLDisplay *disp)
|
||||
_EGL_CHECK_EXTENSION(MESA_query_driver);
|
||||
_EGL_CHECK_EXTENSION(MESA_x11_native_visual_id);
|
||||
|
||||
_EGL_CHECK_EXTENSION(NOK_swap_region);
|
||||
_EGL_CHECK_EXTENSION(NOK_texture_from_pixmap);
|
||||
|
||||
_EGL_CHECK_EXTENSION(NV_context_priority_realtime);
|
||||
@@ -2250,33 +2249,6 @@ eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSync sync)
|
||||
RETURN_EGL_SUCCESS(disp, ret);
|
||||
}
|
||||
|
||||
static EGLBoolean EGLAPIENTRY
|
||||
eglSwapBuffersRegionNOK(EGLDisplay dpy, EGLSurface surface, EGLint numRects,
|
||||
const EGLint *rects)
|
||||
{
|
||||
_EGLContext *ctx = _eglGetCurrentContext();
|
||||
_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.NOK_swap_region)
|
||||
RETURN_EGL_EVAL(disp, EGL_FALSE);
|
||||
|
||||
/* surface must be bound to current context in EGL 1.4 */
|
||||
if (_eglGetContextHandle(ctx) == EGL_NO_CONTEXT || surf != ctx->DrawSurface)
|
||||
RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
|
||||
|
||||
egl_relax (disp, &surf->Resource) {
|
||||
ret = disp->Driver->SwapBuffersRegionNOK(disp, surf, numRects, rects);
|
||||
}
|
||||
|
||||
RETURN_EGL_EVAL(disp, ret);
|
||||
}
|
||||
|
||||
static EGLImage EGLAPIENTRY
|
||||
eglCreateDRMImageMESA(EGLDisplay dpy, const EGLint *attr_list)
|
||||
{
|
||||
|
||||
@@ -150,7 +150,6 @@ struct _egl_extensions {
|
||||
EGLBoolean MESA_query_driver;
|
||||
EGLBoolean MESA_x11_native_visual_id;
|
||||
|
||||
EGLBoolean NOK_swap_region;
|
||||
EGLBoolean NOK_texture_from_pixmap;
|
||||
|
||||
EGLBoolean NV_post_sub_buffer;
|
||||
|
||||
@@ -144,10 +144,6 @@ struct _egl_driver {
|
||||
/* for EGL_ANDROID_native_fence_sync */
|
||||
EGLint (*DupNativeFenceFDANDROID)(_EGLDisplay *disp, _EGLSync *sync);
|
||||
|
||||
/* for EGL_NOK_swap_region */
|
||||
EGLBoolean (*SwapBuffersRegionNOK)(_EGLDisplay *disp, _EGLSurface *surf,
|
||||
EGLint numRects, const EGLint *rects);
|
||||
|
||||
/* for EGL_MESA_drm_image */
|
||||
_EGLImage *(*CreateDRMImageMESA)(_EGLDisplay *disp, const EGLint *attr_list);
|
||||
EGLBoolean (*ExportDRMImageMESA)(_EGLDisplay *disp, _EGLImage *img,
|
||||
|
||||
@@ -80,7 +80,6 @@ EGL_ENTRYPOINT(eglSetDamageRegionKHR)
|
||||
EGL_ENTRYPOINT(eglSignalSyncKHR)
|
||||
EGL_ENTRYPOINT(eglSurfaceAttrib)
|
||||
EGL_ENTRYPOINT(eglSwapBuffers)
|
||||
EGL_ENTRYPOINT(eglSwapBuffersRegionNOK)
|
||||
EGL_ENTRYPOINT(eglSwapBuffersWithDamageEXT)
|
||||
EGL_ENTRYPOINT(eglSwapBuffersWithDamageKHR)
|
||||
EGL_ENTRYPOINT(eglSwapInterval)
|
||||
|
||||
Reference in New Issue
Block a user