st/mesa: use PROGRAM_ARRAY for storing structs containing arrays
authorBrian Paul <brianp@vmware.com>
Wed, 26 Aug 2015 19:58:23 +0000 (13:58 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 27 Aug 2015 19:11:26 +0000 (13:11 -0600)
commitbcae4640c89bc2775d1a85b2b27d2787cac8f843
tree6ffb3f25012ea77cb330766c79a1f7e17e466add
parent42c7be5877665dfcbeb317c7eb163a03d56fe661
st/mesa: use PROGRAM_ARRAY for storing structs containing arrays

Previously, we used PROGRAM_ARRAY only for variables which were
arrays or matrices.  But if the variable is a structure containing
an array or matrix, we need to use PROGRAM_ARRAY for that too.

Before, we failed an assertion:
  state_tracker/st_glsl_to_tgsi.cpp:4900:
  Assertion `src_reg->file != PROGRAM_TEMPORARY' failed.
when running the piglit test
glsl-1.20/execution/fs-const-array-of-struct-of-array.shader_test

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp