aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/glsl_parser_extras.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-07-01 09:29:23 +0200
committermarha <marha@users.sourceforge.net>2014-07-01 09:29:23 +0200
commitb6fac85cb1bb78f48ed81aaf42ba6b840b2d6cad (patch)
tree2cf97060ce44345489da6d1bcbbe568d2b2ea666 /mesalib/src/glsl/glsl_parser_extras.h
parentac314766fd4f60b8ee0346b7586c1a5a6f533e11 (diff)
parentcfc5bafcb2db8c6e05d7be6bb7315960be08c0d8 (diff)
downloadvcxsrv-b6fac85cb1bb78f48ed81aaf42ba6b840b2d6cad.tar.gz
vcxsrv-b6fac85cb1bb78f48ed81aaf42ba6b840b2d6cad.tar.bz2
vcxsrv-b6fac85cb1bb78f48ed81aaf42ba6b840b2d6cad.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig mesa pixman git update 1 July 2014
Diffstat (limited to 'mesalib/src/glsl/glsl_parser_extras.h')
-rw-r--r--mesalib/src/glsl/glsl_parser_extras.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/mesalib/src/glsl/glsl_parser_extras.h b/mesalib/src/glsl/glsl_parser_extras.h
index 2a5aea477..fd1391c2a 100644
--- a/mesalib/src/glsl/glsl_parser_extras.h
+++ b/mesalib/src/glsl/glsl_parser_extras.h
@@ -123,6 +123,19 @@ struct _mesa_glsl_parse_state {
return check_version(130, 300, locp, "bit-wise operations are forbidden");
}
+ bool check_explicit_attrib_stream_allowed(YYLTYPE *locp)
+ {
+ if (!this->has_explicit_attrib_stream()) {
+ const char *const requirement = "GL_ARB_gpu_shader5 extension or GLSL 400";
+
+ _mesa_glsl_error(locp, this, "explicit stream requires %s",
+ requirement);
+ return false;
+ }
+
+ return true;
+ }
+
bool check_explicit_attrib_location_allowed(YYLTYPE *locp,
const ir_variable *var)
{
@@ -170,6 +183,11 @@ struct _mesa_glsl_parse_state {
return true;
}
+ bool has_explicit_attrib_stream() const
+ {
+ return ARB_gpu_shader5_enable || is_version(400, 0);
+ }
+
bool has_explicit_attrib_location() const
{
return ARB_explicit_attrib_location_enable || is_version(330, 300);