diff options
author | Matt Turner <[email protected]> | 2014-06-24 21:34:05 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-07-01 08:55:51 -0700 |
commit | 4d78446d782e2d942b4cd0cd00a27bf922ccd479 (patch) | |
tree | eaaa99ce79c54ddef6cf35c8d3d028b9e0aa44b4 /src/glsl/tests | |
parent | da9f0316e6ea628c085040a0c145580301207489 (diff) |
glsl: Use typed foreach_in_list instead of foreach_list.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/tests')
-rw-r--r-- | src/glsl/tests/builtin_variable_test.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/glsl/tests/builtin_variable_test.cpp b/src/glsl/tests/builtin_variable_test.cpp index 3fdfce57d4f..5076f8c54f4 100644 --- a/src/glsl/tests/builtin_variable_test.cpp +++ b/src/glsl/tests/builtin_variable_test.cpp @@ -98,8 +98,8 @@ common_builtin::string_starts_with_prefix(const char *str, const char *prefix) void common_builtin::names_start_with_gl() { - foreach_list(node, &this->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); + foreach_in_list(ir_instruction, node, &this->ir) { + ir_variable *const var = node->as_variable(); string_starts_with_prefix(var->name, "gl_"); } @@ -108,8 +108,8 @@ common_builtin::names_start_with_gl() void common_builtin::uniforms_and_system_values_dont_have_explicit_location() { - foreach_list(node, &this->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); + foreach_in_list(ir_instruction, node, &this->ir) { + ir_variable *const var = node->as_variable(); if (var->data.mode != ir_var_uniform && var->data.mode != ir_var_system_value) continue; @@ -122,8 +122,8 @@ common_builtin::uniforms_and_system_values_dont_have_explicit_location() void common_builtin::constants_are_constant() { - foreach_list(node, &this->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); + foreach_in_list(ir_instruction, node, &this->ir) { + ir_variable *const var = node->as_variable(); if (var->data.mode != ir_var_auto) continue; @@ -137,8 +137,8 @@ common_builtin::constants_are_constant() void common_builtin::no_invalid_variable_modes() { - foreach_list(node, &this->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); + foreach_in_list(ir_instruction, node, &this->ir) { + ir_variable *const var = node->as_variable(); switch (var->data.mode) { case ir_var_auto: @@ -174,8 +174,8 @@ TEST_F(vertex_builtin, names_start_with_gl) TEST_F(vertex_builtin, inputs_have_explicit_location) { - foreach_list(node, &this->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); + foreach_in_list(ir_instruction, node, &this->ir) { + ir_variable *const var = node->as_variable(); if (var->data.mode != ir_var_shader_in) continue; @@ -189,8 +189,8 @@ TEST_F(vertex_builtin, inputs_have_explicit_location) TEST_F(vertex_builtin, outputs_have_explicit_location) { - foreach_list(node, &this->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); + foreach_in_list(ir_instruction, node, &this->ir) { + ir_variable *const var = node->as_variable(); if (var->data.mode != ir_var_shader_out) continue; @@ -242,8 +242,8 @@ TEST_F(fragment_builtin, names_start_with_gl) TEST_F(fragment_builtin, inputs_have_explicit_location) { - foreach_list(node, &this->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); + foreach_in_list(ir_instruction, node, &this->ir) { + ir_variable *const var = node->as_variable(); if (var->data.mode != ir_var_shader_in) continue; @@ -262,8 +262,8 @@ TEST_F(fragment_builtin, inputs_have_explicit_location) TEST_F(fragment_builtin, outputs_have_explicit_location) { - foreach_list(node, &this->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); + foreach_in_list(ir_instruction, node, &this->ir) { + ir_variable *const var = node->as_variable(); if (var->data.mode != ir_var_shader_out) continue; @@ -313,8 +313,8 @@ TEST_F(geometry_builtin, names_start_with_gl) TEST_F(geometry_builtin, inputs_have_explicit_location) { - foreach_list(node, &this->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); + foreach_in_list(ir_instruction, node, &this->ir) { + ir_variable *const var = node->as_variable(); if (var->data.mode != ir_var_shader_in) continue; @@ -359,8 +359,8 @@ TEST_F(geometry_builtin, inputs_have_explicit_location) TEST_F(geometry_builtin, outputs_have_explicit_location) { - foreach_list(node, &this->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); + foreach_in_list(ir_instruction, node, &this->ir) { + ir_variable *const var = node->as_variable(); if (var->data.mode != ir_var_shader_out) continue; |