diff options
Diffstat (limited to 'src/mesa/drivers/x11/xm_surface.c')
-rw-r--r-- | src/mesa/drivers/x11/xm_surface.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/drivers/x11/xm_surface.c b/src/mesa/drivers/x11/xm_surface.c index b2ef70ea90d..f83c7917c4d 100644 --- a/src/mesa/drivers/x11/xm_surface.c +++ b/src/mesa/drivers/x11/xm_surface.c @@ -46,6 +46,7 @@ #include "pipe/p_defines.h" #include "pipe/softpipe/sp_context.h" #include "pipe/softpipe/sp_clear.h" +#include "pipe/softpipe/sp_tile_cache.h" #include "state_tracker/st_context.h" @@ -219,6 +220,19 @@ xmesa_clear(struct pipe_context *pipe, struct pipe_surface *ps, GLuint value) */ pipe->flush(pipe, 0); + { + struct softpipe_context *sp = softpipe_context(pipe); + struct softpipe_surface *sps = softpipe_surface(ps); + if (sps == sp_tile_cache_get_surface(sp->cbuf_cache[0])) { + float clear[4]; + clear[0] = 0.2; /* XXX hack */ + clear[1] = 0.2; + clear[2] = 0.2; + clear[3] = 0.2; + sp_tile_cache_clear(sp->cbuf_cache[0], clear); + } + } + if (xrb && xrb->ximage) { /* clearing back color buffer */ GET_CURRENT_CONTEXT(ctx); |