summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r300/r300_blit.c3
-rw-r--r--src/gallium/drivers/r600/r600_blit.c6
2 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index f0743d503d0..d1ccde1a9cb 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -292,13 +292,14 @@ static void r300_clear(struct pipe_context* pipe,
/* Clear. */
if (buffers) {
+ enum pipe_format cformat = fb->nr_cbufs ? fb->cbufs[0]->format : PIPE_FORMAT_NONE;
/* Clear using the blitter. */
r300_blitter_begin(r300, R300_CLEAR);
util_blitter_clear(r300->blitter,
width,
height,
fb->nr_cbufs,
- buffers, color, depth, stencil);
+ buffers, cformat, color, depth, stencil);
r300_blitter_end(r300);
} else if (r300->zmask_clear.dirty || r300->hiz_clear.dirty) {
/* Just clear zmask and hiz now, this does not use the standard draw
diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c
index dfc43feb5d9..28e0e3c613a 100644
--- a/src/gallium/drivers/r600/r600_blit.c
+++ b/src/gallium/drivers/r600/r600_blit.c
@@ -205,11 +205,11 @@ static void r600_clear(struct pipe_context *ctx, unsigned buffers,
{
struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
struct pipe_framebuffer_state *fb = &rctx->framebuffer;
-
+
r600_blitter_begin(ctx, R600_CLEAR);
util_blitter_clear(rctx->blitter, fb->width, fb->height,
- fb->nr_cbufs, buffers, color, depth,
- stencil);
+ fb->nr_cbufs, buffers, fb->nr_cbufs ? fb->cbufs[0]->format : PIPE_FORMAT_NONE,
+ color, depth, stencil);
r600_blitter_end(ctx);
}