[Mesa-dev] [PATCH v5 44/70] nir/glsl_to_nir: ignore an instruction's dest if it hasn't any

Iago Toral Quiroga itoral at igalia.com
Thu Sep 10 06:36:00 PDT 2015


Reviewed-by: Connor Abbott <connor.w.abbott at intel.com>
---
 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 cb7b196..a387a54 100644
--- a/src/glsl/nir/glsl_to_nir.cpp
+++ b/src/glsl/nir/glsl_to_nir.cpp
@@ -1032,7 +1032,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;
-- 
1.9.1



More information about the mesa-dev mailing list