summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_query.h
diff options
context:
space:
mode:
authorQicheng Christopher Li <chrisl@vmware.com>2010-05-06 11:45:42 -0600
committerBrian Paul <brianp@vmware.com>2010-05-06 11:45:45 -0600
commit86afe8250edaa2e6129c937a62a695f616c48d70 (patch)
treec3800f2b0ff2daf025865d4ab3003b9741041b7e /src/gallium/drivers/llvmpipe/lp_query.h
parentf587615e13cf55504c6060d4621506d65b608774 (diff)
llvmpipe: implement occlusion query
OpenGL occlusion queries work now. The Mesa demos, glean test and piglit tests all pass. A few enhancements are possible in the future. -Brian Signed-off-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_query.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_query.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_query.h b/src/gallium/drivers/llvmpipe/lp_query.h
index fa9fcd8713..721c41cb5c 100644
--- a/src/gallium/drivers/llvmpipe/lp_query.h
+++ b/src/gallium/drivers/llvmpipe/lp_query.h
@@ -1,6 +1,7 @@
/**************************************************************************
*
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2010 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -25,14 +26,33 @@
*
**************************************************************************/
-/* Author:
- * Keith Whitwell
+/* Authors:
+ * Keith Whitwell, Qicheng Christopher Li, Brian Paul
*/
#ifndef LP_QUERY_H
#define LP_QUERY_H
+#include <limits.h>
+#include "os/os_thread.h"
+#include "lp_limits.h"
+
+
struct llvmpipe_context;
+
+
+struct llvmpipe_query {
+ uint64_t count[LP_MAX_THREADS]; /**< a counter for each thread */
+ uint64_t result; /**< total of all counters */
+
+ pipe_mutex mutex;
+ unsigned num_tiles, tile_count;
+
+ boolean done;
+ boolean binned; /**< has this query been binned in the scene? */
+};
+
+
extern void llvmpipe_init_query_funcs(struct llvmpipe_context * );