summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_lower_samplers.cpp
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-04-21 18:00:21 -0700
committerJason Ekstrand <[email protected]>2015-05-08 17:16:13 -0700
commit300d72943675a49091ecb49597b56f7bdfefd22d (patch)
tree9efa3cfdbeeed2f59a99432681b503c4c965ecc1 /src/glsl/nir/nir_lower_samplers.cpp
parent6702ebce5760aae0eb15f410c2a83b6e893b005c (diff)
nir: Add and use initializer #defines for nir_src and nir_dest
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir_lower_samplers.cpp')
-rw-r--r--src/glsl/nir/nir_lower_samplers.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/glsl/nir/nir_lower_samplers.cpp b/src/glsl/nir/nir_lower_samplers.cpp
index cf8ab832516..e9e152f6cbf 100644
--- a/src/glsl/nir/nir_lower_samplers.cpp
+++ b/src/glsl/nir/nir_lower_samplers.cpp
@@ -95,9 +95,8 @@ lower_sampler(nir_tex_instr *instr, const struct gl_shader_program *shader_progr
instr->sampler_array_size = glsl_get_length(deref->type);
- nir_src empty;
- memset(&empty, 0, sizeof empty);
- nir_instr_rewrite_src(&instr->instr, &deref_array->indirect, empty);
+ nir_instr_rewrite_src(&instr->instr, &deref_array->indirect,
+ NIR_SRC_INIT);
if (deref_array->deref.child)
ralloc_strcat(&name, "[0]");