projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
winsys/radeon: use the common job queue for multithreaded command submission v2
[mesa.git]
/
src
/
gallium
/
drivers
/
radeon
/
r600_perfcounter.c
diff --git
a/src/gallium/drivers/radeon/r600_perfcounter.c
b/src/gallium/drivers/radeon/r600_perfcounter.c
index 9ab17d9e04cb916c8da3695716a002cf548795e9..af9a692d15061295627a4fe67259176dc3142e30 100644
(file)
--- a/
src/gallium/drivers/radeon/r600_perfcounter.c
+++ b/
src/gallium/drivers/radeon/r600_perfcounter.c
@@
-84,8
+84,8
@@
struct r600_pc_group {
struct r600_pc_counter {
unsigned base;
struct r600_pc_counter {
unsigned base;
- unsigned
d
words;
- unsigned stride;
+ unsigned
q
words;
+ unsigned stride;
/* in uint64s */
};
#define R600_PC_SHADERS_WINDOWING (1 << 31)
};
#define R600_PC_SHADERS_WINDOWING (1 << 31)
@@
-172,7
+172,7
@@
static void r600_pc_query_emit_stop(struct r600_common_context *ctx,
pc->emit_read(ctx, block,
group->num_counters, group->selectors,
buffer, va);
pc->emit_read(ctx, block,
group->num_counters, group->selectors,
buffer, va);
- va +=
4
* group->num_counters;
+ va +=
sizeof(uint64_t)
* group->num_counters;
} while (group->instance < 0 && ++instance < block->num_instances);
} while (++se < se_end);
}
} while (group->instance < 0 && ++instance < block->num_instances);
} while (++se < se_end);
}
@@
-194,15
+194,15
@@
static void r600_pc_query_add_result(struct r600_common_context *ctx,
union pipe_query_result *result)
{
struct r600_query_pc *query = (struct r600_query_pc *)hwquery;
union pipe_query_result *result)
{
struct r600_query_pc *query = (struct r600_query_pc *)hwquery;
- uint
32
_t *results = buffer;
+ uint
64
_t *results = buffer;
unsigned i, j;
for (i = 0; i < query->num_counters; ++i) {
struct r600_pc_counter *counter = &query->counters[i];
unsigned i, j;
for (i = 0; i < query->num_counters; ++i) {
struct r600_pc_counter *counter = &query->counters[i];
- for (j = 0; j < counter->
d
words; ++j) {
+ for (j = 0; j < counter->
q
words; ++j) {
uint32_t value = results[counter->base + j * counter->stride];
uint32_t value = results[counter->base + j * counter->stride];
- result->batch[i].u
32
+= value;
+ result->batch[i].u
64
+= value;
}
}
}
}
}
}
@@
-361,7
+361,7
@@
struct pipe_query *r600_create_batch_query(struct pipe_context *ctx,
instances *= block->num_instances;
group->result_base = i;
instances *= block->num_instances;
group->result_base = i;
- query->b.result_size +=
4
* instances * group->num_counters;
+ query->b.result_size +=
sizeof(uint64_t)
* instances * group->num_counters;
i += instances * group->num_counters;
pc->get_size(block, group->num_counters, group->selectors,
i += instances * group->num_counters;
pc->get_size(block, group->num_counters, group->selectors,
@@
-401,11
+401,11
@@
struct pipe_query *r600_create_batch_query(struct pipe_context *ctx,
counter->base = group->result_base + j;
counter->stride = group->num_counters;
counter->base = group->result_base + j;
counter->stride = group->num_counters;
- counter->
d
words = 1;
+ counter->
q
words = 1;
if ((block->flags & R600_PC_BLOCK_SE) && group->se < 0)
if ((block->flags & R600_PC_BLOCK_SE) && group->se < 0)
- counter->
d
words = screen->info.max_se;
+ counter->
q
words = screen->info.max_se;
if (group->instance < 0)
if (group->instance < 0)
- counter->
d
words *= block->num_instances;
+ counter->
q
words *= block->num_instances;
}
if (!r600_query_hw_init(rctx, &query->b))
}
if (!r600_query_hw_init(rctx, &query->b))
@@
-535,7
+535,7
@@
int r600_get_perfcounter_info(struct r600_common_screen *screen,
info->name = block->selector_names + sub * block->selector_name_stride;
info->query_type = R600_QUERY_FIRST_PERFCOUNTER + index;
info->max_value.u64 = 0;
info->name = block->selector_names + sub * block->selector_name_stride;
info->query_type = R600_QUERY_FIRST_PERFCOUNTER + index;
info->max_value.u64 = 0;
- info->type = PIPE_DRIVER_QUERY_TYPE_UINT;
+ info->type = PIPE_DRIVER_QUERY_TYPE_UINT
64
;
info->result_type = PIPE_DRIVER_QUERY_RESULT_TYPE_CUMULATIVE;
info->group_id = base_gid + sub / block->num_selectors;
info->flags = PIPE_DRIVER_QUERY_FLAG_BATCH;
info->result_type = PIPE_DRIVER_QUERY_RESULT_TYPE_CUMULATIVE;
info->group_id = base_gid + sub / block->num_selectors;
info->flags = PIPE_DRIVER_QUERY_FLAG_BATCH;