diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/r600/r700_state.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c index 1da31e7b2b4..ac64bbf874f 100644 --- a/src/mesa/drivers/dri/r600/r700_state.c +++ b/src/mesa/drivers/dri/r600/r700_state.c @@ -253,12 +253,15 @@ void r700UpdateShaderStates(GLcontext * ctx) static void r700SetDepthState(GLcontext * ctx) { + struct radeon_renderbuffer *rrb; context_t *context = R700_CONTEXT(ctx); R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw); R600_STATECHANGE(context, db); - if (ctx->Depth.Test) + rrb = radeon_get_depthbuffer(&context->radeon); + + if (ctx->Depth.Test && rrb && rrb->bo) { SETbit(r700->DB_DEPTH_CONTROL.u32All, Z_ENABLE_bit); if (ctx->Depth.Mask) |