This fixes some piglit subtests for ARB_program_interface_query.
V3: remove some of the unnecessary parentheses
V2: fix alignment
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
static bool
add_index_to_name(struct gl_program_resource *res)
{
- bool add_index = !(((res->Type == GL_PROGRAM_INPUT) &&
- res->StageReferences & (1 << MESA_SHADER_GEOMETRY)));
+ bool add_index = !((res->Type == GL_PROGRAM_INPUT &&
+ res->StageReferences & (1 << MESA_SHADER_GEOMETRY |
+ 1 << MESA_SHADER_TESS_CTRL |
+ 1 << MESA_SHADER_TESS_EVAL)) ||
+ (res->Type == GL_PROGRAM_OUTPUT &&
+ res->StageReferences & 1 << MESA_SHADER_TESS_CTRL));
/* Transform feedback varyings have array index already appended
* in their names.