glsl: initialise record array count to 1
authorTimothy Arceri <t_arceri@yahoo.com.au>
Thu, 15 Oct 2015 03:10:35 +0000 (14:10 +1100)
committerTimothy Arceri <t_arceri@yahoo.com.au>
Fri, 16 Oct 2015 21:50:40 +0000 (08:50 +1100)
This was only being done in one of the two process methods.

Fixes an issue with samplers using the array size of a previous record.

Tested-by: Marek Olšák <marek.olsak@amd.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
src/glsl/link_uniforms.cpp

index 647aa2bbdd8a9181976fae483d5e5f21c63488b4..fe00aa30d075a0450a018ed4e346c9a81ae17578 100644 (file)
@@ -161,6 +161,7 @@ program_resource_visitor::process(ir_variable *var)
                 false, record_array_count);
       ralloc_free(name);
    } else {
+      this->set_record_array_count(record_array_count);
       this->visit_field(t, var->name, row_major, NULL, packing, false);
    }
 }