stage_mask is a bitmask of shader stages, so the proper comparison would
be (1 << MESA_SHADER_VERTEX), not MESA_SHADER_VERTEX itself.
But we only care for structure types, and VS inputs cannot be structs.
So we can just drop this entirely.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
bool use_implicit_location, int location,
const glsl_type *outermost_struct_type = NULL)
{
- const bool is_vertex_input =
- programInterface == GL_PROGRAM_INPUT &&
- stage_mask == MESA_SHADER_VERTEX;
-
switch (type->base_type) {
case GLSL_TYPE_STRUCT: {
/* The ARB_program_interface_query spec says:
outermost_struct_type))
return false;
- field_location +=
- field->type->count_attribute_slots(is_vertex_input);
+ field_location += field->type->count_attribute_slots(false);
}
return true;
}