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
parent 82d9063708
commit 16ed55c641
+3 -1
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);
}