summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_lower_io.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-01-21 11:11:03 -0800
committerJason Ekstrand <[email protected]>2015-01-21 19:55:02 -0800
commitf88c6a49970ee35d29840e03fd6512a7acd815fb (patch)
tree33be37b922ff06f88d963e901fbce145baa94445 /src/glsl/nir/nir_lower_io.c
parent76086d7120152ebced634875889612d0c40a37bb (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_lower_io.c')
-rw-r--r--src/glsl/nir/nir_lower_io.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/glsl/nir/nir_lower_io.c b/src/glsl/nir/nir_lower_io.c
index af87c13e17a..c35058c14dc 100644
--- a/src/glsl/nir/nir_lower_io.c
+++ b/src/glsl/nir/nir_lower_io.c
@@ -238,13 +238,8 @@ nir_lower_io_block(nir_block *block, void *void_state)
load->dest.is_ssa = true;
nir_ssa_def_init(&load->instr, &load->dest.ssa,
intrin->num_components, NULL);
-
- nir_src new_src = {
- .is_ssa = true,
- .ssa = &load->dest.ssa,
- };
-
- nir_ssa_def_rewrite_uses(&intrin->dest.ssa, new_src,
+ nir_ssa_def_rewrite_uses(&intrin->dest.ssa,
+ nir_src_for_ssa(&load->dest.ssa),
state->mem_ctx);
} else {
load->dest = nir_dest_copy(intrin->dest, state->mem_ctx);