aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-10-23 18:49:19 -0600
committerBrian <[email protected]>2007-10-24 12:32:42 -0600
commit76a4fd098f44ae4f226d4747b9fdaf9db5d40270 (patch)
treeb6892ce9414a71e1ef835619ab51278e3d8ac684 /src/mesa/drivers/x11
parentb78e90807abc31f58492992cdfe5e01bfd53e68b (diff)
a bit more work for optimizing clears in tile cache (not enabled yet)
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r--src/mesa/drivers/x11/xm_surface.c14
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);