{
foreach_in_list(ir_instruction, node, sh->ir) {
ir_variable *var = node->as_variable();
+ uint8_t mask = 0;
if (!var)
continue;
var->data.location != SYSTEM_VALUE_VERTEX_ID_ZERO_BASE &&
var->data.location != SYSTEM_VALUE_INSTANCE_ID)
continue;
+ /* Mark special built-in inputs referenced by the vertex stage so
+ * that they are considered active by the shader queries.
+ */
+ mask = (1 << (MESA_SHADER_VERTEX));
/* FALLTHROUGH */
case ir_var_shader_in:
if (programInterface != GL_PROGRAM_INPUT)
};
if (!add_program_resource(shProg, programInterface, var,
- build_stageref(shProg, var->name)))
+ build_stageref(shProg, var->name) | mask))
return false;
}
return true;