OSDN Git Service

glsl: Fix usage of the wrong union member in program_resource_visitor::recursion.
authorFrancisco Jerez <currojerez@riseup.net>
Sat, 21 Sep 2013 01:36:08 +0000 (18:36 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Sun, 6 Oct 2013 19:55:14 +0000 (12:55 -0700)
commitb3c04362b44a4eceb38c938ceb387a9c04d06973
tree95ab6587e97eaa342f98b8cdbb17f5e0e17dace8
parent373f8670d1c670003674e1eaa7c1f0cd823a0431
glsl: Fix usage of the wrong union member in program_resource_visitor::recursion.

In the array-of-struct case, recursion() takes the row_major flag for
each iteration from 't->fields.structure[i]', but 't' is not a record
type.  Inherit the array declaration row_major flag instead.

This mistake was found by running piglit on valgrind.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69449
Cc: "9.1 9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/link_uniforms.cpp