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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user