nvc0: fix queries which use multiple MP counters on Fermi
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 9 Oct 2015 09:14:31 +0000 (11:14 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 16 Oct 2015 19:57:44 +0000 (21:57 +0200)
commit4fcb661711c19a6c315267733e4cdcaee9f5e95b
tree3be836b949637f2f26d46d1b488af8571549d9fa
parent6353f620cdb86009812ad2e850b79374e85ecec2
nvc0: fix queries which use multiple MP counters on Fermi

Queries which use more than one MP counters was misconfigured and
computing the final result was also wrong because sources need to
be configured on different hardware counters instead.

According to the blob, computing the result is now as follows:

FOR  i..n
val += ctr[i] * pow(2, i)

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.c