summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_setup_point.c
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2013-06-26 23:11:03 +0200
committerRoland Scheidegger <sroland@vmware.com>2013-06-26 23:17:53 +0200
commit2e4da1f59444c550e4b1e31dd5cfec39d7ef2a26 (patch)
treed87e8968c3f791cfb6eba87daa4860c6ac90d603 /src/gallium/drivers/llvmpipe/lp_setup_point.c
parent08203428800554215657f1ebf19d74328103800e (diff)
downloadexternal_mesa3d-2e4da1f59444c550e4b1e31dd5cfec39d7ef2a26.zip
external_mesa3d-2e4da1f59444c550e4b1e31dd5cfec39d7ef2a26.tar.gz
external_mesa3d-2e4da1f59444c550e4b1e31dd5cfec39d7ef2a26.tar.bz2
llvmpipe: add support for nested / overlapping queries
OpenGL doesn't support this but d3d10 does. It is a bit of a pain as it is necessary to keep track of queries still active at the end of a scene, which is also why I cheat a bit and limit the amount of simultaneously active queries to (arbitrary) 16 (simplifies things because don't have to deal with a real list that way). I can't think of a reason why you'd really want large numbers of overlapping/nested queries so it is hopefully fine. (This only affects queries which need to be binned.) v2: don't copy remainder of array when deleting an entry simply replace the deleted entry with the last one (order doesn't matter). Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup_point.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_point.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_point.c b/src/gallium/drivers/llvmpipe/lp_setup_point.c
index 7fe7bc5..868a9a9 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_point.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_point.c
@@ -303,6 +303,7 @@ static boolean
try_setup_point( struct lp_setup_context *setup,
const float (*v0)[4] )
{
+ struct llvmpipe_context *lp_context = (struct llvmpipe_context *)setup->pipe;
/* x/y positions in fixed point */
const struct lp_setup_variant_key *key = &setup->setup.variant->key;
const int sizeAttr = setup->psize;
@@ -379,8 +380,7 @@ try_setup_point( struct lp_setup_context *setup,
LP_COUNT(nr_tris);
- if (setup->active_query[PIPE_QUERY_PIPELINE_STATISTICS]) {
- struct llvmpipe_context *lp_context = (struct llvmpipe_context *)setup->pipe;
+ if (lp_context->active_statistics_queries) {
lp_context->pipeline_statistics.c_primitives++;
}