summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_print.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2014-10-30 21:04:15 -0700
committerJason Ekstrand <[email protected]>2015-01-15 07:19:00 -0800
commit366181d826219b50ae74a5d5db49e885f3bb7c4e (patch)
tree8d391714b575e6d702ad2ba9d0b31f3d718fcb5b /src/glsl/nir/nir_print.c
parent7de6b7fc3ecd771c11acab251d3c432ea680b811 (diff)
nir: Add a parallel copy instruction type
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir_print.c')
-rw-r--r--src/glsl/nir/nir_print.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/glsl/nir/nir_print.c b/src/glsl/nir/nir_print.c
index 6f2a2da43e3..335eaaf180e 100644
--- a/src/glsl/nir/nir_print.c
+++ b/src/glsl/nir/nir_print.c
@@ -606,6 +606,23 @@ print_phi_instr(nir_phi_instr *instr, FILE *fp)
}
static void
+print_parallel_copy_instr(nir_parallel_copy_instr *instr, FILE *fp)
+{
+ bool first = true;
+ fprintf(fp, "pcopy: ");
+ foreach_list_typed(nir_parallel_copy_copy, copy, node, &instr->copies) {
+ if (!first)
+ fprintf(fp, "; ");
+
+ print_dest(&copy->dest, fp);
+ fprintf(fp, " = ");
+ print_src(&copy->src, fp);
+
+ first = false;
+ }
+}
+
+static void
print_instr(nir_instr *instr, print_var_state *state, unsigned tabs, FILE *fp)
{
print_tabs(tabs, fp);
@@ -643,6 +660,10 @@ print_instr(nir_instr *instr, print_var_state *state, unsigned tabs, FILE *fp)
print_phi_instr(nir_instr_as_phi(instr), fp);
break;
+ case nir_instr_type_parallel_copy:
+ print_parallel_copy_instr(nir_instr_as_parallel_copy(instr), fp);
+ break;
+
default:
unreachable("Invalid instruction type");
break;