*/
assert(var->data.mode != ir_var_temporary);
if (qual->flags.q.in && qual->flags.q.out)
- var->data.mode = ir_var_function_inout;
+ var->data.mode = is_parameter ? ir_var_function_inout : ir_var_shader_out;
else if (qual->flags.q.in)
var->data.mode = is_parameter ? ir_var_function_in : ir_var_shader_in;
else if (qual->flags.q.attribute
else if (qual->flags.q.shared_storage)
var->data.mode = ir_var_shader_shared;
+ var->data.fb_fetch_output = state->stage == MESA_SHADER_FRAGMENT &&
+ qual->flags.q.in && qual->flags.q.out;
+
if (!is_parameter && is_varying_var(var, state->stage)) {
/* User-defined ins/outs are not permitted in compute shaders. */
if (state->stage == MESA_SHADER_COMPUTE) {
$$.xfb_buffer = state->out_qualifier->xfb_buffer;
}
}
+ | INOUT_TOK
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.in = 1;
+ $$.flags.q.out = 1;
+
+ if (!state->has_framebuffer_fetch() ||
+ !state->is_version(130, 300) ||
+ state->stage != MESA_SHADER_FRAGMENT)
+ _mesa_glsl_error(&@1, state, "A single interface variable cannot be "
+ "declared as both input and output");
+ }
| UNIFORM
{
memset(& $$, 0, sizeof($$));