summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/queryobj.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2013-04-15 03:41:43 +0200
committerMarek Olšák <[email protected]>2013-04-24 03:23:23 +0200
commit43dac2700ca05bc773b3fd84fab6f8c1f83079d6 (patch)
tree97679d9508f6302b5f41b99520ba12ea09a8b7da /src/mesa/main/queryobj.c
parent629813d9de4a5fc494f8ab172a27240960628780 (diff)
mesa: don't flag _NEW_DEPTH in Begin/EndQuery if driver implements the functions
We don't want to set the flag for Gallium. I think only swrast needs the flag to be set for occlusion queries. v2: fix stats_wm updates in i965 Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/queryobj.c')
-rw-r--r--src/mesa/main/queryobj.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index 1ea2eb1f48d..f0c00974d8f 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -75,7 +75,7 @@ _mesa_new_query_object(struct gl_context *ctx, GLuint id)
static void
_mesa_begin_query(struct gl_context *ctx, struct gl_query_object *q)
{
- /* no-op */
+ ctx->NewState |= _NEW_DEPTH; /* for swrast */
}
@@ -86,6 +86,7 @@ _mesa_begin_query(struct gl_context *ctx, struct gl_query_object *q)
static void
_mesa_end_query(struct gl_context *ctx, struct gl_query_object *q)
{
+ ctx->NewState |= _NEW_DEPTH; /* for swrast */
q->Ready = GL_TRUE;
}
@@ -314,7 +315,7 @@ _mesa_BeginQueryIndexed(GLenum target, GLuint index, GLuint id)
if (!query_error_check_index(ctx, target, index))
return;
- FLUSH_VERTICES(ctx, _NEW_DEPTH);
+ FLUSH_VERTICES(ctx, 0);
bindpt = get_query_binding_point(ctx, target);
if (!bindpt) {
@@ -391,7 +392,7 @@ _mesa_EndQueryIndexed(GLenum target, GLuint index)
if (!query_error_check_index(ctx, target, index))
return;
- FLUSH_VERTICES(ctx, _NEW_DEPTH);
+ FLUSH_VERTICES(ctx, 0);
bindpt = get_query_binding_point(ctx, target);
if (!bindpt) {