glsl: Combine AST-level and IR-level parameter mode checking loops.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 29 Mar 2012 02:24:45 +0000 (19:24 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 2 Apr 2012 21:15:32 +0000 (14:15 -0700)
commitac0f8bae8d39ca9f5e873ba8411472e2962890cd
treeef896e5e6f7fa348aa068fecd5fb07bd238da187
parent909e8899671a45bcc865fe303a8cb697a25634aa
glsl: Combine AST-level and IR-level parameter mode checking loops.

generate_call() and ast_function_expression::hir() both tried to verify
that 'out' and 'inout' parameters used l-values.  Irritatingly, it
turned out that this was not redundant; both checks caught -some- cases.

This patch combines the two into a single "complete" function that does
all the parameter mode checking.  It also adds a comment clarifying why
AST-level checking is necessary in the first place.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/ast_function.cpp