diff options
author | Jason Ekstrand <[email protected]> | 2015-01-21 11:11:03 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-01-21 19:55:02 -0800 |
commit | f88c6a49970ee35d29840e03fd6512a7acd815fb (patch) | |
tree | 33be37b922ff06f88d963e901fbce145baa94445 /src/glsl/nir/nir_opt_peephole_select.c | |
parent | 76086d7120152ebced634875889612d0c40a37bb (diff) |
nir: Stop using designated initializers
Designated initializers with anonymous unions don't work in MSVC or
GCC < 4.6. With a couple of constructor methods, we don't need them any
more and the code is actually cleaner.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88467
Reviewed-by: Connor Abbot <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir_opt_peephole_select.c')
-rw-r--r-- | src/glsl/nir/nir_opt_peephole_select.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/glsl/nir/nir_opt_peephole_select.c b/src/glsl/nir/nir_opt_peephole_select.c index 5d2f5d6208d..a0b19c2ef25 100644 --- a/src/glsl/nir/nir_opt_peephole_select.c +++ b/src/glsl/nir/nir_opt_peephole_select.c @@ -168,11 +168,9 @@ nir_opt_peephole_select_block(nir_block *block, void *void_state) phi->dest.ssa.num_components, phi->dest.ssa.name); sel->dest.write_mask = (1 << phi->dest.ssa.num_components) - 1; - nir_src sel_dest_src = { - .is_ssa = true, - .ssa = &sel->dest.dest.ssa, - }; - nir_ssa_def_rewrite_uses(&phi->dest.ssa, sel_dest_src, state->mem_ctx); + nir_ssa_def_rewrite_uses(&phi->dest.ssa, + nir_src_for_ssa(&sel->dest.dest.ssa), + state->mem_ctx); nir_instr_insert_before(&phi->instr, &sel->instr); nir_instr_remove(&phi->instr); |