summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIago Toral Quiroga <itoral@igalia.com>2015-05-19 09:02:06 +0200
committerSamuel Iglesias Gonsalvez <siglesias@igalia.com>2015-07-09 12:53:53 +0200
commit331b954304ca002b9b7de193fb5f534a0dec6065 (patch)
treedd0148d589106df23a463e955ba13021ba49518d
parentcfd7177b318dca48617c6f088aaf48999fc4b340 (diff)
nir: ignore an instruction's dest if it hasn't any
-rw-r--r--src/glsl/nir/glsl_to_nir.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp
index f5a664af57..1d83a9817d 100644
--- a/src/glsl/nir/glsl_to_nir.cpp
+++ b/src/glsl/nir/glsl_to_nir.cpp
@@ -1011,7 +1011,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;