*/
#include <assert.h>
+#include <stdio.h>
#include <string.h>
#include "pipe/p_screen.h"
#include "util/u_memory.h"
egl_g3d_update_buffer(struct pipe_screen *screen, void *context_private)
{
struct egl_g3d_context *gctx = egl_g3d_context(context_private);
-
- /**
- * It is likely that the surface has changed when this function is called.
- * Set force_validate to skip an unnecessary check.
- */
- gctx->force_validate = EGL_TRUE;
egl_g3d_validate_context(gctx->base.Resource.Display, &gctx->base);
}
egl_g3d_init_st(&gdrv->base);
dpy->ClientAPIsMask = gdrv->api_mask;
- if (egl_g3d_add_configs(drv, dpy, 1) == 1) {
- _eglError(EGL_NOT_INITIALIZED, "eglInitialize(unable to add configs)");
- goto fail;
- }
-
#ifdef EGL_MESA_screen_surface
- /* enable MESA_screen_surface */
+ /* enable MESA_screen_surface before adding (and validating) configs */
if (gdpy->native->modeset) {
dpy->Extensions.MESA_screen_surface = EGL_TRUE;
egl_g3d_add_screens(drv, dpy);
}
#endif
+ if (egl_g3d_add_configs(drv, dpy, 1) == 1) {
+ _eglError(EGL_NOT_INITIALIZED, "eglInitialize(unable to add configs)");
+ goto fail;
+ }
+
*major = 1;
*minor = 4;
}
mode = &gconf->native->mode;
- gctx->pipe =
- gdpy->native->create_context(gdpy->native, (void *) &gctx->base);
+
+ gctx->pipe = gdpy->native->screen->context_create(
+ gdpy->native->screen,
+ (void *) &gctx->base);
+
if (!gctx->pipe) {
free(gctx);
return NULL;