summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-04-25 15:57:05 -0600
committerBrian Paul <[email protected]>2016-04-27 10:23:19 -0600
commitd902504a677d39ace99b1f34a7a4d06d644dfb3d (patch)
treef12cf61e6b9e9408e9a745642887c570c3b3486f /src/gallium/auxiliary
parente522a76226acfcf786457ce4472294d9e36adc94 (diff)
hud: s/Elements/ARRAY_SIZE/
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/hud/font.c2
-rw-r--r--src/gallium/auxiliary/hud/hud_context.c10
-rw-r--r--src/gallium/auxiliary/hud/hud_driver_query.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/auxiliary/hud/font.c b/src/gallium/auxiliary/hud/font.c
index 067de9e39c7..9fb9d7e055b 100644
--- a/src/gallium/auxiliary/hud/font.c
+++ b/src/gallium/auxiliary/hud/font.c
@@ -388,7 +388,7 @@ util_font_create_fixed_8x13(struct pipe_context *pipe,
enum pipe_format tex_format = PIPE_FORMAT_NONE;
int i;
- for (i = 0; i < Elements(formats); i++) {
+ for (i = 0; i < ARRAY_SIZE(formats); i++) {
if (screen->is_format_supported(screen, formats[i],
PIPE_TEXTURE_RECT, 0,
PIPE_BIND_SAMPLER_VIEW)) {
diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c
index 40017c8614f..146c7ccd5e3 100644
--- a/src/gallium/auxiliary/hud/hud_context.c
+++ b/src/gallium/auxiliary/hud/hud_context.c
@@ -691,7 +691,7 @@ hud_pane_add_graph(struct hud_pane *pane, struct hud_graph *gr)
name++;
}
- assert(pane->num_graphs < Elements(colors));
+ assert(pane->num_graphs < ARRAY_SIZE(colors));
gr->vertices = MALLOC(pane->max_num_vertices * sizeof(float) * 2);
gr->color[0] = colors[pane->num_graphs][0];
gr->color[1] = colors[pane->num_graphs][1];
@@ -937,10 +937,10 @@ hud_parse_env_var(struct hud_context *hud, const char *env)
"ds-invocations",
"cs-invocations"
};
- for (i = 0; i < Elements(pipeline_statistics_names); ++i)
+ for (i = 0; i < ARRAY_SIZE(pipeline_statistics_names); ++i)
if (strcmp(name, pipeline_statistics_names[i]) == 0)
break;
- if (i < Elements(pipeline_statistics_names)) {
+ if (i < ARRAY_SIZE(pipeline_statistics_names)) {
hud_pipe_query_install(&hud->batch_query, pane, hud->pipe, name,
PIPE_QUERY_PIPELINE_STATISTICS, i,
0, PIPE_DRIVER_QUERY_TYPE_UINT64,
@@ -1204,7 +1204,7 @@ hud_create(struct pipe_context *pipe, struct cso_context *cso)
struct tgsi_token tokens[1000];
struct pipe_shader_state state = {tokens};
- if (!tgsi_text_translate(fragment_shader_text, tokens, Elements(tokens))) {
+ if (!tgsi_text_translate(fragment_shader_text, tokens, ARRAY_SIZE(tokens))) {
assert(0);
pipe_resource_reference(&hud->font.texture, NULL);
u_upload_destroy(hud->uploader);
@@ -1251,7 +1251,7 @@ hud_create(struct pipe_context *pipe, struct cso_context *cso)
struct tgsi_token tokens[1000];
struct pipe_shader_state state = {tokens};
- if (!tgsi_text_translate(vertex_shader_text, tokens, Elements(tokens))) {
+ if (!tgsi_text_translate(vertex_shader_text, tokens, ARRAY_SIZE(tokens))) {
assert(0);
pipe_resource_reference(&hud->font.texture, NULL);
u_upload_destroy(hud->uploader);
diff --git a/src/gallium/auxiliary/hud/hud_driver_query.c b/src/gallium/auxiliary/hud/hud_driver_query.c
index d7b1f11ed56..a7d28bc33fb 100644
--- a/src/gallium/auxiliary/hud/hud_driver_query.c
+++ b/src/gallium/auxiliary/hud/hud_driver_query.c
@@ -331,7 +331,7 @@ free_query_info(void *ptr)
pipe->end_query(pipe, info->query[info->head]);
- for (i = 0; i < Elements(info->query); i++) {
+ for (i = 0; i < ARRAY_SIZE(info->query); i++) {
if (info->query[i]) {
pipe->destroy_query(pipe, info->query[i]);
}