projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
nir: Look up the shader when printing a single instruction.
[mesa.git]
/
src
/
compiler
/
nir
/
nir_print.c
diff --git
a/src/compiler/nir/nir_print.c
b/src/compiler/nir/nir_print.c
index 6e871b6c9506ff968d454966b406dbfaafa6f41e..c5a8efd1ec51753ae95b957f56f9458196f12db5 100644
(file)
--- a/
src/compiler/nir/nir_print.c
+++ b/
src/compiler/nir/nir_print.c
@@
-1586,6
+1586,11
@@
nir_print_instr(const nir_instr *instr, FILE *fp)
print_state state = {
.fp = fp,
};
+ if (instr->block) {
+ nir_function_impl *impl = nir_cf_node_get_function(&instr->block->cf_node);
+ state.shader = impl->function->shader;
+ }
+
print_instr(instr, &state, 0);
}