summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/xlib
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2010-03-09 15:25:42 +0000
committerKeith Whitwell <[email protected]>2010-03-09 15:33:21 +0000
commit3c57c01a44c294e69d902207b2ec94d28a397a51 (patch)
tree9f5d0ef67957185193699d18a7cb27ac7d2be7f4 /src/gallium/winsys/xlib
parent27a7f9454f190ebb51834e9d2d74c55766cbb29f (diff)
ws/xlib: remove self-knowledge about users of xlib winsys
Several software rasterizers can make use of this winsys, but there isn't any reason why the winsys itself should know about them. This change moves that information into the libgl-xlib target. Need to fix up other targets making use of this winsys.
Diffstat (limited to 'src/gallium/winsys/xlib')
-rw-r--r--src/gallium/winsys/xlib/Makefile6
-rw-r--r--src/gallium/winsys/xlib/SConscript3
-rw-r--r--src/gallium/winsys/xlib/xlib.c49
-rw-r--r--src/gallium/winsys/xlib/xlib.h18
-rw-r--r--src/gallium/winsys/xlib/xlib_cell.c95
-rw-r--r--src/gallium/winsys/xlib/xlib_llvmpipe.c79
-rw-r--r--src/gallium/winsys/xlib/xlib_softpipe.c68
-rw-r--r--src/gallium/winsys/xlib/xlib_sw_winsys.c4
8 files changed, 2 insertions, 320 deletions
diff --git a/src/gallium/winsys/xlib/Makefile b/src/gallium/winsys/xlib/Makefile
index bb631b16cea..68542b488df 100644
--- a/src/gallium/winsys/xlib/Makefile
+++ b/src/gallium/winsys/xlib/Makefile
@@ -9,11 +9,7 @@ LIBRARY_INCLUDES = \
-I$(TOP)/src/gallium/auxiliary
C_SOURCES = \
- xlib.c \
- xlib_cell.c \
- xlib_sw_winsys.c \
- xlib_llvmpipe.c \
- xlib_softpipe.c
+ xlib_sw_winsys.c
include ../../Makefile.template
diff --git a/src/gallium/winsys/xlib/SConscript b/src/gallium/winsys/xlib/SConscript
index 1a1879f1287..d4009df9916 100644
--- a/src/gallium/winsys/xlib/SConscript
+++ b/src/gallium/winsys/xlib/SConscript
@@ -18,9 +18,6 @@ if env['platform'] == 'linux' \
ws_xlib = env.ConvenienceLibrary(
target = 'ws_xlib',
source = [
- 'xlib_cell.c',
- 'xlib_llvmpipe.c',
- 'xlib_softpipe.c',
'xlib_sw_winsys.c',
]
)
diff --git a/src/gallium/winsys/xlib/xlib.c b/src/gallium/winsys/xlib/xlib.c
deleted file mode 100644
index 6ca9e362e72..00000000000
--- a/src/gallium/winsys/xlib/xlib.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/**************************************************************************
- *
- * Copyright 2007 Tungsten Graphics, Inc., Bismarck, ND., USA
- * 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 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
- * THE COPYRIGHT HOLDERS, AUTHORS 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.
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- *
- **************************************************************************/
-
-/*
- * Authors:
- * Keith Whitwell
- */
-
-#include "xlib.h"
-#include "util/u_debug.h"
-
-struct xm_driver *xlib_sw_winsys_init( void )
-{
-#if defined(GALLIUM_CELL)
- if (!getenv("GALLIUM_NOCELL"))
- return &xlib_cell_driver;
-#endif
-
-#if defined(GALLIUM_LLVMPIPE)
- return &xlib_llvmpipe_driver;
-#endif
-
- return &xlib_softpipe_driver;
-}
diff --git a/src/gallium/winsys/xlib/xlib.h b/src/gallium/winsys/xlib/xlib.h
deleted file mode 100644
index 3c200486168..00000000000
--- a/src/gallium/winsys/xlib/xlib.h
+++ /dev/null
@@ -1,18 +0,0 @@
-
-#ifndef XLIB_H
-#define XLIB_H
-
-#include "pipe/p_compiler.h"
-#include "state_tracker/xlib_sw_winsys.h"
-
-extern struct xm_driver xlib_softpipe_driver;
-extern struct xm_driver xlib_llvmpipe_driver;
-extern struct xm_driver xlib_cell_driver;
-
-struct sw_winsys *xlib_create_sw_winsys( Display *display );
-
-void xlib_sw_display(struct xlib_drawable *xm_buffer,
- struct sw_displaytarget *dt);
-
-
-#endif
diff --git a/src/gallium/winsys/xlib/xlib_cell.c b/src/gallium/winsys/xlib/xlib_cell.c
deleted file mode 100644
index d943953bd1a..00000000000
--- a/src/gallium/winsys/xlib/xlib_cell.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/**************************************************************************
- *
- * Copyright 2007 Tungsten Graphics, Inc., Bismarck, ND., USA
- * 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 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
- * THE COPYRIGHT HOLDERS, AUTHORS 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.
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- *
- **************************************************************************/
-
-/*
- * Authors:
- * Keith Whitwell
- * Brian Paul
- */
-
-
-#include "xlib.h"
-
-#if defined(GALLIUM_CELL)
-
-#include "cell/ppu/cell_texture.h"
-#include "cell/ppu/cell_screen.h"
-#include "state_tracker/sw_winsys.h"
-#include "util/u_debug.h"
-
-
-/**
- * Display/copy the image in the surface into the X window specified
- * by the XMesaBuffer.
- */
-static void
-xm_cell_displaytarget_display(struct sw_winsys *ws,
- struct sw_displaytarget *dt,
- void *context_private)
-{
- struct xlib_drawable *xlib_drawable = (struct xlib_drawable *)context_private;
- xlib_sw_display(xlib_drawable, dt);
-}
-
-
-static struct pipe_screen *
-xlib_create_cell_screen( Display *dpy )
-{
- struct sw_winsys *winsys;
- struct pipe_screen *screen;
-
- winsys = xlib_create_sw_winsys( dpy );
- if (winsys == NULL)
- return NULL;
-
- /* Plug in a little cell-specific code:
- */
-
- winsys->displaytarget_display = xm_cell_displaytarget_display;
-
- screen = cell_create_screen(winsys);
- if (screen == NULL)
- goto fail;
-
- return screen;
-
-fail:
- if (winsys)
- winsys->destroy( winsys );
-
- return NULL;
-}
-
-
-struct xm_driver xlib_cell_driver =
-{
- .create_pipe_screen = xlib_create_cell_screen,
-};
-
-
-#endif /* GALLIUM_CELL */
diff --git a/src/gallium/winsys/xlib/xlib_llvmpipe.c b/src/gallium/winsys/xlib/xlib_llvmpipe.c
deleted file mode 100644
index 8b66b7459d9..00000000000
--- a/src/gallium/winsys/xlib/xlib_llvmpipe.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/**************************************************************************
- *
- * Copyright 2007 Tungsten Graphics, Inc., Bismarck, ND., USA
- * 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 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
- * THE COPYRIGHT HOLDERS, AUTHORS 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.
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- *
- **************************************************************************/
-
-/*
- * Authors:
- * Keith Whitwell
- * Brian Paul
- */
-
-
-
-
-#include "xlib.h"
-
-
-#if defined(GALLIUM_LLVMPIPE)
-
-#include "llvmpipe/lp_texture.h"
-#include "llvmpipe/lp_screen.h"
-#include "state_tracker/xlib_sw_winsys.h"
-#include "util/u_debug.h"
-
-static struct pipe_screen *
-xlib_create_llvmpipe_screen( Display *display )
-{
- struct sw_winsys *winsys;
- struct pipe_screen *screen;
-
- winsys = xlib_create_sw_winsys( display );
- if (winsys == NULL)
- return NULL;
-
- screen = llvmpipe_create_screen(winsys);
- if (screen == NULL)
- goto fail;
-
- return screen;
-
-fail:
- if (winsys)
- winsys->destroy( winsys );
-
- return NULL;
-}
-
-
-struct xm_driver xlib_llvmpipe_driver =
-{
- .create_pipe_screen = xlib_create_llvmpipe_screen,
-};
-
-
-
-#endif /* GALLIUM_LLVMPIPE */
diff --git a/src/gallium/winsys/xlib/xlib_softpipe.c b/src/gallium/winsys/xlib/xlib_softpipe.c
deleted file mode 100644
index 08b7f08837f..00000000000
--- a/src/gallium/winsys/xlib/xlib_softpipe.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/**************************************************************************
- *
- * Copyright 2007 Tungsten Graphics, Inc., Bismarck, ND., USA
- * 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 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
- * THE COPYRIGHT HOLDERS, AUTHORS 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.
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- *
- **************************************************************************/
-
-
-#include "xlib.h"
-#include "softpipe/sp_texture.h"
-#include "softpipe/sp_screen.h"
-#include "state_tracker/xlib_sw_winsys.h"
-#include "util/u_debug.h"
-
-static struct pipe_screen *
-xlib_create_softpipe_screen( Display *display )
-{
- struct sw_winsys *winsys;
- struct pipe_screen *screen;
-
- winsys = xlib_create_sw_winsys( display );
- if (winsys == NULL)
- return NULL;
-
- screen = softpipe_create_screen(winsys);
- if (screen == NULL)
- goto fail;
-
- return screen;
-
-fail:
- if (winsys)
- winsys->destroy( winsys );
-
- return NULL;
-}
-
-
-
-
-struct xm_driver xlib_softpipe_driver =
-{
- .create_pipe_screen = xlib_create_softpipe_screen,
-};
-
-
-
diff --git a/src/gallium/winsys/xlib/xlib_sw_winsys.c b/src/gallium/winsys/xlib/xlib_sw_winsys.c
index d03e39a2495..0ee589943e4 100644
--- a/src/gallium/winsys/xlib/xlib_sw_winsys.c
+++ b/src/gallium/winsys/xlib/xlib_sw_winsys.c
@@ -47,8 +47,6 @@
#include "state_tracker/xlib_sw_winsys.h"
-#include "xlib.h"
-
#include <X11/Xlib.h>
#include <X11/Xlibint.h>
#include <X11/Xutil.h>
@@ -274,7 +272,7 @@ xm_displaytarget_destroy(struct sw_winsys *ws,
* Display/copy the image in the surface into the X window specified
* by the XMesaBuffer.
*/
-void
+static void
xlib_sw_display(struct xlib_drawable *xlib_drawable,
struct sw_displaytarget *dt)
{