summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_types.h
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2013-09-20 14:58:03 -0700
committerFrancisco Jerez <currojerez@riseup.net>2013-10-29 12:40:55 -0700
commitcc744a0947e619a4350551f5e9d5e380ac8d9e23 (patch)
treececfc057f2e902860d770935396a1352f091bc43 /src/glsl/glsl_types.h
parent26db3b933f7fbc81d6c2bead2a8b0479a3691424 (diff)
downloadexternal_mesa3d-cc744a0947e619a4350551f5e9d5e380ac8d9e23.zip
external_mesa3d-cc744a0947e619a4350551f5e9d5e380ac8d9e23.tar.gz
external_mesa3d-cc744a0947e619a4350551f5e9d5e380ac8d9e23.tar.bz2
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>
Diffstat (limited to 'src/glsl/glsl_types.h')
-rw-r--r--src/glsl/glsl_types.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h
index 69ad4b8..fdb1f3a 100644
--- a/src/glsl/glsl_types.h
+++ b/src/glsl/glsl_types.h
@@ -463,6 +463,11 @@ struct glsl_type {
}
/**
+ * Return whether a type contains any opaque types.
+ */
+ bool contains_opaque() const;
+
+ /**
* Query the full type of a matrix row
*
* \return