diff options
author | Roland Scheidegger <[email protected]> | 2013-06-19 23:38:39 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2013-06-19 23:47:36 +0200 |
commit | dc5dc4fd943e1da5207e0489c355e9a7ba1dff87 (patch) | |
tree | 04d6ea5c393f3e8826f9d6c3515a774656a20f83 /src/gallium/drivers/llvmpipe/lp_setup_point.c | |
parent | bf5096303f1696dcfe07cebf169f66daa8af2645 (diff) |
llvmpipe: handle more queries
Handle PIPE_QUERY_GPU_FINISHED and PIPE_QUERY_TIMESTAMP_DISJOINT, and
also fill out the ps_invocations and c_primitives from the
PIPE_QUERY_PIPELINE_STATISTICS (the others in there should already
be handled). Note that ps_invocations isn't pixel exact, just 16 pixel
exact but I guess it's better than nothing.
Doesn't really seem to work correctly but there's probably bugs elsewhere.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup_point.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup_point.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_point.c b/src/gallium/drivers/llvmpipe/lp_setup_point.c index 789caa80761..7fe7bc56d2b 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_point.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_point.c @@ -29,13 +29,14 @@ * Binning code for points */ -#include "lp_setup_context.h" #include "util/u_math.h" #include "util/u_memory.h" +#include "lp_setup_context.h" #include "lp_perf.h" #include "lp_rast.h" #include "lp_state_fs.h" #include "lp_state_setup.h" +#include "lp_context.h" #include "tgsi/tgsi_scan.h" #define NUM_CHANNELS 4 @@ -376,6 +377,13 @@ try_setup_point( struct lp_setup_context *setup, point->v[0][1] = v0[0][1]; #endif + LP_COUNT(nr_tris); + + if (setup->active_query[PIPE_QUERY_PIPELINE_STATISTICS]) { + struct llvmpipe_context *lp_context = (struct llvmpipe_context *)setup->pipe; + lp_context->pipeline_statistics.c_primitives++; + } + info.v0 = v0; info.dx01 = 0; info.dx12 = fixed_width; |