glsl: Add a predicate to determine whether a variable is an interface block
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 22 Jan 2013 03:18:16 +0000 (22:18 -0500)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 25 Jan 2013 14:07:34 +0000 (09:07 -0500)
commit23b7ce3a824013c8b4d7340294cb59b0b4cb8f87
tree8856b0f90c68618c62ad7dc4735e618bfa5dd805
parent3b09603dda7108f7f7d58c903b15510262f845c0
glsl: Add a predicate to determine whether a variable is an interface block

For the first declaration below, there will be an ir_variable named
"instance" whose type and whose instance_type will be the same
glsl_type.  For the second declaration, there will be an ir_variable
named "f" whose type is float and whose instance_type is B2.

"instance" is an interface instance variable, but "f" is not.

uniform B1 {
    float f;
} instance;

uniform B2 {
    float f;
};

v2: Copy the comment message documentation into the code.  Suggested by
Paul Berry.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Carl Worth <cworth@cworth.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/ir.h