diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2015-01-24 02:05:56 -0800 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2015-04-11 12:35:47 -0700 |
commit | b6354d9bb077815d2e388dc5d0e7411ea6d89748 (patch) | |
tree | 5ecaa3ab8d64496c12e45d1bc8db8d43eb3dc029 /src/mesa/drivers/dri/i965/intel_asm_annotation.c | |
parent | 89c1feb78d010bc457f5d02be84c955eebf3549f (diff) | |
download | external_mesa3d-b6354d9bb077815d2e388dc5d0e7411ea6d89748.zip external_mesa3d-b6354d9bb077815d2e388dc5d0e7411ea6d89748.tar.gz external_mesa3d-b6354d9bb077815d2e388dc5d0e7411ea6d89748.tar.bz2 |
i965/nir: Make INTEL_DEBUG=ann work with NIR.
Now that we store a copy of the NIR shader, and don't immediately free
it, we can use it in annotations as well.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_asm_annotation.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_asm_annotation.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_asm_annotation.c b/src/mesa/drivers/dri/i965/intel_asm_annotation.c index ac12655..eed5756 100644 --- a/src/mesa/drivers/dri/i965/intel_asm_annotation.c +++ b/src/mesa/drivers/dri/i965/intel_asm_annotation.c @@ -29,6 +29,7 @@ #include "program/prog_print.h" #include "program/prog_instruction.h" #include "main/macros.h" +#include "glsl/nir/nir.h" void dump_assembly(void *assembly, int num_annotations, struct annotation *annotation, @@ -55,7 +56,9 @@ dump_assembly(void *assembly, int num_annotations, struct annotation *annotation last_annotation_ir = annotation[i].ir; if (last_annotation_ir) { fprintf(stderr, " "); - if (!prog->Instructions) + if (prog->nir) + nir_print_instr(annotation[i].ir, stderr); + else if (!prog->Instructions) fprint_ir(stderr, annotation[i].ir); else { const struct prog_instruction *pi = |