diff options
author | Marek Olšák <marek.olsak@amd.com> | 2018-04-01 18:32:54 -0400 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2018-04-05 15:34:58 -0400 |
commit | eced536ed6ab44e183561138b28dff56119a8609 (patch) | |
tree | 6b1a6251c8b36c19b670a0d22a4465907bc2ed58 /src/gallium/drivers/radeon/r600_perfcounter.c | |
parent | 72e9e98076d0ee0281aa3982602a6e85cd14bf2b (diff) |
radeonsi: rename query definitions R600_ -> SI_
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_perfcounter.c')
-rw-r--r-- | src/gallium/drivers/radeon/r600_perfcounter.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/src/gallium/drivers/radeon/r600_perfcounter.c b/src/gallium/drivers/radeon/r600_perfcounter.c index 29b3c97d360..c5b55cdcc3b 100644 --- a/src/gallium/drivers/radeon/r600_perfcounter.c +++ b/src/gallium/drivers/radeon/r600_perfcounter.c @@ -28,7 +28,7 @@ #include "amd/common/sid.h" /* Max counters per HW block */ -#define R600_QUERY_MAX_COUNTERS 16 +#define SI_QUERY_MAX_COUNTERS 16 static struct si_perfcounter_block * lookup_counter(struct si_perfcounters *pc, unsigned index, @@ -76,7 +76,7 @@ struct si_pc_group { int se; int instance; unsigned num_counters; - unsigned selectors[R600_QUERY_MAX_COUNTERS]; + unsigned selectors[SI_QUERY_MAX_COUNTERS]; }; struct si_pc_counter { @@ -166,7 +166,7 @@ static void si_pc_query_emit_stop(struct si_context *sctx, unsigned se = group->se >= 0 ? group->se : 0; unsigned se_end = se + 1; - if ((block->flags & R600_PC_BLOCK_SE) && (group->se < 0)) + if ((block->flags & SI_PC_BLOCK_SE) && (group->se < 0)) se_end = sctx->screen->info.max_se; do { @@ -247,13 +247,13 @@ static struct si_pc_group *get_group_state(struct si_screen *screen, group->block = block; group->sub_gid = sub_gid; - if (block->flags & R600_PC_BLOCK_SHADER) { + if (block->flags & SI_PC_BLOCK_SHADER) { unsigned sub_gids = block->num_instances; unsigned shader_id; unsigned shaders; unsigned query_shaders; - if (block->flags & R600_PC_BLOCK_SE_GROUPS) + if (block->flags & SI_PC_BLOCK_SE_GROUPS) sub_gids = sub_gids * screen->info.max_se; shader_id = sub_gid / sub_gids; sub_gid = sub_gid % sub_gids; @@ -269,20 +269,20 @@ static struct si_pc_group *get_group_state(struct si_screen *screen, query->shaders = shaders; } - if (block->flags & R600_PC_BLOCK_SHADER_WINDOWED && !query->shaders) { + if (block->flags & SI_PC_BLOCK_SHADER_WINDOWED && !query->shaders) { // A non-zero value in query->shaders ensures that the shader // masking is reset unless the user explicitly requests one. query->shaders = SI_PC_SHADERS_WINDOWING; } - if (block->flags & R600_PC_BLOCK_SE_GROUPS) { + if (block->flags & SI_PC_BLOCK_SE_GROUPS) { group->se = sub_gid / block->num_instances; sub_gid = sub_gid % block->num_instances; } else { group->se = -1; } - if (block->flags & R600_PC_BLOCK_INSTANCE_GROUPS) { + if (block->flags & SI_PC_BLOCK_INSTANCE_GROUPS) { group->instance = sub_gid; } else { group->instance = -1; @@ -323,10 +323,10 @@ struct pipe_query *si_create_batch_query(struct pipe_context *ctx, for (i = 0; i < num_queries; ++i) { unsigned sub_gid; - if (query_types[i] < R600_QUERY_FIRST_PERFCOUNTER) + if (query_types[i] < SI_QUERY_FIRST_PERFCOUNTER) goto error; - block = lookup_counter(pc, query_types[i] - R600_QUERY_FIRST_PERFCOUNTER, + block = lookup_counter(pc, query_types[i] - SI_QUERY_FIRST_PERFCOUNTER, &base_gid, &sub_index); if (!block) goto error; @@ -358,7 +358,7 @@ struct pipe_query *si_create_batch_query(struct pipe_context *ctx, unsigned read_dw; unsigned instances = 1; - if ((block->flags & R600_PC_BLOCK_SE) && group->se < 0) + if ((block->flags & SI_PC_BLOCK_SE) && group->se < 0) instances = screen->info.max_se; if (group->instance < 0) instances *= block->num_instances; @@ -383,7 +383,7 @@ struct pipe_query *si_create_batch_query(struct pipe_context *ctx, struct si_pc_counter *counter = &query->counters[i]; struct si_perfcounter_block *block; - block = lookup_counter(pc, query_types[i] - R600_QUERY_FIRST_PERFCOUNTER, + block = lookup_counter(pc, query_types[i] - SI_QUERY_FIRST_PERFCOUNTER, &base_gid, &sub_index); sub_gid = sub_index / block->num_selectors; @@ -401,7 +401,7 @@ struct pipe_query *si_create_batch_query(struct pipe_context *ctx, counter->stride = group->num_counters; counter->qwords = 1; - if ((block->flags & R600_PC_BLOCK_SE) && group->se < 0) + if ((block->flags & SI_PC_BLOCK_SE) && group->se < 0) counter->qwords = screen->info.max_se; if (group->instance < 0) counter->qwords *= block->num_instances; @@ -426,25 +426,25 @@ static bool si_init_block_names(struct si_screen *screen, char *groupname; char *p; - if (block->flags & R600_PC_BLOCK_INSTANCE_GROUPS) + if (block->flags & SI_PC_BLOCK_INSTANCE_GROUPS) groups_instance = block->num_instances; - if (block->flags & R600_PC_BLOCK_SE_GROUPS) + if (block->flags & SI_PC_BLOCK_SE_GROUPS) groups_se = screen->info.max_se; - if (block->flags & R600_PC_BLOCK_SHADER) + if (block->flags & SI_PC_BLOCK_SHADER) groups_shader = screen->perfcounters->num_shader_types; namelen = strlen(block->basename); block->group_name_stride = namelen + 1; - if (block->flags & R600_PC_BLOCK_SHADER) + if (block->flags & SI_PC_BLOCK_SHADER) block->group_name_stride += 3; - if (block->flags & R600_PC_BLOCK_SE_GROUPS) { + if (block->flags & SI_PC_BLOCK_SE_GROUPS) { assert(groups_se <= 10); block->group_name_stride += 1; - if (block->flags & R600_PC_BLOCK_INSTANCE_GROUPS) + if (block->flags & SI_PC_BLOCK_INSTANCE_GROUPS) block->group_name_stride += 1; } - if (block->flags & R600_PC_BLOCK_INSTANCE_GROUPS) { + if (block->flags & SI_PC_BLOCK_INSTANCE_GROUPS) { assert(groups_instance <= 100); block->group_name_stride += 2; } @@ -462,18 +462,18 @@ static bool si_init_block_names(struct si_screen *screen, strcpy(groupname, block->basename); p = groupname + namelen; - if (block->flags & R600_PC_BLOCK_SHADER) { + if (block->flags & SI_PC_BLOCK_SHADER) { strcpy(p, shader_suffix); p += shaderlen; } - if (block->flags & R600_PC_BLOCK_SE_GROUPS) { + if (block->flags & SI_PC_BLOCK_SE_GROUPS) { p += sprintf(p, "%d", j); - if (block->flags & R600_PC_BLOCK_INSTANCE_GROUPS) + if (block->flags & SI_PC_BLOCK_INSTANCE_GROUPS) *p++ = '_'; } - if (block->flags & R600_PC_BLOCK_INSTANCE_GROUPS) + if (block->flags & SI_PC_BLOCK_INSTANCE_GROUPS) p += sprintf(p, "%d", k); groupname += block->group_name_stride; @@ -532,7 +532,7 @@ int si_get_perfcounter_info(struct si_screen *screen, return 0; } info->name = block->selector_names + sub * block->selector_name_stride; - info->query_type = R600_QUERY_FIRST_PERFCOUNTER + index; + info->query_type = SI_QUERY_FIRST_PERFCOUNTER + index; info->max_value.u64 = 0; info->type = PIPE_DRIVER_QUERY_TYPE_UINT64; info->result_type = PIPE_DRIVER_QUERY_RESULT_TYPE_AVERAGE; @@ -597,7 +597,7 @@ void si_perfcounters_add_block(struct si_screen *sscreen, { struct si_perfcounter_block *block = &pc->blocks[pc->num_blocks]; - assert(counters <= R600_QUERY_MAX_COUNTERS); + assert(counters <= SI_QUERY_MAX_COUNTERS); block->basename = name; block->flags = flags; @@ -606,20 +606,20 @@ void si_perfcounters_add_block(struct si_screen *sscreen, block->num_instances = MAX2(instances, 1); block->data = data; - if (pc->separate_se && (block->flags & R600_PC_BLOCK_SE)) - block->flags |= R600_PC_BLOCK_SE_GROUPS; + if (pc->separate_se && (block->flags & SI_PC_BLOCK_SE)) + block->flags |= SI_PC_BLOCK_SE_GROUPS; if (pc->separate_instance && block->num_instances > 1) - block->flags |= R600_PC_BLOCK_INSTANCE_GROUPS; + block->flags |= SI_PC_BLOCK_INSTANCE_GROUPS; - if (block->flags & R600_PC_BLOCK_INSTANCE_GROUPS) { + if (block->flags & SI_PC_BLOCK_INSTANCE_GROUPS) { block->num_groups = block->num_instances; } else { block->num_groups = 1; } - if (block->flags & R600_PC_BLOCK_SE_GROUPS) + if (block->flags & SI_PC_BLOCK_SE_GROUPS) block->num_groups *= sscreen->info.max_se; - if (block->flags & R600_PC_BLOCK_SHADER) + if (block->flags & SI_PC_BLOCK_SHADER) block->num_groups *= pc->num_shader_types; ++pc->num_blocks; |