nv50: add compute-related MP perf counters on G84+
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 10 Nov 2015 00:27:15 +0000 (01:27 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sat, 14 Nov 2015 22:42:42 +0000 (23:42 +0100)
commit6a9c151dbb87a10b6d51c451a5a277d646d08857
tree6436fb41a82e3b0cdfd837b5bfaffcaf08409afd
parentff72440b40211326eda118232fabd53965410afd
nv50: add compute-related MP perf counters on G84+

These compute-related MP performance counters have been reverse
engineered using CUPTI which is part of NVIDIA CUDA.

As for nvc0, we use a compute kernel to read out those performance
counters, and the command stream to configure them. Note that Tesla
only exposes 4 MP performance counters, while Fermi has 8.

Only G84+ is supported because G80 is an old and weird card.

Tested on G84, G96, G200, MCP79 and GT218 with glxgears, glxspheres64,
xonotic-glx, heaven and valley.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Pierre Moreau <pierre.morrow@free.fr>
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/Makefile.sources
src/gallium/drivers/nouveau/nv50/nv50_context.h
src/gallium/drivers/nouveau/nv50/nv50_query.c
src/gallium/drivers/nouveau/nv50/nv50_query_hw.c
src/gallium/drivers/nouveau/nv50/nv50_query_hw.h
src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c [new file with mode: 0644]
src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.h [new file with mode: 0644]
src/gallium/drivers/nouveau/nv50/nv50_screen.c
src/gallium/drivers/nouveau/nv50/nv50_screen.h