diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2013-09-25 16:16:00 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2014-02-21 15:41:02 -0800 |
commit | 4d14b190bbaf4d1c56f5c8d2fae3fcddb44cc4c2 (patch) | |
tree | d3cd11891d247f86c995b6ee730e1b6ed3f6e636 /src/glsl/glsl_parser_extras.h | |
parent | f3b184590fbd87ebb4778c9699547b189601aeee (diff) | |
download | external_mesa3d-4d14b190bbaf4d1c56f5c8d2fae3fcddb44cc4c2.zip external_mesa3d-4d14b190bbaf4d1c56f5c8d2fae3fcddb44cc4c2.tar.gz external_mesa3d-4d14b190bbaf4d1c56f5c8d2fae3fcddb44cc4c2.tar.bz2 |
glsl/sso: Add parser and AST-to-HIR support for separate shader object layouts
GL_ARB_separate_shader_objects adds the ability to specify location
layouts for interstage inputs and outputs.
In addition, this extension makes 'in' and 'out' generally available for
shader inputs and outputs. This mimics the behavior of
GL_ARB_explicit_attrib_location.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'src/glsl/glsl_parser_extras.h')
-rw-r--r-- | src/glsl/glsl_parser_extras.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h index 884e83e..300d900 100644 --- a/src/glsl/glsl_parser_extras.h +++ b/src/glsl/glsl_parser_extras.h @@ -135,6 +135,23 @@ struct _mesa_glsl_parse_state { return true; } + bool check_separate_shader_objects_allowed(YYLTYPE *locp, + const ir_variable *var) + { + if (!this->has_separate_shader_objects()) { + const char *const requirement = this->es_shader + ? "GL_EXT_separate_shader_objects (not supported by this " + "implementation)" + : "GL_ARB_separate_shader_objects extension or GLSL 420"; + + _mesa_glsl_error(locp, this, "%s explicit location requires %s", + mode_string(var), requirement); + return false; + } + + return true; + } + bool has_explicit_attrib_location() const { return ARB_explicit_attrib_location_enable || is_version(330, 300); |