From 475d9c32d1331eb330c8594ed6f84e668157500e Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Tue, 19 May 2015 09:02:06 +0200 Subject: [PATCH] nir/glsl_to_nir: ignore an instruction's dest if it hasn't any MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Connor Abbott Reviewed-by: Kristian Høgsberg --- src/glsl/nir/glsl_to_nir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp index d1e2488a69e..f8f3fd85bd4 100644 --- a/src/glsl/nir/glsl_to_nir.cpp +++ b/src/glsl/nir/glsl_to_nir.cpp @@ -1036,7 +1036,8 @@ nir_visitor::add_instr(nir_instr *instr, unsigned num_components) { nir_dest *dest = get_instr_dest(instr); - nir_ssa_dest_init(instr, dest, num_components, NULL); + if (dest) + nir_ssa_dest_init(instr, dest, num_components, NULL); nir_instr_insert_after_cf_list(this->cf_node_list, instr); this->result = instr; -- 2.30.2