summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2014-12-15 17:44:37 -0800
committerJason Ekstrand <[email protected]>2015-01-15 07:20:22 -0800
commit675ffdef3010400567a5f6f790f1f7bd2fede717 (patch)
tree8054dc07405551cf185b45b29bf7547368f1849f /src/glsl/nir/nir.c
parent951a7f23a076c1570f68b50fc7d03a33eb5145e7 (diff)
nir: Make nir_ssa_undef_instr_create initialize the destination
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir.c')
-rw-r--r--src/glsl/nir/nir.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c
index 94840e2edcc..a7bf82bd9b8 100644
--- a/src/glsl/nir/nir.c
+++ b/src/glsl/nir/nir.c
@@ -483,13 +483,12 @@ nir_parallel_copy_instr_create(void *mem_ctx)
}
nir_ssa_undef_instr *
-nir_ssa_undef_instr_create(void *mem_ctx)
+nir_ssa_undef_instr_create(void *mem_ctx, unsigned num_components)
{
nir_ssa_undef_instr *instr = ralloc(mem_ctx, nir_ssa_undef_instr);
instr_init(&instr->instr, nir_instr_type_ssa_undef);
- instr->def.name = NULL;
- instr->def.parent_instr = &instr->instr;
+ nir_ssa_def_init(&instr->instr, &instr->def, num_components, NULL);
return instr;
}