mesa: Replace string comparisons with SYSTEM_VALUE enum checks.

This is more efficient.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Kenneth Graunke 2014-08-07 22:38:50 -07:00
parent ec08b5e768
commit 26c9514155

View file

@ -92,8 +92,8 @@ is_active_attrib(const ir_variable *var)
* are enumerated, including the special built-in inputs gl_VertexID
* and gl_InstanceID."
*/
return !strcmp(var->name, "gl_VertexID") ||
!strcmp(var->name, "gl_InstanceID");
return var->data.location == SYSTEM_VALUE_VERTEX_ID ||
var->data.location == SYSTEM_VALUE_INSTANCE_ID;
default:
return false;