+ int i;
+
+ for (i = 0; extensions[i]; i++) {
+ /* No DRI2 support for swap_control at the moment, since SwapBuffers
+ * is done by the X server */
+ if (strcmp(extensions[i]->name, __DRI_SWAP_CONTROL) == 0) {
+ psc->swapControl = (__DRIswapControlExtension *) extensions[i];
+ __glXEnableDirectExtension(&psc->base, "GLX_SGI_swap_control");
+ __glXEnableDirectExtension(&psc->base, "GLX_MESA_swap_control");
+ }
+
+ if (strcmp(extensions[i]->name, __DRI_MEDIA_STREAM_COUNTER) == 0) {
+ psc->msc = (__DRImediaStreamCounterExtension *) extensions[i];
+ __glXEnableDirectExtension(&psc->base, "GLX_SGI_video_sync");
+ }
+
+ if (strcmp(extensions[i]->name, __DRI_COPY_SUB_BUFFER) == 0) {
+ psc->driCopySubBuffer = (__DRIcopySubBufferExtension *) extensions[i];
+ __glXEnableDirectExtension(&psc->base, "GLX_MESA_copy_sub_buffer");
+ }
+
+ if (strcmp(extensions[i]->name, __DRI_READ_DRAWABLE) == 0) {
+ __glXEnableDirectExtension(&psc->base, "GLX_SGI_make_current_read");
+ }
+ /* Ignore unknown extensions */
+ }
+}
+
+static const struct glx_screen_vtable dri_screen_vtable = {
+ .create_context = dri_create_context,
+ .create_context_attribs = NULL,
+ .query_renderer_integer = NULL,
+ .query_renderer_string = NULL,
+};
+
+static struct glx_screen *
+driCreateScreen(int screen, struct glx_display *priv)
+{
+ struct dri_display *pdp;