Lines Matching refs:disp
108 #define RETURN_EGL_ERROR(disp, err, ret) \
110 if (disp) \
111 _eglUnlockDisplay(disp); \
118 #define RETURN_EGL_SUCCESS(disp, ret) \
119 RETURN_EGL_ERROR(disp, EGL_SUCCESS, ret)
122 #define RETURN_EGL_EVAL(disp, ret) \
123 RETURN_EGL_ERROR(disp, (ret) ? EGL_SUCCESS : 0, ret)
130 #define _EGL_CHECK_DISPLAY(disp, ret, drv) \
132 drv = _eglCheckDisplay(disp, __FUNCTION__); \
134 RETURN_EGL_ERROR(disp, 0, ret); \
137 #define _EGL_CHECK_OBJECT(disp, type, obj, ret, drv) \
139 drv = _eglCheck ## type(disp, obj, __FUNCTION__); \
141 RETURN_EGL_ERROR(disp, 0, ret); \
144 #define _EGL_CHECK_SURFACE(disp, surf, ret, drv) \
145 _EGL_CHECK_OBJECT(disp, Surface, surf, ret, drv)
147 #define _EGL_CHECK_CONTEXT(disp, context, ret, drv) \
148 _EGL_CHECK_OBJECT(disp, Context, context, ret, drv)
150 #define _EGL_CHECK_CONFIG(disp, conf, ret, drv) \
151 _EGL_CHECK_OBJECT(disp, Config, conf, ret, drv)
153 #define _EGL_CHECK_SCREEN(disp, scrn, ret, drv) \
154 _EGL_CHECK_OBJECT(disp, Screen, scrn, ret, drv)
156 #define _EGL_CHECK_MODE(disp, m, ret, drv) \
157 _EGL_CHECK_OBJECT(disp, Mode, m, ret, drv)
159 #define _EGL_CHECK_SYNC(disp, s, ret, drv) \
160 _EGL_CHECK_OBJECT(disp, Sync, s, ret, drv)
164 _eglCheckDisplay(_EGLDisplay *disp, const char *msg)
166 if (!disp) {
170 if (!disp->Initialized) {
174 return disp->Driver;
179 _eglCheckSurface(_EGLDisplay *disp, _EGLSurface *surf, const char *msg)
181 _EGLDriver *drv = _eglCheckDisplay(disp, msg);
193 _eglCheckContext(_EGLDisplay *disp, _EGLContext *context, const char *msg)
195 _EGLDriver *drv = _eglCheckDisplay(disp, msg);
207 _eglCheckConfig(_EGLDisplay *disp, _EGLConfig *conf, const char *msg)
209 _EGLDriver *drv = _eglCheckDisplay(disp, msg);
221 _eglCheckSync(_EGLDisplay *disp, _EGLSync *s, const char *msg)
223 _EGLDriver *drv = _eglCheckDisplay(disp, msg);
238 _eglCheckScreen(_EGLDisplay *disp, _EGLScreen *scrn, const char *msg)
240 _EGLDriver *drv = _eglCheckDisplay(disp, msg);
252 _eglCheckMode(_EGLDisplay *disp, _EGLMode *m, const char *msg)
254 _EGLDriver *drv = _eglCheckDisplay(disp, msg);
311 _EGLDisplay *disp = _eglLockDisplay(dpy);
313 if (!disp)
316 if (!disp->Initialized) {
317 if (!_eglMatchDriver(disp, EGL_FALSE))
318 RETURN_EGL_ERROR(disp, EGL_NOT_INITIALIZED, EGL_FALSE);
321 disp->ClientAPIs &= _EGL_API_ALL_BITS;
326 *major = disp->VersionMajor;
327 *minor = disp->VersionMinor;
330 RETURN_EGL_SUCCESS(disp, EGL_TRUE);
337 _EGLDisplay *disp = _eglLockDisplay(dpy);
339 if (!disp)
342 if (disp->Initialized) {
343 _EGLDriver *drv = disp->Driver;
345 drv->API.Terminate(drv, disp);
346 /* do not reset disp->Driver */
347 disp->Initialized = EGL_FALSE;
350 RETURN_EGL_SUCCESS(disp, EGL_TRUE);
357 _EGLDisplay *disp = _eglLockDisplay(dpy);
361 _EGL_CHECK_DISPLAY(disp, NULL, drv);
362 ret = drv->API.QueryString(drv, disp, name);
364 RETURN_EGL_EVAL(disp, ret);
372 _EGLDisplay *disp = _eglLockDisplay(dpy);
376 _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
377 ret = drv->API.GetConfigs(drv, disp, configs, config_size, num_config);
379 RETURN_EGL_EVAL(disp, ret);
387 _EGLDisplay *disp = _eglLockDisplay(dpy);
391 _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
392 ret = drv->API.ChooseConfig(drv, disp, attrib_list, configs,
395 RETURN_EGL_EVAL(disp, ret);
403 _EGLDisplay *disp = _eglLockDisplay(dpy);
404 _EGLConfig *conf = _eglLookupConfig(config, disp);
408 _EGL_CHECK_CONFIG(disp, conf, EGL_FALSE, drv);
409 ret = drv->API.GetConfigAttrib(drv, disp, conf, attribute, value);
411 RETURN_EGL_EVAL(disp, ret);
419 _EGLDisplay *disp = _eglLockDisplay(dpy);
420 _EGLConfig *conf = _eglLookupConfig(config, disp);
421 _EGLContext *share = _eglLookupContext(share_list, disp);
426 _EGL_CHECK_DISPLAY(disp, EGL_NO_CONTEXT, drv);
430 if (!disp->Extensions.KHR_surfaceless_context)
431 RETURN_EGL_ERROR(disp, EGL_BAD_CONFIG, EGL_NO_CONTEXT);
435 RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_NO_CONTEXT);
437 context = drv->API.CreateContext(drv, disp, conf, share, attrib_list);
440 RETURN_EGL_EVAL(disp, ret);
447 _EGLDisplay *disp = _eglLockDisplay(dpy);
448 _EGLContext *context = _eglLookupContext(ctx, disp);
452 _EGL_CHECK_CONTEXT(disp, context, EGL_FALSE, drv);
454 ret = drv->API.DestroyContext(drv, disp, context);
456 RETURN_EGL_EVAL(disp, ret);
464 _EGLDisplay *disp = _eglLockDisplay(dpy);
465 _EGLContext *context = _eglLookupContext(ctx, disp);
466 _EGLSurface *draw_surf = _eglLookupSurface(draw, disp);
467 _EGLSurface *read_surf = _eglLookupSurface(read, disp);
471 if (!disp)
472 RETURN_EGL_ERROR(disp, EGL_BAD_DISPLAY, EGL_FALSE);
473 drv = disp->Driver;
476 if (!disp->Initialized) {
479 RETURN_EGL_ERROR(disp, EGL_BAD_DISPLAY, EGL_FALSE);
482 RETURN_EGL_SUCCESS(disp, EGL_TRUE);
485 RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_FALSE);
488 if (!disp->Extensions.KHR_surfaceless_context)
489 RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
493 RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
495 RETURN_EGL_ERROR(disp, EGL_BAD_MATCH, EGL_FALSE);
498 ret = drv->API.MakeCurrent(drv, disp, draw_surf, read_surf, context);
500 RETURN_EGL_EVAL(disp, ret);
508 _EGLDisplay *disp = _eglLockDisplay(dpy);
509 _EGLContext *context = _eglLookupContext(ctx, disp);
513 _EGL_CHECK_CONTEXT(disp, context, EGL_FALSE, drv);
514 ret = drv->API.QueryContext(drv, disp, context, attribute, value);
516 RETURN_EGL_EVAL(disp, ret);
524 _EGLDisplay *disp = _eglLockDisplay(dpy);
525 _EGLConfig *conf = _eglLookupConfig(config, disp);
530 _EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
531 if (disp->Platform != _eglGetNativePlatform(disp->PlatformDisplay))
532 RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
534 surf = drv->API.CreateWindowSurface(drv, disp, conf, window, attrib_list);
537 RETURN_EGL_EVAL(disp, ret);
545 _EGLDisplay *disp = _eglLockDisplay(dpy);
546 _EGLConfig *conf = _eglLookupConfig(config, disp);
551 _EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
552 if (disp->Platform != _eglGetNativePlatform(disp->PlatformDisplay))
553 RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_PIXMAP, EGL_NO_SURFACE);
555 surf = drv->API.CreatePixmapSurface(drv, disp, conf, pixmap, attrib_list);
558 RETURN_EGL_EVAL(disp, ret);
566 _EGLDisplay *disp = _eglLockDisplay(dpy);
567 _EGLConfig *conf = _eglLookupConfig(config, disp);
572 _EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
574 surf = drv->API.CreatePbufferSurface(drv, disp, conf, attrib_list);
577 RETURN_EGL_EVAL(disp, ret);
584 _EGLDisplay *disp = _eglLockDisplay(dpy);
585 _EGLSurface *surf = _eglLookupSurface(surface, disp);
589 _EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
591 ret = drv->API.DestroySurface(drv, disp, surf);
593 RETURN_EGL_EVAL(disp, ret);
600 _EGLDisplay *disp = _eglLockDisplay(dpy);
601 _EGLSurface *surf = _eglLookupSurface(surface, disp);
605 _EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
606 ret = drv->API.QuerySurface(drv, disp, surf, attribute, value);
608 RETURN_EGL_EVAL(disp, ret);
615 _EGLDisplay *disp = _eglLockDisplay(dpy);
616 _EGLSurface *surf = _eglLookupSurface(surface, disp);
620 _EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
621 ret = drv->API.SurfaceAttrib(drv, disp, surf, attribute, value);
623 RETURN_EGL_EVAL(disp, ret);
630 _EGLDisplay *disp = _eglLockDisplay(dpy);
631 _EGLSurface *surf = _eglLookupSurface(surface, disp);
635 _EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
636 ret = drv->API.BindTexImage(drv, disp, surf, buffer);
638 RETURN_EGL_EVAL(disp, ret);
645 _EGLDisplay *disp = _eglLockDisplay(dpy);
646 _EGLSurface *surf = _eglLookupSurface(surface, disp);
650 _EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
651 ret = drv->API.ReleaseTexImage(drv, disp, surf, buffer);
653 RETURN_EGL_EVAL(disp, ret);
660 _EGLDisplay *disp = _eglLockDisplay(dpy);
666 _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
669 ctx->Resource.Display != disp)
670 RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_FALSE);
674 RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
676 ret = drv->API.SwapInterval(drv, disp, surf, interval);
678 RETURN_EGL_EVAL(disp, ret);
686 _EGLDisplay *disp = _eglLockDisplay(dpy);
687 _EGLSurface *surf = _eglLookupSurface(surface, disp);
691 _EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
696 RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
698 ret = drv->API.SwapBuffers(drv, disp, surf);
700 RETURN_EGL_EVAL(disp, ret);
707 _EGLDisplay *disp = _eglLockDisplay(dpy);
708 _EGLSurface *surf = _eglLookupSurface(surface, disp);
712 _EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
713 if (disp->Platform != _eglGetNativePlatform(disp->PlatformDisplay))
714 RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_PIXMAP, EGL_FALSE);
715 ret = drv->API.CopyBuffers(drv, disp, surf, target);
717 RETURN_EGL_EVAL(disp, ret);
725 _EGLDisplay *disp;
732 disp = ctx->Resource.Display;
733 _eglLockMutex(&disp->Mutex);
738 RETURN_EGL_ERROR(disp, EGL_BAD_CURRENT_SURFACE, EGL_FALSE);
741 assert(disp->Initialized);
742 drv = disp->Driver;
743 ret = drv->API.WaitClient(drv, disp, ctx);
745 RETURN_EGL_EVAL(disp, ret);
771 _EGLDisplay *disp;
778 disp = ctx->Resource.Display;
779 _eglLockMutex(&disp->Mutex);
784 RETURN_EGL_ERROR(disp, EGL_BAD_CURRENT_SURFACE, EGL_FALSE);
787 assert(disp->Initialized);
788 drv = disp->Driver;
789 ret = drv->API.WaitNative(drv, disp, engine);
791 RETURN_EGL_EVAL(disp, ret);
978 _EGLDisplay *disp = _eglLockDisplay(dpy);
979 _EGLScreen *scrn = _eglLookupScreen(screen, disp);
983 _EGL_CHECK_SCREEN(disp, scrn, EGL_FALSE, drv);
984 ret = drv->API.ChooseModeMESA(drv, disp, scrn, attrib_list,
987 RETURN_EGL_EVAL(disp, ret);
995 _EGLDisplay *disp = _eglLockDisplay(dpy);
996 _EGLScreen *scrn = _eglLookupScreen(screen, disp);
1000 _EGL_CHECK_SCREEN(disp, scrn, EGL_FALSE, drv);
1001 ret = drv->API.GetModesMESA(drv, disp, scrn, modes, mode_size, num_mode);
1003 RETURN_EGL_EVAL(disp, ret);
1011 _EGLDisplay *disp = _eglLockDisplay(dpy);
1012 _EGLMode *m = _eglLookupMode(mode, disp);
1016 _EGL_CHECK_MODE(disp, m, EGL_FALSE, drv);
1017 ret = drv->API.GetModeAttribMESA(drv, disp, m, attribute, value);
1019 RETURN_EGL_EVAL(disp, ret);
1027 _EGLDisplay *disp = _eglLockDisplay(dpy);
1028 _EGLContext *source_context = _eglLookupContext(source, disp);
1029 _EGLContext *dest_context = _eglLookupContext(dest, disp);
1033 _EGL_CHECK_CONTEXT(disp, source_context, EGL_FALSE, drv);
1035 RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_FALSE);
1037 ret = drv->API.CopyContextMESA(drv, disp,
1040 RETURN_EGL_EVAL(disp, ret);
1048 _EGLDisplay *disp = _eglLockDisplay(dpy);
1052 _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
1053 ret = drv->API.GetScreensMESA(drv, disp, screens, max_screens, num_screens);
1055 RETURN_EGL_EVAL(disp, ret);
1063 _EGLDisplay *disp = _eglLockDisplay(dpy);
1064 _EGLConfig *conf = _eglLookupConfig(config, disp);
1069 _EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
1071 surf = drv->API.CreateScreenSurfaceMESA(drv, disp, conf, attrib_list);
1074 RETURN_EGL_EVAL(disp, ret);
1082 _EGLDisplay *disp = _eglLockDisplay(dpy);
1083 _EGLScreen *scrn = _eglLookupScreen((EGLScreenMESA) screen, disp);
1084 _EGLSurface *surf = _eglLookupSurface(surface, disp);
1085 _EGLMode *m = _eglLookupMode(mode, disp);
1089 _EGL_CHECK_SCREEN(disp, scrn, EGL_FALSE, drv);
1091 RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
1093 RETURN_EGL_ERROR(disp, EGL_BAD_MODE_MESA, EGL_FALSE);
1095 ret = drv->API.ShowScreenSurfaceMESA(drv, disp, scrn, surf, m);
1097 RETURN_EGL_EVAL(disp, ret);
1104 _EGLDisplay *disp = _eglLockDisplay(dpy);
1105 _EGLScreen *scrn = _eglLookupScreen(screen, disp);
1109 _EGL_CHECK_SCREEN(disp, scrn, EGL_FALSE, drv);
1110 ret = drv->API.ScreenPositionMESA(drv, disp, scrn, x, y);
1112 RETURN_EGL_EVAL(disp, ret);
1120 _EGLDisplay *disp = _eglLockDisplay(dpy);
1121 _EGLScreen *scrn = _eglLookupScreen(screen, disp);
1125 _EGL_CHECK_SCREEN(disp, scrn, EGL_FALSE, drv);
1126 ret = drv->API.QueryScreenMESA(drv, disp, scrn, attribute, value);
1128 RETURN_EGL_EVAL(disp, ret);
1136 _EGLDisplay *disp = _eglLockDisplay(dpy);
1137 _EGLScreen *scrn = _eglLookupScreen((EGLScreenMESA) screen, disp);
1142 _EGL_CHECK_SCREEN(disp, scrn, EGL_FALSE, drv);
1143 ret = drv->API.QueryScreenSurfaceMESA(drv, disp, scrn, &surf);
1147 RETURN_EGL_EVAL(disp, ret);
1154 _EGLDisplay *disp = _eglLockDisplay(dpy);
1155 _EGLScreen *scrn = _eglLookupScreen((EGLScreenMESA) screen, disp);
1160 _EGL_CHECK_SCREEN(disp, scrn, EGL_FALSE, drv);
1161 ret = drv->API.QueryScreenModeMESA(drv, disp, scrn, &m);
1165 RETURN_EGL_EVAL(disp, ret);
1172 _EGLDisplay *disp = _eglLockDisplay(dpy);
1173 _EGLMode *m = _eglLookupMode(mode, disp);
1177 _EGL_CHECK_MODE(disp, m, NULL, drv);
1178 ret = drv->API.QueryModeStringMESA(drv, disp, m);
1180 RETURN_EGL_EVAL(disp, ret);
1251 _EGLDisplay *disp = _eglLockDisplay(dpy);
1252 _EGLConfig *conf = _eglLookupConfig(config, disp);
1257 _EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
1259 surf = drv->API.CreatePbufferFromClientBuffer(drv, disp, buftype, buffer,
1263 RETURN_EGL_EVAL(disp, ret);
1279 _EGLDisplay *disp = ctx->Resource.Display;
1284 _eglLockMutex(&disp->Mutex);
1285 drv = disp->Driver;
1286 (void) drv->API.MakeCurrent(drv, disp, NULL, NULL, NULL);
1287 _eglUnlockMutex(&disp->Mutex);
1304 _EGLDisplay *disp = _eglLockDisplay(dpy);
1305 _EGLContext *context = _eglLookupContext(ctx, disp);
1310 _EGL_CHECK_DISPLAY(disp, EGL_NO_IMAGE_KHR, drv);
1311 if (!disp->Extensions.KHR_image_base)
1312 RETURN_EGL_EVAL(disp, EGL_NO_IMAGE_KHR);
1314 RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_NO_IMAGE_KHR);
1317 disp, context, target, buffer, attr_list);
1320 RETURN_EGL_EVAL(disp, ret);
1327 _EGLDisplay *disp = _eglLockDisplay(dpy);
1328 _EGLImage *img = _eglLookupImage(image, disp);
1332 _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
1333 if (!disp->Extensions.KHR_image_base)
1334 RETURN_EGL_EVAL(disp, EGL_FALSE);
1336 RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
1339 ret = drv->API.DestroyImageKHR(drv, disp, img);
1341 RETURN_EGL_EVAL(disp, ret);
1348 _EGLDisplay *disp = _eglLockDisplay(dpy);
1353 _EGL_CHECK_DISPLAY(disp, EGL_NO_SYNC_KHR, drv);
1354 if (!disp->Extensions.KHR_reusable_sync)
1355 RETURN_EGL_EVAL(disp, EGL_NO_SYNC_KHR);
1357 sync = drv->API.CreateSyncKHR(drv, disp, type, attrib_list);
1360 RETURN_EGL_EVAL(disp, ret);
1367 _EGLDisplay *disp = _eglLockDisplay(dpy);
1368 _EGLSync *s = _eglLookupSync(sync, disp);
1372 _EGL_CHECK_SYNC(disp, s, EGL_FALSE, drv);
1373 assert(disp->Extensions.KHR_reusable_sync);
1376 ret = drv->API.DestroySyncKHR(drv, disp, s);
1378 RETURN_EGL_EVAL(disp, ret);
1385 _EGLDisplay *disp = _eglLockDisplay(dpy);
1386 _EGLSync *s = _eglLookupSync(sync, disp);
1390 _EGL_CHECK_SYNC(disp, s, EGL_FALSE, drv);
1391 assert(disp->Extensions.KHR_reusable_sync);
1392 ret = drv->API.ClientWaitSyncKHR(drv, disp, s, flags, timeout);
1394 RETURN_EGL_EVAL(disp, ret);
1401 _EGLDisplay *disp = _eglLockDisplay(dpy);
1402 _EGLSync *s = _eglLookupSync(sync, disp);
1406 _EGL_CHECK_SYNC(disp, s, EGL_FALSE, drv);
1407 assert(disp->Extensions.KHR_reusable_sync);
1408 ret = drv->API.SignalSyncKHR(drv, disp, s, mode);
1410 RETURN_EGL_EVAL(disp, ret);
1417 _EGLDisplay *disp = _eglLockDisplay(dpy);
1418 _EGLSync *s = _eglLookupSync(sync, disp);
1422 _EGL_CHECK_SYNC(disp, s, EGL_FALSE, drv);
1423 assert(disp->Extensions.KHR_reusable_sync);
1424 ret = drv->API.GetSyncAttribKHR(drv, disp, s, attribute, value);
1426 RETURN_EGL_EVAL(disp, ret);
1437 _EGLDisplay *disp = _eglLockDisplay(dpy);
1438 _EGLSurface *surf = _eglLookupSurface(surface, disp);
1442 _EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
1444 if (!disp->Extensions.NOK_swap_region)
1445 RETURN_EGL_EVAL(disp, EGL_FALSE);
1450 RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
1452 ret = drv->API.SwapBuffersRegionNOK(drv, disp, surf, numRects, rects);
1454 RETURN_EGL_EVAL(disp, ret);
1465 _EGLDisplay *disp = _eglLockDisplay(dpy);
1470 _EGL_CHECK_DISPLAY(disp, EGL_NO_IMAGE_KHR, drv);
1471 if (!disp->Extensions.MESA_drm_image)
1472 RETURN_EGL_EVAL(disp, EGL_NO_IMAGE_KHR);
1474 img = drv->API.CreateDRMImageMESA(drv, disp, attr_list);
1477 RETURN_EGL_EVAL(disp, ret);
1484 _EGLDisplay *disp = _eglLockDisplay(dpy);
1485 _EGLImage *img = _eglLookupImage(image, disp);
1489 _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
1490 assert(disp->Extensions.MESA_drm_image);
1493 RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
1495 ret = drv->API.ExportDRMImageMESA(drv, disp, img, name, handle, stride);
1497 RETURN_EGL_EVAL(disp, ret);
1508 _EGLDisplay *disp = _eglLockDisplay(dpy);
1512 _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
1513 assert(disp->Extensions.WL_bind_wayland_display);
1516 RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
1518 ret = drv->API.BindWaylandDisplayWL(drv, disp, display);
1520 RETURN_EGL_EVAL(disp, ret);
1526 _EGLDisplay *disp = _eglLockDisplay(dpy);
1530 _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
1531 assert(disp->Extensions.WL_bind_wayland_display);
1534 RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
1536 ret = drv->API.UnbindWaylandDisplayWL(drv, disp, display);
1538 RETURN_EGL_EVAL(disp, ret);
1545 _EGLDisplay *disp = _eglLockDisplay(dpy);
1549 _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
1550 assert(disp->Extensions.WL_bind_wayland_display);
1553 RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
1555 ret = drv->API.QueryWaylandBufferWL(drv, disp, buffer, attribute, value);
1557 RETURN_EGL_EVAL(disp, ret);
1566 _EGLDisplay *disp = _eglLockDisplay(dpy);
1567 _EGLSurface *surf = _eglLookupSurface(surface, disp);
1571 _EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
1573 if (!disp->Extensions.NV_post_sub_buffer)
1574 RETURN_EGL_EVAL(disp, EGL_FALSE);
1576 ret = drv->API.PostSubBufferNV(drv, disp, surf, x, y, width, height);
1578 RETURN_EGL_EVAL(disp, ret);