summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_lower_samplers.cpp
diff options
context:
space:
mode:
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]");