summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/glsl_to_nir.cpp
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2015-05-19 09:02:06 +0200
committerSamuel Iglesias Gonsalvez <[email protected]>2015-09-25 08:39:22 +0200
commit475d9c32d1331eb330c8594ed6f84e668157500e (patch)
tree6b2b6d49628229fb52acf87500d7ad75f475d2af /src/glsl/nir/glsl_to_nir.cpp
parente3f9c7829c609e8a32da9f36c9829843f2204a37 (diff)
nir/glsl_to_nir: ignore an instruction's dest if it hasn't any
Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/glsl/nir/glsl_to_nir.cpp')
-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 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;