From c474f1fb9088528af998168717783b52e5c2f0a2 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Tue, 11 Dec 2007 07:19:11 -0500 Subject: Port i965 driver to Gallium3D. This is a squashed commit of i965 branch on ssh://people.freedesktop.org/~zack/mesa Because of the porting the branch often didn't compile so squashing it makes more sense. The port is still far from complete. --- src/mesa/pipe/xlib/xm_winsys.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/mesa/pipe/xlib/xm_winsys.c') diff --git a/src/mesa/pipe/xlib/xm_winsys.c b/src/mesa/pipe/xlib/xm_winsys.c index ad31f4498e..a03c9835a5 100644 --- a/src/mesa/pipe/xlib/xm_winsys.c +++ b/src/mesa/pipe/xlib/xm_winsys.c @@ -46,6 +46,7 @@ #include "pipe/cell/ppu/cell_context.h" #include "pipe/cell/ppu/cell_winsys.h" #endif +#include "xm_winsys_aub.h" /** XXX from Mesa core */ @@ -468,12 +469,15 @@ xm_surface_release(struct pipe_winsys *winsys, struct pipe_surface **s) * For Xlib, this is a singleton object. * Nothing special for the Xlib driver so no subclassing or anything. */ -static struct pipe_winsys * -xmesa_get_pipe_winsys(void) +struct pipe_winsys * +xmesa_get_pipe_winsys_aub(void) { static struct pipe_winsys *ws = NULL; - if (!ws) { + if (!ws && getenv("XM_AUB")) { + ws = xmesa_create_pipe_winsys_aub(); + } + else if (!ws) { ws = CALLOC_STRUCT(pipe_winsys); /* Fill in this struct with callbacks that pipe will need to @@ -537,7 +541,7 @@ xmesa_get_softpipe_winsys(uint pixelformat) struct pipe_context * xmesa_create_pipe_context(XMesaContext xmesa, uint pixelformat) { - struct pipe_winsys *pws = xmesa_get_pipe_winsys(); + struct pipe_winsys *pws = xmesa_get_pipe_winsys_aub(); struct pipe_context *pipe; #ifdef GALLIUM_CELL -- cgit v1.2.3