ws/i965: add load-time driver registration
authorKeith Whitwell <keithw@vmware.com>
Wed, 4 Nov 2009 14:03:25 +0000 (14:03 +0000)
committerKeith Whitwell <keithw@vmware.com>
Wed, 4 Nov 2009 14:03:25 +0000 (14:03 +0000)
Otherwise xlib state-tracker doesn't know about us.

src/gallium/winsys/drm/i965/xlib/xlib_i965.c

index c55ba6b51994c147b9da02cc13559a2401502229..4d4bc0cb30b64e342a9d8b2855edc63d481ee302 100644 (file)
@@ -360,6 +360,13 @@ struct xm_driver xlib_i965_driver =
 };
 
 
+/* Register this driver at library load: 
+ */
+static void _init( void ) __attribute__((constructor));
+static void _init( void )
+{
+   xmesa_set_driver( &xlib_i965_driver );
+}