diff options
Diffstat (limited to 'src/gallium/drivers/r300/r300_blit.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_blit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c index cc9ea8a8e0d..05e55f3665e 100644 --- a/src/gallium/drivers/r300/r300_blit.c +++ b/src/gallium/drivers/r300/r300_blit.c @@ -130,7 +130,7 @@ static boolean r300_cbzb_clear_allowed(struct r300_context *r300, (struct pipe_framebuffer_state*)r300->fb_state.state; /* Only color clear allowed, and only one colorbuffer. */ - if ((clear_buffers & ~PIPE_CLEAR_COLOR) != 0 || fb->nr_cbufs != 1) + if ((clear_buffers & ~PIPE_CLEAR_COLOR) != 0 || fb->nr_cbufs != 1 || !fb->cbufs[0]) return FALSE; return r300_surface(fb->cbufs[0])->cbzb_allowed; @@ -313,7 +313,7 @@ static void r300_clear(struct pipe_context* pipe, /* Use fast color clear for an AA colorbuffer. * The CMASK is shared between all colorbuffers, so we use it * if there is only one colorbuffer bound. */ - if ((buffers & PIPE_CLEAR_COLOR) && fb->nr_cbufs == 1 && + if ((buffers & PIPE_CLEAR_COLOR) && fb->nr_cbufs == 1 && fb->cbufs[0] && r300_resource(fb->cbufs[0]->texture)->tex.cmask_dwords) { /* Try to obtain the access to the CMASK if we don't have one. */ if (!r300->cmask_access) { |