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_line.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_line.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup_line.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_line.c b/src/gallium/drivers/llvmpipe/lp_setup_line.c index a9809a0ed12..4b59bf38692 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_line.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_line.c @@ -36,6 +36,7 @@ #include "lp_rast.h" #include "lp_state_fs.h" #include "lp_state_setup.h" +#include "lp_context.h" #define NUM_CHANNELS 4 @@ -541,11 +542,6 @@ try_setup_line( struct lp_setup_context *setup, y[3] = subpixel_snap(v1[0][1] + y_offset - setup->pixel_offset); } - - - LP_COUNT(nr_tris); - - /* Bounding rectangle (in pixels) */ { /* Yes this is necessary to accurately calculate bounding boxes @@ -598,6 +594,13 @@ try_setup_line( struct lp_setup_context *setup, line->v[1][1] = v2[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++; + } + /* calculate the deltas */ plane = GET_PLANES(line); plane[0].dcdy = x[0] - x[1]; |