aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/tests
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-02-28 09:11:23 -0700
committerBrian Paul <[email protected]>2015-03-02 08:55:30 -0700
commitc16c719647664abf7531896770c31eda1dbe7a58 (patch)
tree45e8296addc08b5d1542c989e5f523208692c789 /src/glsl/tests
parent70b401029cf800f22e6c4318cfd2ab9bf118bb6c (diff)
glsl: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/glsl/tests')
-rw-r--r--src/glsl/tests/copy_constant_to_storage_tests.cpp10
-rw-r--r--src/glsl/tests/uniform_initializer_utils.cpp2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/glsl/tests/copy_constant_to_storage_tests.cpp b/src/glsl/tests/copy_constant_to_storage_tests.cpp
index acf2789f2b5..cd48bc523c1 100644
--- a/src/glsl/tests/copy_constant_to_storage_tests.cpp
+++ b/src/glsl/tests/copy_constant_to_storage_tests.cpp
@@ -70,7 +70,7 @@ copy_constant_to_storage::int_test(unsigned rows)
ir_constant *val;
generate_data(mem_ctx, GLSL_TYPE_INT, 1, rows, val);
- const unsigned red_zone_size = Elements(storage) - val->type->components();
+ const unsigned red_zone_size = ARRAY_SIZE(storage) - val->type->components();
fill_storage_array_with_sentinels(storage,
val->type->components(),
red_zone_size);
@@ -90,7 +90,7 @@ copy_constant_to_storage::uint_test(unsigned rows)
ir_constant *val;
generate_data(mem_ctx, GLSL_TYPE_UINT, 1, rows, val);
- const unsigned red_zone_size = Elements(storage) - val->type->components();
+ const unsigned red_zone_size = ARRAY_SIZE(storage) - val->type->components();
fill_storage_array_with_sentinels(storage,
val->type->components(),
red_zone_size);
@@ -110,7 +110,7 @@ copy_constant_to_storage::float_test(unsigned columns, unsigned rows)
ir_constant *val;
generate_data(mem_ctx, GLSL_TYPE_FLOAT, columns, rows, val);
- const unsigned red_zone_size = Elements(storage) - val->type->components();
+ const unsigned red_zone_size = ARRAY_SIZE(storage) - val->type->components();
fill_storage_array_with_sentinels(storage,
val->type->components(),
red_zone_size);
@@ -130,7 +130,7 @@ copy_constant_to_storage::bool_test(unsigned rows)
ir_constant *val;
generate_data(mem_ctx, GLSL_TYPE_BOOL, 1, rows, val);
- const unsigned red_zone_size = Elements(storage) - val->type->components();
+ const unsigned red_zone_size = ARRAY_SIZE(storage) - val->type->components();
fill_storage_array_with_sentinels(storage,
val->type->components(),
red_zone_size);
@@ -155,7 +155,7 @@ copy_constant_to_storage::sampler_test(void)
ir_constant *val;
generate_data(mem_ctx, GLSL_TYPE_INT, 1, 1, val);
- const unsigned red_zone_size = Elements(storage) - val->type->components();
+ const unsigned red_zone_size = ARRAY_SIZE(storage) - val->type->components();
fill_storage_array_with_sentinels(storage,
val->type->components(),
red_zone_size);
diff --git a/src/glsl/tests/uniform_initializer_utils.cpp b/src/glsl/tests/uniform_initializer_utils.cpp
index 297f342c1b3..b90bdcaed3b 100644
--- a/src/glsl/tests/uniform_initializer_utils.cpp
+++ b/src/glsl/tests/uniform_initializer_utils.cpp
@@ -79,7 +79,7 @@ generate_data_element(void *mem_ctx, const glsl_type *type,
ir_constant_data data;
memset(&data, 0, sizeof(data));
for (unsigned i = 0; i < type->components(); i++) {
- const unsigned idx = (i + data_index_base) % Elements(values);
+ const unsigned idx = (i + data_index_base) % ARRAY_SIZE(values);
switch (type->base_type) {
case GLSL_TYPE_UINT:
case GLSL_TYPE_INT: