diff options
author | Samuel Iglesias Gonsalvez <[email protected]> | 2014-06-10 08:45:43 +0200 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2014-06-30 08:08:49 +0200 |
commit | a7e6ec68985dda9ca70c3eeb4fa9d807b67f7c99 (patch) | |
tree | 90940ad0089512c39e6c96ded1f9250ad213e1cd /src/glsl/glsl_parser_extras.h | |
parent | 15b5e663b050505683b7b4c9c489e46863b8441d (diff) |
glsl: Add parsing support for multi-stream output in geometry shaders.
This implements parsing requirements for multi-stream support in
geometry shaders as defined in ARB_gpu_shader5.
Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser_extras.h')
-rw-r--r-- | src/glsl/glsl_parser_extras.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h index aa4a114e414..a0af965fd23 100644 --- a/src/glsl/glsl_parser_extras.h +++ b/src/glsl/glsl_parser_extras.h @@ -119,6 +119,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) { @@ -166,6 +179,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); |