summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_atom_depth.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-02-27 09:45:41 -0700
committerBrian Paul <brianp@vmware.com>2009-02-27 10:08:46 -0700
commit026465b9b1aebab98b6d519b75fe96d0ca9f4f51 (patch)
tree44630a432fff437d4bdb66bded5b3d1d8a483012 /src/mesa/state_tracker/st_atom_depth.c
parent5fc74734d92f7e7ff3df693254986ba5d2b5e653 (diff)
gallium: fix state tracker's stencil buffer test
Need to check ctx->DrawBuffer->Visual.stencilBits not ctx->Visual.stencilBits because the later only applies to the window system buffers, not user-created FBOs. This, plus the previous commit, fixes progs/tests/fbotexture.c
Diffstat (limited to 'src/mesa/state_tracker/st_atom_depth.c')
-rw-r--r--src/mesa/state_tracker/st_atom_depth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom_depth.c b/src/mesa/state_tracker/st_atom_depth.c
index a6156df7ae..4ea62dda18 100644
--- a/src/mesa/state_tracker/st_atom_depth.c
+++ b/src/mesa/state_tracker/st_atom_depth.c
@@ -106,7 +106,7 @@ update_depth_stencil_alpha(struct st_context *st)
ctx->Query.CurrentOcclusionObject->Active)
dsa->depth.occlusion_count = 1;
- if (ctx->Stencil.Enabled && ctx->Visual.stencilBits > 0) {
+ if (ctx->Stencil.Enabled && ctx->DrawBuffer->Visual.stencilBits > 0) {
dsa->stencil[0].enabled = 1;
dsa->stencil[0].func = st_compare_func_to_pipe(ctx->Stencil.Function[0]);
dsa->stencil[0].fail_op = gl_stencil_op_to_pipe(ctx->Stencil.FailFunc[0]);