aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/util/u_inlines.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-10 10:49:59 +0200
committermarha <marha@users.sourceforge.net>2012-04-10 10:49:59 +0200
commitc6f80401dc533b04341afe8d596960d1bc25efce (patch)
tree2826007946218a8370d2eebc6aa32083618e2bfe /mesalib/src/gallium/auxiliary/util/u_inlines.h
parent31706e67674f308e3e7f2a8aaf02f1e0a00fbade (diff)
downloadvcxsrv-c6f80401dc533b04341afe8d596960d1bc25efce.tar.gz
vcxsrv-c6f80401dc533b04341afe8d596960d1bc25efce.tar.bz2
vcxsrv-c6f80401dc533b04341afe8d596960d1bc25efce.zip
fontconfig mesa xkeyboard-config xserver pixman git update 10 Apr 2012
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_inlines.h')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_inlines.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_inlines.h b/mesalib/src/gallium/auxiliary/util/u_inlines.h
index 2fe680ff4..23658bc88 100644
--- a/mesalib/src/gallium/auxiliary/util/u_inlines.h
+++ b/mesalib/src/gallium/auxiliary/util/u_inlines.h
@@ -494,6 +494,36 @@ util_get_min_point_size(const struct pipe_rasterizer_state *state)
!state->multisample ? 1.0f : 0.0f;
}
+static INLINE void
+util_query_clear_result(union pipe_query_result *result, unsigned type)
+{
+ switch (type) {
+ case PIPE_QUERY_OCCLUSION_PREDICATE:
+ case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
+ case PIPE_QUERY_GPU_FINISHED:
+ result->b = FALSE;
+ break;
+ case PIPE_QUERY_OCCLUSION_COUNTER:
+ case PIPE_QUERY_TIMESTAMP:
+ case PIPE_QUERY_TIME_ELAPSED:
+ case PIPE_QUERY_PRIMITIVES_GENERATED:
+ case PIPE_QUERY_PRIMITIVES_EMITTED:
+ result->u64 = 0;
+ break;
+ case PIPE_QUERY_SO_STATISTICS:
+ memset(&result->so_statistics, 0, sizeof(result->so_statistics));
+ break;
+ case PIPE_QUERY_TIMESTAMP_DISJOINT:
+ memset(&result->timestamp_disjoint, 0, sizeof(result->timestamp_disjoint));
+ break;
+ case PIPE_QUERY_PIPELINE_STATISTICS:
+ memset(&result->pipeline_statistics, 0, sizeof(result->pipeline_statistics));
+ break;
+ default:
+ assert(0);
+ }
+}
+
#ifdef __cplusplus
}
#endif