[Mesa-dev] [PATCH 11/14] mesa: don't flag _NEW_DEPTH in Begin/EndQuery if driver implements the functions
Marek Olšák
maraeo at gmail.com
Mon Apr 15 06:17:36 PDT 2013
We don't want to set the flag for Gallium.
I think only swrast needs the flag to be set for occlusion queries.
---
src/mesa/main/queryobj.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index f0db740..29ab149 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -76,7 +76,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 */
}
@@ -87,6 +87,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;
}
@@ -315,7 +316,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) {
@@ -392,7 +393,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) {
--
1.7.10.4
More information about the mesa-dev
mailing list