mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-09 18:10:29 +01:00
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:
parent
ec08b5e768
commit
26c9514155
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue