diff options
author | Keith Whitwell <[email protected]> | 2008-04-22 11:01:56 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2008-04-22 11:02:24 +0100 |
commit | d07ed9216cc7033fecb5bce661bbaf79189bb391 (patch) | |
tree | 8d376f94c382ba94b75432a0eae8173966881fa7 /src/gallium | |
parent | a5b87f249ef79b1a8d8b9dbe72879b7ac9eb133c (diff) |
xlib: implement SP_NO_RAST env var
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/winsys/xlib/xm_winsys.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gallium/winsys/xlib/xm_winsys.c b/src/gallium/winsys/xlib/xm_winsys.c index 9a20bdfb699..5a424d0ac7f 100644 --- a/src/gallium/winsys/xlib/xm_winsys.c +++ b/src/gallium/winsys/xlib/xm_winsys.c @@ -84,6 +84,7 @@ struct xmesa_surface struct pipe_surface surface; int tileSize; + boolean no_swap; }; @@ -252,6 +253,9 @@ xmesa_display_surface(XMesaBuffer b, const struct pipe_surface *surf) const struct xmesa_surface *xm_surf = xmesa_surface((struct pipe_surface *) surf); + if (xm_surf->no_swap) + return; + if (xm_surf->tileSize) { xmesa_display_surface_tiled(b, surf); return; @@ -529,6 +533,13 @@ static struct pipe_surface * xm_surface_alloc(struct pipe_winsys *ws) { struct xmesa_surface *xms = CALLOC_STRUCT(xmesa_surface); + static boolean no_swap = 0; + static boolean firsttime = 1; + + if (firsttime) { + no_swap = getenv("SP_NO_RAST") != NULL; + firsttime = 0; + } assert(ws); @@ -540,7 +551,9 @@ xm_surface_alloc(struct pipe_winsys *ws) xms->tileSize = 32; /** probably temporary */ } #endif - + + xms->no_swap = no_swap; + return &xms->surface; } |