summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-01-28 09:23:29 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-01-28 09:23:50 -0700
commit16ed55c6412d2bdc5bff78e99114490223fb4afe (patch)
tree952d00292213bdcea1d8b3886cda23b10179ef29 /src/mesa/state_tracker
parent82d9063708539d53c7670b2ab732bed24230b94d (diff)
gallium: check if surface has defined status in check_clear_depth_with_quad()
This was part of Keith's patch from Friday.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index 758d4a4086..0cd469c156 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -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);
}