mesa: Fix glGetProgramiv(GL_ACTIVE_ATTRIBUTES).
authorJose Fonseca <jfonseca@vmware.com>
Tue, 28 Apr 2015 20:49:36 +0000 (21:49 +0100)
committerJose Fonseca <jfonseca@vmware.com>
Wed, 29 Apr 2015 05:42:12 +0000 (06:42 +0100)
commit114ac39a888509b133f15ddae813fcf64adc72a7
treea5b7e9bb6f08b0f3e1f90d9ca001568a13256462
parentc66c158e59298fc4183148c466dd4eecb945f87c
mesa: Fix glGetProgramiv(GL_ACTIVE_ATTRIBUTES).

It's returning random values, because RESOURCE_VAR() is casting
different objects into ir_variable pointers.

This updates _mesa_count_active_attribs to filter the resources with the
same logic used in _mesa_longest_attribute_name_length.

https://bugs.freedesktop.org/show_bug.cgi?id=90207

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/main/shader_query.cpp