mesa/src/gallium/docs/source
Kenneth Graunke d644698b44 gallium: Add the ability to query a single pipeline statistics counter
Gallium historically has treated pipeline statistics queries as a single
query, PIPE_QUERY_PIPELINE_STATISTICS, which returns a block of 11
values.  This was originally patterned after the D3D1x API.  Much later,
Brian introduced an OpenGL extension that exposed these counters - but
it exposes 11 separate queries, each of which returns a single value.

Today, st/mesa simply queries all 11 values, and returns a single value.
While pipeline statistics counters aren't typically performance
critical, this is still not a great fit.  A D3D1x->GL translator might
request all 11 counters by creating 11 separate GL queries...which
Gallium would map to reads of all 11 values each time, resulting in a
total 121 counter reads.  That's not ideal.

This patch adds a new cap, PIPE_CAP_QUERY_PIPELINE_STATISTICS_SINGLE,
and corresponding query type PIPE_QUERY_PIPELINE_STATISTICS_SINGLE.
When calling create_query(), q->index should be set to one of the
PIPE_STAT_QUERY_* enums to select a counter.  Unlike the block query,
this returns the value in pipe_query_result::u64 (as it's a single
value) instead of the pipe_query_data_pipeline_statistics group.

We update st/mesa to expose ARB_pipeline_statistics_query if either
capability is set, preferring the new SINGLE variant when available.

Thanks to Roland, Ilia, and Marek for helping me sort this out.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2019-01-15 11:43:04 -08:00
..
cso gallium: add initial support for conservative rasterization 2018-04-30 21:13:53 -06:00
drivers swr: update gallium driver docs 2017-04-14 15:21:31 -05:00
exts gallium/docs: Add formatting for envvar role; change debugging. 2010-08-15 03:43:54 -07:00
conf.py gallium/docs: use imgmath instead of pngmath 2017-02-22 00:01:08 +00:00
context.rst gallium: Add the ability to query a single pipeline statistics counter 2019-01-15 11:43:04 -08:00
cso.rst Fill out some of the CSO info. 2009-12-20 16:40:39 -08:00
debugging.rst galahad: remove driver 2015-03-21 17:18:28 +00:00
distro.rst galahad: remove driver 2015-03-21 17:18:28 +00:00
drivers.rst gallium/docs: add some freedreno compiler docs 2015-03-08 17:42:43 -04:00
format.rst gallium/docs: add format to index 2014-04-01 10:17:13 -04:00
glossary.rst gallium: support for array textures and related changes 2010-12-02 04:33:43 +01:00
index.rst gallium/docs: add some freedreno compiler docs 2015-03-08 17:42:43 -04:00
intro.rst
pipeline.txt gallium/docs: added new pipeline.txt diagram 2010-09-17 18:50:47 -06:00
resources.rst gallium/docs: fix incorrect/missing references 2014-04-01 10:17:13 -04:00
screen.rst docs: fix gallium screen cap docs 2019-01-10 21:44:09 -05:00
tgsi.rst tgsi: add ATOMFADD operation 2018-12-26 20:04:57 -05:00