gallium: check if surface has defined status in check_clear_depth_with_quad()

This was part of Keith's patch from Friday.
This commit is contained in:
Brian 2008-01-28 09:23:29 -07:00 committed by Ben Skeggs
parent af2ccd4c0c
commit 72b671bd39

View file

@ -408,7 +408,9 @@ check_clear_depth_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
const struct st_renderbuffer *strb = st_renderbuffer(rb);
const GLboolean isDS = is_depth_stencil_format(strb->surface->format);
return ctx->Scissor.Enabled
|| (isDS && ctx->DrawBuffer->Visual.stencilBits > 0);
|| (isDS &&
strb->surface->status == PIPE_SURFACE_STATUS_DEFINED &&
ctx->DrawBuffer->Visual.stencilBits > 0);
}