mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 00:30:11 +01:00
xlib: implement SP_NO_RAST env var
This commit is contained in:
parent
a5b87f249e
commit
d07ed9216c
1 changed files with 14 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue