summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_atom_depth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_atom_depth.c')
-rw-r--r--src/mesa/state_tracker/st_atom_depth.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_depth.c b/src/mesa/state_tracker/st_atom_depth.c
index a1523e06c2..7fc51953dc 100644
--- a/src/mesa/state_tracker/st_atom_depth.c
+++ b/src/mesa/state_tracker/st_atom_depth.c
@@ -71,6 +71,10 @@ update_depth( struct st_context *st )
depth.func = gl_depth_func_to_sp(st->ctx->Depth.Func);
depth.clear = st->ctx->Depth.Clear;
+ if (st->ctx->Query.CurrentOcclusionObject &&
+ st->ctx->Query.CurrentOcclusionObject->Active)
+ depth.occlusion_count = 1;
+
if (memcmp(&depth, &st->state.depth, sizeof(depth)) != 0) {
/* state has changed */
st->state.depth = depth; /* struct copy */