diff --git a/src/gallium/frontends/glx/xlib/xm_api.c b/src/gallium/frontends/glx/xlib/xm_api.c index 6827bd26cc1..62a774adfa5 100644 --- a/src/gallium/frontends/glx/xlib/xm_api.c +++ b/src/gallium/frontends/glx/xlib/xm_api.c @@ -73,15 +73,10 @@ #include "main/errors.h" #include "main/mtypes.h" -#include "xm_public.h" #include - -/* Driver interface routines, set up by xlib backend on library - * _init(). These are global in the same way that function names are - * global. - */ -static struct xm_driver driver; +extern struct pipe_screen * +xlib_create_screen(Display *display); /* Default strict invalidate to false. This means we will not call * XGetGeometry after every swapbuffers, which allows swapbuffers to @@ -111,12 +106,6 @@ xmesa_strict_invalidate(void) return debug_get_option_xmesa_strict_invalidate(); } -void xmesa_set_driver( const struct xm_driver *templ ) -{ - driver = *templ; -} - - static int xmesa_get_param(struct st_manager *smapi, enum st_manager_param param) @@ -245,7 +234,7 @@ xmesa_init_display( Display *display ) return NULL; } - xmdpy->screen = driver.create_pipe_screen(display); + xmdpy->screen = xlib_create_screen(display); if (!xmdpy->screen) { free(xmdpy->smapi); Xfree(info); diff --git a/src/gallium/frontends/glx/xlib/xm_public.h b/src/gallium/frontends/glx/xlib/xm_public.h deleted file mode 100644 index df40c9ef1f4..00000000000 --- a/src/gallium/frontends/glx/xlib/xm_public.h +++ /dev/null @@ -1,46 +0,0 @@ - -/************************************************************************** - * - * Copyright 2006 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef XM_PUBLIC_H -#define XM_PUBLIC_H - -#include - -struct pipe_screen; - -/* This is the driver interface required by the glx/xlib frontends. - */ -struct xm_driver { - struct pipe_screen *(*create_pipe_screen)( Display *display ); -}; - -extern void -xmesa_set_driver( const struct xm_driver *driver ); - - -#endif /* XM_PUBLIC_H */ diff --git a/src/gallium/targets/libgl-xlib/xlib.c b/src/gallium/targets/libgl-xlib/xlib.c index 967b1f44f07..4515b7682d4 100644 --- a/src/gallium/targets/libgl-xlib/xlib.c +++ b/src/gallium/targets/libgl-xlib/xlib.c @@ -33,7 +33,6 @@ #include "pipe/p_compiler.h" #include "util/u_debug.h" #include "sw/xlib/xlib_sw_winsys.h" -#include "xm_public.h" #include "target-helpers/inline_sw_helper.h" #include "target-helpers/inline_debug_helper.h" @@ -44,8 +43,11 @@ * one of the software rasterizers (llvmpipe, softpipe) and the * xlib winsys. */ -static struct pipe_screen * -swrast_xlib_create_screen( Display *display ) +struct pipe_screen * +xlib_create_screen( Display *display ); + +struct pipe_screen * +xlib_create_screen( Display *display ) { struct sw_winsys *winsys; struct pipe_screen *screen = NULL; @@ -74,18 +76,3 @@ fail: return NULL; } -static struct xm_driver xlib_driver = -{ - .create_pipe_screen = swrast_xlib_create_screen, -}; - - -/* Build the rendering stack. - */ -static void _init( void ) __attribute__((constructor)); -static void _init( void ) -{ - /* Initialize the xlib libgl code, pass in the winsys: - */ - xmesa_set_driver( &xlib_driver ); -}