TODO: glx: meson: build dri based glx tests, only with -Dglx=dri
[mesa.git] / src / glx / create_context.c
index 41f08057a8dc1c80bcfdadc98d36b51016ea7351..38e949ab4cd94e09d4574710fdadac05a4328ce0 100644 (file)
@@ -80,8 +80,15 @@ glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config,
                                               &dummy_err);
    }
 
-   if (gc == NULL)
-      gc = indirect_create_context(psc, cfg, share, 0);
+   if (gc == NULL) {
+#ifdef GLX_USE_APPLEGL
+      gc = applegl_create_context(psc, cfg, share, 0);
+#else
+      gc = indirect_create_context_attribs(psc, cfg, share, num_attribs,
+              (const uint32_t *) attrib_list,
+              &dummy_err);
+#endif
+   }
 
    gc->xid = xcb_generate_id(c);
    gc->share_xid = (share != NULL) ? share->xid : 0;