nvc0: allow to monitor MP perf counters with compute shaders
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 25 May 2016 21:36:48 +0000 (23:36 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 26 May 2016 17:34:57 +0000 (19:34 +0200)
commitc52e92ec3a37c9ab3fb35132e62e1ddf6a770c27
tree95a3c5313a2b3147e55913da302b0b5e860142f2
parent329d115ac68b40082540cf844c548e0656fbdbf9
nvc0: allow to monitor MP perf counters with compute shaders

To read out MP perf counters we use a compute shader and need to upload
input data like a 64-bits addr used to store the values and a sequence
ID for synchronization. Currently, this input data is uploaded as user
uniforms which means that it's sticked to c0[], but if a compute shader
from a real application is used, monitoring those performance counters
will just overwrite some data and miserably crash.

Instead, sticking the 64-bits addr and the sequence into the driver
constant buffer seems like much better and will allow to monitor
counters with GL 4.3 apps.

Tested on GF119 and GK110, but should not hurt anything on GK104.

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