Skip to content

Commit

Permalink
gles: Fix fallback for missing eglCreateContext.
Browse files Browse the repository at this point in the history
This logic was added to handle cases where tracing missed the context creation. It got broken over time.

Fixes: google#983
  • Loading branch information
ben-clayton committed Aug 24, 2017
1 parent 7082544 commit 684c145
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gapis/api/gles/api/egl.api
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,12 @@ cmd EGLBoolean eglMakeCurrent(EGLDisplay display,
_ = newMsg(SEVERITY_WARNING, new!WARN_UNKNOWN_CONTEXT(id: as!u64(context)))
ctx := CreateContext(null)
EGLContexts[context] = ctx
SetContext(ctx)
// The current context is fetched by ApplyStaticContextState() and
// ApplyDynamicContextState() so SetContext() must be set before these
// calls.
ApplyStaticContextState(ctx, staticState)
ApplyDynamicContextState(ctx, dynamicState)
SetContext(ctx)
} else if context != null {
// TODO: onEGLError(EGL_BAD_CONTEXT)
_ = newMsg(SEVERITY_ERROR, new!ERR_CONTEXT_DOES_NOT_EXIST(id: as!u64(context)))
Expand Down

0 comments on commit 684c145

Please sign in to comment.