From 300d72943675a49091ecb49597b56f7bdfefd22d Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 21 Apr 2015 18:00:21 -0700 Subject: nir: Add and use initializer #defines for nir_src and nir_dest Reviewed-by: Connor Abbott --- src/glsl/nir/nir_lower_samplers.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/glsl/nir/nir_lower_samplers.cpp') 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]"); -- cgit v1.2.3