OSDN Git Service
(root)
/
android-x86
/
external-mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec08b5e
)
mesa: Replace string comparisons with SYSTEM_VALUE enum checks.
author
Kenneth Graunke
<kenneth@whitecape.org>
Fri, 8 Aug 2014 05:38:50 +0000
(22:38 -0700)
committer
Kenneth Graunke
<kenneth@whitecape.org>
Wed, 10 Sep 2014 18:05:08 +0000
(11:05 -0700)
This is more efficient.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/shader_query.cpp
patch
|
blob
|
history
diff --git
a/src/mesa/main/shader_query.cpp
b/src/mesa/main/shader_query.cpp
index
4267743
..
4871d09
100644
(file)
--- 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;