Home | History | Annotate | Download | only in main

Lines Matching full:ctx

46 _eglGetContextAPIBit(_EGLContext *ctx)
50 switch (ctx->ClientAPI) {
52 switch (ctx->ClientMajorVersion) {
82 _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
85 EGLenum api = ctx->ClientAPI;
102 ctx->ClientMajorVersion = val;
111 ctx->ClientMinorVersion = val;
132 ctx->Flags = val;
153 ctx->Profile = val;
170 ctx->ResetNotificationStrategy = val;
186 ctx->ResetNotificationStrategy = val;
195 ctx->Flags = EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR;
220 if (ctx->ClientMajorVersion >= 4
221 || (ctx->ClientMajorVersion == 3 && ctx->ClientMinorVersion >= 2)) {
222 switch (ctx->Profile) {
264 if (ctx->ClientMajorVersion < 1 || ctx->ClientMinorVersion < 0)
267 switch (ctx->ClientMajorVersion) {
269 if (ctx->ClientMinorVersion > 5
270 || (ctx->Flags & EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR) != 0)
275 if (ctx->ClientMinorVersion > 1
276 || (ctx->Flags & EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR) != 0)
283 if (ctx->ClientMinorVersion > 3)
308 if (ctx->ClientMajorVersion < 1 || ctx->ClientMinorVersion < 0)
311 switch (ctx->ClientMajorVersion) {
313 if (ctx->ClientMinorVersion > 1)
318 if (ctx->ClientMinorVersion > 0)
331 switch (ctx->ResetNotificationStrategy) {
341 if ((ctx->Flags & ~(EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR
356 _eglInitContext(_EGLContext *ctx, _EGLDisplay *dpy, _EGLConfig *conf,
367 _eglInitResource(&ctx->Resource, sizeof(*ctx), dpy);
368 ctx->ClientAPI = api;
369 ctx->Config = conf;
370 ctx->WindowRenderBuffer = EGL_NONE;
371 ctx->Profile = EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR;
373 ctx->ClientMajorVersion = 1; /* the default, per EGL spec */
374 ctx->ClientMinorVersion = 0;
375 ctx->Flags = 0;
376 ctx->Profile = EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR;
377 ctx->ResetNotificationStrategy = EGL_NO_RESET_NOTIFICATION_KHR;
379 err = _eglParseContextAttribList(ctx, dpy, attrib_list);
380 if (err == EGL_SUCCESS && ctx->Config) {
383 api_bit = _eglGetContextAPIBit(ctx);
384 if (!(ctx->Config->RenderableType & api_bit)) {
386 api_bit, ctx->Config->RenderableType);
398 _eglQueryContextRenderBuffer(_EGLContext *ctx)
400 _EGLSurface *surf = ctx->DrawSurface;
405 if (surf->Type == EGL_WINDOW_BIT && ctx->WindowRenderBuffer != EGL_NONE)
406 rb = ctx->WindowRenderBuffer;
452 _eglBindContextToThread(_EGLContext *ctx, _EGLThreadInfo *t)
457 apiIndex = (ctx) ?
458 _eglConvertApiToIndex(ctx->ClientAPI) : t->CurrentAPIIndex;
461 if (ctx != oldCtx) {
464 if (ctx)
465 ctx->Binding = t;
467 t->CurrentContexts[apiIndex] = ctx;
478 _eglCheckMakeCurrent(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read)
488 if (!ctx) {
494 dpy = ctx->Resource.Display;
502 * "If ctx is current to some other thread, or if either draw or read are
511 if (ctx->Binding && ctx->Binding != t)
513 if (draw && draw->CurrentContext && draw->CurrentContext != ctx) {
515 draw->CurrentContext->ClientAPI != ctx->ClientAPI)
518 if (read && read->CurrentContext && read->CurrentContext != ctx) {
520 read->CurrentContext->ClientAPI != ctx->ClientAPI)
525 if ((draw && draw->Config != ctx->Config) ||
526 (read && read->Config != ctx->Config))
529 switch (ctx->ClientAPI) {
559 _eglBindContext(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read,
567 if (!_eglCheckMakeCurrent(ctx, draw, read))
571 _eglGetContext(ctx);
576 prev_ctx = _eglBindContextToThread(ctx, t);
596 if (ctx) {
598 draw->CurrentContext = ctx;
600 read->CurrentContext = ctx;
602 ctx->DrawSurface = draw;
603 ctx->ReadSurface = read;