st/mesa: store mapping from perfmon counter to query type
authorNicolai Hähnle <nhaehnle@gmail.com>
Thu, 12 Nov 2015 10:53:22 +0000 (11:53 +0100)
committerNicolai Hähnle <nhaehnle@gmail.com>
Fri, 20 Nov 2015 16:27:09 +0000 (17:27 +0100)
commit0aea83dc4ad8826648be7b400553083e0aeac004
treeff09722e9e74a586d20a68d7287549a41e5017ac
parent4e1339691d3e04eb7e90d33ab5900ce1a40e628f
st/mesa: store mapping from perfmon counter to query type

Previously, when a performance monitor was initialized, an inner loop through
all driver queries with string comparisons for each enabled performance
monitor counter was used. This hurts when a driver exposes lots of queries.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/mesa/state_tracker/st_cb_perfmon.c
src/mesa/state_tracker/st_cb_perfmon.h
src/mesa/state_tracker/st_context.h