glsl: Use correct mode for split components.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 20 Apr 2016 13:42:01 +0000 (15:42 +0200)
committerDave Airlie <airlied@redhat.com>
Mon, 23 May 2016 23:55:38 +0000 (09:55 +1000)
The mode should stay the same as the original struct. In
particular, shared should not be changed to temporary.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/compiler/glsl/opt_structure_splitting.cpp

index 0d18a2f..f4c129e 100644 (file)
@@ -351,7 +351,7 @@ do_structure_splitting(exec_list *instructions)
         entry->components[i] =
            new(entry->mem_ctx) ir_variable(type->fields.structure[i].type,
                                            name,
-                                           ir_var_temporary);
+                                           (ir_variable_mode) entry->var->data.mode);
         entry->var->insert_before(entry->components[i]);
       }