summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-10-03 20:37:59 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2007-10-03 20:37:59 +0200
commite9df20c2fa7df8458a9f0781f31de51c4944d41f (patch)
treea043185a2c8b41f77defa4f6a1145cb01311d470 /src
parent86a03e43ced13e7c00f16d037b27faddfbcb2333 (diff)
Some minor cleanups.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index cca4fa19a9..a854378b18 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -264,7 +264,7 @@ clear_with_quad(GLcontext *ctx,
GLboolean color, GLboolean depth, GLboolean stencil)
{
struct st_context *st = ctx->st;
- struct pipe_context *pipe = ctx->st->pipe;
+ struct pipe_context *pipe = st->pipe;
const GLfloat x0 = ctx->DrawBuffer->_Xmin;
const GLfloat y0 = ctx->DrawBuffer->_Ymin;
const GLfloat x1 = ctx->DrawBuffer->_Xmax;
@@ -321,7 +321,7 @@ clear_with_quad(GLcontext *ctx,
depth_stencil.stencil.value_mask[0] = 0xff;
depth_stencil.stencil.write_mask[0] = ctx->Stencil.WriteMask[0] & 0xff;
}
- cso = st_cached_depth_stencil_state(ctx->st, &depth_stencil);
+ cso = st_cached_depth_stencil_state(st, &depth_stencil);
pipe->bind_depth_stencil_state(pipe, cso->data);
}
@@ -337,7 +337,7 @@ clear_with_quad(GLcontext *ctx,
if (ctx->Scissor.Enabled)
raster.scissor = 1;
#endif
- cso = st_cached_rasterizer_state(ctx->st, &raster);
+ cso = st_cached_rasterizer_state(st, &raster);
pipe->bind_rasterizer_state(pipe, cso->data);
}
@@ -385,7 +385,7 @@ clear_with_quad(GLcontext *ctx,
pipe->bind_fs_state(pipe, st->state.fs->data);
pipe->bind_vs_state(pipe, st->state.vs->data);
pipe->bind_rasterizer_state(pipe, st->state.rasterizer->data);
- pipe->set_viewport_state(pipe, &ctx->st->state.viewport);
+ pipe->set_viewport_state(pipe, &st->state.viewport);
/* OR:
st_invalidate_state(ctx, _NEW_COLOR | _NEW_DEPTH | _NEW_STENCIL);
*/
@@ -491,8 +491,7 @@ clear_depth_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
assert(strb->surface->format);
- if (ctx->Scissor.Enabled ||
- (isDS && ctx->DrawBuffer->Visual.stencilBits > 0)) {
+ if (check_clear_depth_with_quad(ctx, rb)) {
/* scissoring or we have a combined depth/stencil buffer */
clear_with_quad(ctx, GL_FALSE, GL_TRUE, GL_FALSE);
}