_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_surface_CTA861_3_metadata);
+ _EGL_CHECK_EXTENSION(EXT_surface_SMPTE2086_metadata);
_EGL_CHECK_EXTENSION(EXT_swap_buffers_with_damage);
_EGL_CHECK_EXTENSION(IMG_context_priority);
static void
_eglCreateAPIsString(_EGLDisplay *dpy)
{
+#define addstr(str) \
+ { \
+ const size_t old_len = strlen(dpy->ClientAPIsString); \
+ const size_t add_len = sizeof(str); \
+ const size_t max_len = sizeof(dpy->ClientAPIsString) - 1; \
+ if (old_len + add_len <= max_len) \
+ strcat(dpy->ClientAPIsString, str " "); \
+ else \
+ assert(!"dpy->ClientAPIsString is not large enough"); \
+ }
+
if (dpy->ClientAPIs & EGL_OPENGL_BIT)
- strcat(dpy->ClientAPIsString, "OpenGL ");
+ addstr("OpenGL");
if (dpy->ClientAPIs & EGL_OPENGL_ES_BIT ||
dpy->ClientAPIs & EGL_OPENGL_ES2_BIT ||
dpy->ClientAPIs & EGL_OPENGL_ES3_BIT_KHR) {
- strcat(dpy->ClientAPIsString, "OpenGL_ES ");
+ addstr("OpenGL_ES");
}
if (dpy->ClientAPIs & EGL_OPENVG_BIT)
- strcat(dpy->ClientAPIsString, "OpenVG ");
+ addstr("OpenVG");
- assert(strlen(dpy->ClientAPIsString) < sizeof(dpy->ClientAPIsString));
+#undef addstr
}
static void
_eglCreateExtensionsString(disp);
_eglCreateAPIsString(disp);
snprintf(disp->VersionString, sizeof(disp->VersionString),
- "%d.%d (%s)", disp->Version / 10, disp->Version % 10,
- disp->Driver->Name);
+ "%d.%d", disp->Version / 10, disp->Version % 10);
}
/* Update applications version of major and minor if not NULL */
if (_eglGetSurfaceHandle(surf) == EGL_NO_SURFACE)
RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
+ if (surf->Type != EGL_WINDOW_BIT)
+ RETURN_EGL_EVAL(disp, EGL_TRUE);
+
interval = CLAMP(interval,
surf->Config->MinSwapInterval,
surf->Config->MaxSwapInterval);
RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
#endif
+ if (surf->Type != EGL_WINDOW_BIT)
+ RETURN_EGL_EVAL(disp, EGL_TRUE);
+
/* From the EGL 1.5 spec:
*
* If eglSwapBuffers is called and the native window associated with
surf != ctx->DrawSurface)
RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
+ if (surf->Type != EGL_WINDOW_BIT)
+ RETURN_EGL_EVAL(disp, EGL_TRUE);
+
if ((n_rects > 0 && rects == NULL) || n_rects < 0)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);