freedreno: Remove use of fd_perfcntr_type/result_type

Everything is "UINT64, AVERAGE", so no need to get this from the table.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40522>
This commit is contained in:
Rob Clark 2026-03-17 11:52:38 -07:00 committed by Marge Bot
parent 7ceb8dcef4
commit 71e76f3637

View file

@ -179,43 +179,6 @@ fd_set_active_query_state(struct pipe_context *pctx, bool enable) assert_dt
fd_context_dirty(ctx, FD_DIRTY_QUERY);
}
static enum pipe_driver_query_type
query_type(enum fd_perfcntr_type type)
{
#define ENUM(t) \
case FD_PERFCNTR_##t: \
return PIPE_DRIVER_QUERY_##t
switch (type) {
ENUM(TYPE_UINT64);
ENUM(TYPE_UINT);
ENUM(TYPE_FLOAT);
ENUM(TYPE_PERCENTAGE);
ENUM(TYPE_BYTES);
ENUM(TYPE_MICROSECONDS);
ENUM(TYPE_HZ);
ENUM(TYPE_DBM);
ENUM(TYPE_TEMPERATURE);
ENUM(TYPE_VOLTS);
ENUM(TYPE_AMPS);
ENUM(TYPE_WATTS);
default:
UNREACHABLE("bad type");
return 0;
}
}
static enum pipe_driver_query_result_type
query_result_type(enum fd_perfcntr_result_type type)
{
switch (type) {
ENUM(RESULT_TYPE_AVERAGE);
ENUM(RESULT_TYPE_CUMULATIVE);
default:
UNREACHABLE("bad type");
return 0;
}
}
static void
setup_perfcntr_query_info(struct fd_screen *screen)
{
@ -237,8 +200,8 @@ setup_perfcntr_query_info(struct fd_screen *screen)
info->name = c->name;
info->query_type = FD_QUERY_FIRST_PERFCNTR + idx;
info->type = query_type(c->query_type);
info->result_type = query_result_type(c->result_type);
info->type = PIPE_DRIVER_QUERY_TYPE_UINT64;
info->result_type = PIPE_DRIVER_QUERY_RESULT_TYPE_AVERAGE;
info->group_id = i;
info->flags = PIPE_DRIVER_QUERY_FLAG_BATCH;