nir/lower_io_to_vector: don't merge compact varyings
authorRhys Perry <pendingchaos02@gmail.com>
Fri, 6 Sep 2019 20:38:57 +0000 (21:38 +0100)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 6 Sep 2019 22:38:10 +0000 (15:38 -0700)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 02bc4aabb48 ('nir/lower_io_to_vector: allow FS outputs to be vectorized')
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/nir/nir_lower_io_to_vector.c

index 677b4a84095735e553be10c12950bb7c869610bc..84bd941c11cc15cce68607a9dbe71821911edea6 100644 (file)
@@ -81,6 +81,9 @@ variables_can_merge(const nir_shader *shader,
                     const nir_variable *a, const nir_variable *b,
                     bool same_array_structure)
 {
+   if (a->data.compact || b->data.compact)
+      return false;
+
    const struct glsl_type *a_type_tail = a->type;
    const struct glsl_type *b_type_tail = b->type;