st/egl: Do not force validate when update_buffer is called.
[mesa.git] / src / gallium / state_trackers / egl / common / egl_g3d.c
index 2393199ee625ebd86c4e4524060531389a89503f..7ab2cd49abd982455d2148f0069697e568ae1b35 100644 (file)
@@ -23,6 +23,7 @@
  */
 
 #include <assert.h>
+#include <stdio.h>
 #include <string.h>
 #include "pipe/p_screen.h"
 #include "util/u_memory.h"
@@ -527,12 +528,6 @@ static void
 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);
 }
 
@@ -644,8 +639,11 @@ egl_g3d_create_context(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf,
    }
 
    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;