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_rast_priv.h | |
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_rast_priv.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_rast_priv.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_priv.h b/src/gallium/drivers/llvmpipe/lp_rast_priv.h index 6f03023eafe..30489407cdf 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast_priv.h +++ b/src/gallium/drivers/llvmpipe/lp_rast_priv.h @@ -99,8 +99,8 @@ struct lp_rasterizer_task /* occlude counter for visible pixels */ struct lp_jit_thread_data thread_data; - uint64_t query_start; struct llvmpipe_query *query[PIPE_QUERY_TYPES]; + uint64_t ps_invocations; pipe_semaphore work_ready; pipe_semaphore work_done; @@ -307,6 +307,10 @@ lp_rast_shade_quads_all( struct lp_rasterizer_task *task, * allocated 4x4 blocks hence need to filter them out here. */ if ((x % TILE_SIZE) < task->width && (y % TILE_SIZE) < task->height) { + if (task->query[PIPE_QUERY_PIPELINE_STATISTICS]) { + /* not very accurate would need a popcount on the mask */ + task->ps_invocations++; + } /* run shader on 4x4 block */ BEGIN_JIT_CALL(state, task); variant->jit_function[RAST_WHOLE]( &state->jit_context, |