Since the separation of ir_var_function_in and ir_var_shader_in (similar
for out), this check is no longer necessary. Previously, global_scope
was the only way to tell which was which.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
struct _mesa_glsl_parse_state *state,
YYLTYPE *loc)
{
- const bool global_scope = (state->current_function == NULL);
bool fail = false;
const char *string = "";
*/
switch (state->target) {
case vertex_shader:
- if (!global_scope || (var->mode != ir_var_shader_in)) {
+ if (var->mode != ir_var_shader_in) {
fail = true;
string = "input";
}
return;
case fragment_shader:
- if (!global_scope || (var->mode != ir_var_shader_out)) {
+ if (var->mode != ir_var_shader_out) {
fail = true;
string = "output";
}