summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2011-01-26 00:01:51 -0500
committerZack Rusin <[email protected]>2011-01-26 00:03:12 -0500
commit0657fc00dd9e69f71d679d480b5d5f4c33cfae35 (patch)
tree3215786daa5ba2552a193c1ea9a3d8586679f9ad /src/gallium
parent779e9cb658dba4ef44fae7e8aa62409f7227f46c (diff)
gallium: add an interface for query predicates
as specified in the arb_occlusion_query2. just the interface.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/docs/source/context.rst5
-rw-r--r--src/gallium/include/pipe/p_defines.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/docs/source/context.rst b/src/gallium/docs/source/context.rst
index 6760e7be4b9..f0d3b84783d 100644
--- a/src/gallium/docs/source/context.rst
+++ b/src/gallium/docs/source/context.rst
@@ -233,6 +233,11 @@ The most common type of query is the occlusion query,
are written to the framebuffer without being culled by
:ref:`Depth, Stencil, & Alpha` testing or shader KILL instructions.
The result is an unsigned 64-bit integer.
+In cases where a boolean result of an occlusion query is enough,
+``PIPE_QUERY_OCCLUSION_PREDICATE`` should be used. It is just like
+``PIPE_QUERY_OCCLUSION_COUNTER`` except that the result is a boolean
+value of FALSE for cases where COUNTER would result in 0 and TRUE
+for all other cases.
Another type of query, ``PIPE_QUERY_TIME_ELAPSED``, returns the amount of
time, in nanoseconds, the context takes to perform operations.
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 2135c19dcfc..f66bbaf6674 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -380,7 +380,8 @@ enum pipe_transfer_usage {
#define PIPE_QUERY_SO_STATISTICS 5
#define PIPE_QUERY_GPU_FINISHED 6
#define PIPE_QUERY_TIMESTAMP_DISJOINT 7
-#define PIPE_QUERY_TYPES 8
+#define PIPE_QUERY_OCCLUSION_PREDICATE 8
+#define PIPE_QUERY_TYPES 9
/**