summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe/sp_clear.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-09-19 15:05:51 +0100
committerDave Airlie <[email protected]>2011-10-11 16:13:29 +0100
commit396ac41fc285f0d7c8545f2b32ba373693a7a326 (patch)
tree87d0cf64099675219014c5f5a0466e97cc4a089d /src/gallium/drivers/softpipe/sp_clear.c
parent866f9b18c68ede63c00917ec9c3dae3524ca8826 (diff)
softpipe: add integer support
This adds support to the clear and tile caches for integer storage and clearing, avoiding any floating paths. Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_clear.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_clear.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/softpipe/sp_clear.c b/src/gallium/drivers/softpipe/sp_clear.c
index bfb16be82ac..3cb3b72c264 100644
--- a/src/gallium/drivers/softpipe/sp_clear.c
+++ b/src/gallium/drivers/softpipe/sp_clear.c
@@ -68,17 +68,16 @@ softpipe_clear(struct pipe_context *pipe, unsigned buffers,
for (i = 0; i < softpipe->framebuffer.nr_cbufs; i++) {
struct pipe_surface *ps = softpipe->framebuffer.cbufs[i];
- util_pack_color(color->f, ps->format, &uc);
- sp_tile_cache_clear(softpipe->cbuf_cache[i], color->f, uc.ui);
+ sp_tile_cache_clear(softpipe->cbuf_cache[i], color, 0);
}
}
if (buffers & PIPE_CLEAR_DEPTHSTENCIL) {
- static const float zero[4] = { 0.0F, 0.0F, 0.0F, 0.0F };
+ static const union pipe_color_union zero;
struct pipe_surface *ps = softpipe->framebuffer.zsbuf;
cv = util_pack_z_stencil(ps->format, depth, stencil);
- sp_tile_cache_clear(softpipe->zsbuf_cache, zero, cv);
+ sp_tile_cache_clear(softpipe->zsbuf_cache, &zero, cv);
}
softpipe->dirty_render_cache = TRUE;