#include "sp_context.h"
#include "sp_surface.h"
#include "sp_state.h"
-//#include "colormac.h"
+#include "sp_tile_cache.h"
/**
unsigned clearValue)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
- int x, y, w, h;
softpipe_update_derived(softpipe); /* not needed?? */
- x = 0;
- y = 0;
- w = softpipe->framebuffer.cbufs[0]->width;
- h = softpipe->framebuffer.cbufs[0]->height;
+ if (ps == sp_tile_cache_get_surface(softpipe, softpipe->zbuf_cache)) {
+ float clear[4];
+ clear[0] = 1.0; /* XXX hack */
+ sp_tile_cache_clear(softpipe->zbuf_cache, clear);
+ }
+ else if (ps == sp_tile_cache_get_surface(softpipe, softpipe->cbuf_cache[0])) {
+ float clear[4];
+ clear[0] = 0.2f; /* XXX hack */
+ clear[1] = 0.2f; /* XXX hack */
+ clear[2] = 0.2f; /* XXX hack */
+ clear[3] = 0.2f; /* XXX hack */
+ sp_tile_cache_clear(softpipe->cbuf_cache[0], clear);
+ }
- pipe->region_fill(pipe, ps->region, 0, x, y, w, h, clearValue);
+ pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, clearValue);
+
+
+#if 0
+ sp_clear_tile_cache(ps, clearValue);
+#endif
}