nir/print: add support for print annotations
authorRob Clark <robclark@freedesktop.org>
Sat, 14 May 2016 19:37:32 +0000 (15:37 -0400)
committerRob Clark <robclark@freedesktop.org>
Tue, 17 May 2016 14:05:20 +0000 (10:05 -0400)
commita0ef26c1c2f0fcdebfa2699817cf63f644df8155
tree11eedcc553860aef304327910ac8daf4e2b9ae7d
parente5e412cd272989fa801a027ab5dce7de48eb79c6
nir/print: add support for print annotations

Caller can pass a hashtable mapping NIR object (currently instr or var,
but I guess others could be added as needed) to annotation msg to print
inline with the shader dump.  As the annotation msg is printed, it is
removed from the hashtable to give the caller a way to know about any
unassociated msgs.

This is used in the next patch, for nir_validate to try to associate
error msgs to nir_print dump.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/compiler/nir/nir.h
src/compiler/nir/nir_print.c