summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-08-07 22:38:50 -0700
committerKenneth Graunke <[email protected]>2014-09-10 11:05:08 -0700
commit26c9514155bfcd1cf2cfeb2cfdb5d4b78a8072b0 (patch)
tree5440d18f78c27e9e1b594def1c3614986c707c72 /src/mesa
parentec08b5e768271aa100be87c1ca6dd2b0109049d9 (diff)
mesa: Replace string comparisons with SYSTEM_VALUE enum checks.
This is more efficient. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/shader_query.cpp4
1 files changed, 2 insertions, 2 deletions
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;