From: Kenneth Graunke Date: Fri, 8 Aug 2014 05:38:50 +0000 (-0700) Subject: mesa: Replace string comparisons with SYSTEM_VALUE enum checks. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=26c9514155bfcd1cf2cfeb2cfdb5d4b78a8072b0;p=mesa.git mesa: Replace string comparisons with SYSTEM_VALUE enum checks. This is more efficient. Signed-off-by: Kenneth Graunke Reviewed-by: Ian Romanick --- diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index 42677431690..4871d09657c 100644 --- a/src/mesa/main/shader_query.cpp +++ b/src/mesa/main/shader_query.cpp @@ -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;