st/mesa: Make an enum for pipeline statistics query result indices.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 15 Dec 2018 05:09:32 +0000 (21:09 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 15 Jan 2019 19:43:04 +0000 (11:43 -0800)
commite760be08b45dd2d56058d7afc9048b99241fd1de
tree3f7e25575d2b4d80977972b61811e3f4e924b08a
parent4a131a13303773d8b0e4d47e917b9c52d439146a
st/mesa: Make an enum for pipeline statistics query result indices.

Gallium handles pipeline statistics queries as a single query
(PIPE_QUERY_PIPELINE_STATISTICS) which returns a struct with 11 values.
Sometimes it's useful to refer to each of those values individually,
rather than as a group.  To avoid hardcoding numbers, we define a new
enum for each value.  Here, the name and enum value correspond to the
index in the struct pipe_query_data_pipeline_statistics result.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/gallium/include/pipe/p_defines.h
src/mesa/state_tracker/st_cb_queryobj.c