diff options
author | Brian Paul <[email protected]> | 2009-04-06 15:31:58 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-04-06 15:31:58 -0600 |
commit | f4d744af24e07103f0f297b485f3dbca1fb7bc3b (patch) | |
tree | b4d843742a65ff2739cdbe388703e64c623e17b1 /src/gallium/drivers/softpipe/sp_clear.c | |
parent | 87c356a222bb97ecf9b04e8d509b103199159b11 (diff) |
softpipe: clean up the buffer clear and tile cache code a little
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_clear.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_clear.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_clear.c b/src/gallium/drivers/softpipe/sp_clear.c index f72c6c63e76..fa59277438c 100644 --- a/src/gallium/drivers/softpipe/sp_clear.c +++ b/src/gallium/drivers/softpipe/sp_clear.c @@ -65,7 +65,7 @@ softpipe_clear(struct pipe_context *pipe, unsigned buffers, const float *rgba, struct pipe_surface *ps = softpipe->framebuffer.cbufs[i]; util_pack_color(rgba, ps->format, &cv); - sp_tile_cache_clear(softpipe->cbuf_cache[i], cv); + sp_tile_cache_clear(softpipe->cbuf_cache[i], rgba, cv); #if !TILE_CLEAR_OPTIMIZATION /* non-cached surface */ @@ -75,10 +75,11 @@ softpipe_clear(struct pipe_context *pipe, unsigned buffers, const float *rgba, } if (buffers & PIPE_CLEAR_DEPTHSTENCIL) { + static const float zero[4] = { 0.0F, 0.0F, 0.0F, 0.0F }; struct pipe_surface *ps = softpipe->framebuffer.zsbuf; cv = util_pack_z_stencil(ps->format, depth, stencil); - sp_tile_cache_clear(softpipe->zsbuf_cache, cv); + sp_tile_cache_clear(softpipe->zsbuf_cache, zero, cv); #if !TILE_CLEAR_OPTIMIZATION /* non-cached surface */ |