'ViewportInitialized' flag in gl_context has to be reset to '0' when the current context is unbound via a eglMakeCurrent call with all of 'NULL' resources (surfaces and context).
This is to make sure the viewport of the context is re-initialized when the same context is bound to new read and draw surfaces (or same surfaces but with different size.) next time when the context is made current again. Signed-off-by: Dongwon Kim <dongwon....@intel.com> --- src/mesa/main/context.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 574c0fb..477e543 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1642,6 +1642,10 @@ _mesa_make_current( struct gl_context *newCtx, assert(_mesa_get_current_context() == newCtx); if (!newCtx) { + /* We reset ViewportInitialized for new bindings of surfaces to the + * same context in a new _mesa_make_current call. + */ + curCtx->ViewportInitialized = GL_FALSE; _glapi_set_dispatch(NULL); /* none current */ } else { -- 2.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev