summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/shader_query.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp
index a84ec84090d..d2ca49b43a7 100644
--- a/src/mesa/main/shader_query.cpp
+++ b/src/mesa/main/shader_query.cpp
@@ -302,8 +302,10 @@ _mesa_count_active_attribs(struct gl_shader_program *shProg)
struct gl_program_resource *res = shProg->ProgramResourceList;
unsigned count = 0;
for (unsigned j = 0; j < shProg->NumProgramResourceList; j++, res++) {
- if (is_active_attrib(RESOURCE_VAR(res)))
- count++;
+ if (res->Type == GL_PROGRAM_INPUT &&
+ res->StageReferences & (1 << MESA_SHADER_VERTEX) &&
+ is_active_attrib(RESOURCE_VAR(res)))
+ count++;
}
return count;
}