glsl: Restrict functions to not return arrays or SOAs in GLSL 1.00.
authorEric Anholt <eric@anholt.net>
Mon, 1 May 2017 23:00:47 +0000 (16:00 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 8 May 2017 19:15:49 +0000 (12:15 -0700)
commitefa9750e96cc80ff76e0082063da37be53c07a12
treeef68cbc80ff3618e41c2f6a76a5de56de9be5ccd
parentae7aa8dbaf7c65a8b0d86713530a751b7d2f10b0
glsl: Restrict functions to not return arrays or SOAs in GLSL 1.00.

From the spec,

    Arrays are allowed as arguments, but not as the return type. [...] The
    return type can also be a structure if the structure does not contain
    an array.

Fixes DEQP shaders.functions.invalid.return_array_in_struct_fragment.

v2: Spec cite wording change

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Matt Turner <mattst88@gmail.com>
src/compiler/glsl/ast_to_hir.cpp
src/compiler/glsl_types.cpp
src/compiler/glsl_types.h