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>
This commit is contained in:
@@ -2213,6 +2213,7 @@ unsigned nir_index_instrs(nir_function_impl *impl);
|
||||
void nir_index_blocks(nir_function_impl *impl);
|
||||
|
||||
void nir_print_shader(nir_shader *shader, FILE *fp);
|
||||
void nir_print_shader_annotated(nir_shader *shader, FILE *fp, struct hash_table *errors);
|
||||
void nir_print_instr(const nir_instr *instr, FILE *fp);
|
||||
|
||||
nir_shader *nir_shader_clone(void *mem_ctx, const nir_shader *s);
|
||||
|
Reference in New Issue
Block a user