aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_scan.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-04-25 15:59:07 -0600
committerBrian Paul <[email protected]>2016-04-27 10:23:19 -0600
commit23c55e5c233927fee2a866d9aa842c975024933f (patch)
tree61914da46160b2c1f14f2170ac8c3181ebef135b /src/gallium/auxiliary/tgsi/tgsi_scan.c
parent419e3865713efc17bf48213154c5a96eaaa89443 (diff)
tgsi: s/Elements/ARRAY_SIZE/
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_scan.c')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_scan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index ab8126230f0..e07148d6783 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -200,7 +200,7 @@ scan_instruction(struct tgsi_shader_info *info,
const unsigned index = src->Register.Index;
assert(fullinst->Instruction.Texture);
- assert(index < Elements(info->is_msaa_sampler));
+ assert(index < ARRAY_SIZE(info->is_msaa_sampler));
assert(index < PIPE_MAX_SAMPLERS);
if (is_texture_inst(fullinst->Instruction.Opcode)) {
@@ -503,7 +503,7 @@ scan_property(struct tgsi_shader_info *info,
unsigned name = fullprop->Property.PropertyName;
unsigned value = fullprop->u[0].Data;
- assert(name < Elements(info->properties));
+ assert(name < ARRAY_SIZE(info->properties));
info->properties[name] = value;
switch (name) {
@@ -535,10 +535,10 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
memset(info, 0, sizeof(*info));
for (i = 0; i < TGSI_FILE_COUNT; i++)
info->file_max[i] = -1;
- for (i = 0; i < Elements(info->const_file_max); i++)
+ for (i = 0; i < ARRAY_SIZE(info->const_file_max); i++)
info->const_file_max[i] = -1;
info->properties[TGSI_PROPERTY_GS_INVOCATIONS] = 1;
- for (i = 0; i < Elements(info->sampler_targets); i++)
+ for (i = 0; i < ARRAY_SIZE(info->sampler_targets); i++)
info->sampler_targets[i] = TGSI_TEXTURE_UNKNOWN;
/**