summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_print.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2014-12-17 16:53:04 -0800
committerJason Ekstrand <[email protected]>2015-01-15 07:20:23 -0800
commit40ca129ed5aea647d103c99db926d3b2aabe4021 (patch)
tree4668ac2265f1f671fc99bee8bcabdb476b27ea8a /src/glsl/nir/nir_print.c
parent1b720c6ed868b3f231f63568fc360fe7c4024c02 (diff)
nir: Rename parallel_copy_copy to parallel_copy_entry and add a foreach macro
parallel_copy_copy was a silly name. Also, things were getting long and annoying, so I added a foreach macro. For historical reasons, several of the original iterations over parallel copy entries in from_ssa used the _safe variants of the loop. However, all of these no longer ever remove an entry so it's ok to make them all use the normal iterator. Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir_print.c')
-rw-r--r--src/glsl/nir/nir_print.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/nir/nir_print.c b/src/glsl/nir/nir_print.c
index d7fc4b8722e..c9496e8448b 100644
--- a/src/glsl/nir/nir_print.c
+++ b/src/glsl/nir/nir_print.c
@@ -575,13 +575,13 @@ 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) {
+ nir_foreach_parallel_copy_entry(instr, entry) {
if (!first)
fprintf(fp, "; ");
- print_dest(&copy->dest, fp);
+ print_dest(&entry->dest, fp);
fprintf(fp, " = ");
- print_src(&copy->src, fp);
+ print_src(&entry->src, fp);
first = false;
}