summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-06-24 21:43:45 -0700
committerMatt Turner <[email protected]>2014-07-01 08:55:51 -0700
commite0cb82d0c4ceba437c351d1e37fdb86fe5aed997 (patch)
treefb72f6447527c3d028cd9daf7148795e350659ad /src/mesa/main
parent4d78446d782e2d942b4cd0cd00a27bf922ccd479 (diff)
mesa: Use typed foreach_in_list instead of foreach_list.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/shader_query.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp
index 36d1d9cc025..42677431690 100644
--- a/src/mesa/main/shader_query.cpp
+++ b/src/mesa/main/shader_query.cpp
@@ -126,8 +126,8 @@ _mesa_GetActiveAttrib(GLhandleARB program, GLuint desired_index,
exec_list *const ir = shProg->_LinkedShaders[MESA_SHADER_VERTEX]->ir;
unsigned current_index = 0;
- foreach_list(node, ir) {
- const ir_variable *const var = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, ir) {
+ const ir_variable *const var = node->as_variable();
if (!is_active_attrib(var))
continue;
@@ -236,8 +236,8 @@ _mesa_GetAttribLocation(GLhandleARB program, const GLcharARB * name)
return -1;
exec_list *ir = shProg->_LinkedShaders[MESA_SHADER_VERTEX]->ir;
- foreach_list(node, ir) {
- const ir_variable *const var = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, ir) {
+ const ir_variable *const var = node->as_variable();
/* The extra check against VERT_ATTRIB_GENERIC0 is because
* glGetAttribLocation cannot be used on "conventional" attributes.
@@ -274,8 +274,8 @@ _mesa_count_active_attribs(struct gl_shader_program *shProg)
exec_list *const ir = shProg->_LinkedShaders[MESA_SHADER_VERTEX]->ir;
unsigned i = 0;
- foreach_list(node, ir) {
- const ir_variable *const var = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, ir) {
+ const ir_variable *const var = node->as_variable();
if (!is_active_attrib(var))
continue;
@@ -298,8 +298,8 @@ _mesa_longest_attribute_name_length(struct gl_shader_program *shProg)
exec_list *const ir = shProg->_LinkedShaders[MESA_SHADER_VERTEX]->ir;
size_t longest = 0;
- foreach_list(node, ir) {
- const ir_variable *const var = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, ir) {
+ const ir_variable *const var = node->as_variable();
if (var == NULL
|| var->data.mode != ir_var_shader_in
@@ -400,8 +400,8 @@ _mesa_GetFragDataIndex(GLuint program, const GLchar *name)
return -1;
exec_list *ir = shProg->_LinkedShaders[MESA_SHADER_FRAGMENT]->ir;
- foreach_list(node, ir) {
- const ir_variable *const var = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, ir) {
+ const ir_variable *const var = node->as_variable();
/* The extra check against FRAG_RESULT_DATA0 is because
* glGetFragDataLocation cannot be used on "conventional" attributes.
@@ -456,8 +456,8 @@ _mesa_GetFragDataLocation(GLuint program, const GLchar *name)
return -1;
exec_list *ir = shProg->_LinkedShaders[MESA_SHADER_FRAGMENT]->ir;
- foreach_list(node, ir) {
- const ir_variable *const var = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, ir) {
+ const ir_variable *const var = node->as_variable();
/* The extra check against FRAG_RESULT_DATA0 is because
* glGetFragDataLocation cannot be used on "conventional" attributes.