summaryrefslogtreecommitdiffstats
path: root/src/glsl/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/tests')
-rw-r--r--src/glsl/tests/builtin_variable_test.cpp40
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;