glsl: Add type predicate to check whether a type contains any opaque types.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 20 Sep 2013 21:58:03 +0000 (14:58 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 29 Oct 2013 19:40:55 +0000 (12:40 -0700)
commitcc744a0947e619a4350551f5e9d5e380ac8d9e23
treececfc057f2e902860d770935396a1352f091bc43
parent26db3b933f7fbc81d6c2bead2a8b0479a3691424
glsl: Add type predicate to check whether a type contains any opaque types.

And use it to forbid comparisons of opaque operands.  According to the
GL 4.2 specification:

> Except for array indexing, structure member selection, and
> parentheses, opaque variables are not allowed to be operands in
> expressions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/ast_to_hir.cpp
src/glsl/glsl_types.cpp
src/glsl/glsl_types.h