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];
"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,
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);
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);