egl: set the EGL version in common code
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
This commit is contained in:
parent
3a83adeb7c
commit
efda9c5649
|
@ -707,10 +707,6 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy)
|
|||
dpy->Extensions.ANDROID_image_native_buffer = EGL_TRUE;
|
||||
dpy->Extensions.KHR_image_base = EGL_TRUE;
|
||||
|
||||
/* we're supporting EGL 1.4 */
|
||||
dpy->VersionMajor = 1;
|
||||
dpy->VersionMinor = 4;
|
||||
|
||||
/* Fill vtbl last to prevent accidentally calling virtual function during
|
||||
* initialization.
|
||||
*/
|
||||
|
|
|
@ -715,10 +715,6 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* we're supporting EGL 1.4 */
|
||||
disp->VersionMajor = 1;
|
||||
disp->VersionMinor = 4;
|
||||
|
||||
/* Fill vtbl last to prevent accidentally calling virtual function during
|
||||
* initialization.
|
||||
*/
|
||||
|
|
|
@ -1206,10 +1206,6 @@ dri2_initialize_wayland_drm(_EGLDriver *drv, _EGLDisplay *disp)
|
|||
|
||||
disp->Extensions.EXT_swap_buffers_with_damage = EGL_TRUE;
|
||||
|
||||
/* we're supporting EGL 1.4 */
|
||||
disp->VersionMajor = 1;
|
||||
disp->VersionMinor = 4;
|
||||
|
||||
/* Fill vtbl last to prevent accidentally calling virtual function during
|
||||
* initialization.
|
||||
*/
|
||||
|
@ -1853,10 +1849,6 @@ dri2_initialize_wayland_swrast(_EGLDriver *drv, _EGLDisplay *disp)
|
|||
dri2_add_config(disp, config, i + 1, types, NULL, rgb565_masks);
|
||||
}
|
||||
|
||||
/* we're supporting EGL 1.4 */
|
||||
disp->VersionMajor = 1;
|
||||
disp->VersionMinor = 4;
|
||||
|
||||
/* Fill vtbl last to prevent accidentally calling virtual function during
|
||||
* initialization.
|
||||
*/
|
||||
|
|
|
@ -1129,10 +1129,6 @@ dri2_initialize_x11_swrast(_EGLDriver *drv, _EGLDisplay *disp)
|
|||
goto cleanup_configs;
|
||||
}
|
||||
|
||||
/* we're supporting EGL 1.4 */
|
||||
disp->VersionMajor = 1;
|
||||
disp->VersionMinor = 4;
|
||||
|
||||
/* Fill vtbl last to prevent accidentally calling virtual function during
|
||||
* initialization.
|
||||
*/
|
||||
|
@ -1303,10 +1299,6 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp)
|
|||
goto cleanup_configs;
|
||||
}
|
||||
|
||||
/* we're supporting EGL 1.4 */
|
||||
disp->VersionMajor = 1;
|
||||
disp->VersionMinor = 4;
|
||||
|
||||
/* Fill vtbl last to prevent accidentally calling virtual function during
|
||||
* initialization.
|
||||
*/
|
||||
|
|
|
@ -407,6 +407,12 @@ _eglCreateAPIsString(_EGLDisplay *dpy)
|
|||
assert(strlen(dpy->ClientAPIsString) < sizeof(dpy->ClientAPIsString));
|
||||
}
|
||||
|
||||
static void
|
||||
_eglComputeVersion(_EGLDisplay *disp)
|
||||
{
|
||||
disp->VersionMajor = 1;
|
||||
disp->VersionMinor = 4;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is typically the second EGL function that an application calls.
|
||||
|
@ -444,6 +450,7 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
|
|||
*/
|
||||
disp->Extensions.KHR_get_all_proc_addresses = EGL_TRUE;
|
||||
|
||||
_eglComputeVersion(disp);
|
||||
_eglCreateExtensionsString(disp);
|
||||
_eglCreateAPIsString(disp);
|
||||
_eglsnprintf(disp->VersionString, sizeof(disp->VersionString),
|
||||
|
|
Loading…
Reference in New Issue