From: Timothy Arceri Date: Wed, 6 Jan 2016 00:27:05 +0000 (+1100) Subject: mesa: fix GL_MAX_NAME_LENGTH query for tessellation shaders X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3d402d445003f00478d7eb51eec8e4f31fef9352;p=mesa.git mesa: fix GL_MAX_NAME_LENGTH query for tessellation shaders 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 --- diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index e526119db19..b25732a2e3b 100644 --- a/src/mesa/main/shader_query.cpp +++ b/src/mesa/main/shader_query.cpp @@ -764,8 +764,12 @@ _mesa_program_resource_find_index(struct gl_shader_program *shProg, 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.