mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
intel/perf: Change mdapi switch cases from ver to verx
We are missing handling for gfx12.5 so to add it we will need a switch case over verx. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Tested-by: Lukasz Stalmirski <lukasz.stalmirski@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32842>
This commit is contained in:
parent
2d75b3b873
commit
a097a3d214
1 changed files with 16 additions and 16 deletions
|
|
@ -34,8 +34,8 @@ intel_perf_query_result_write_mdapi(void *data, uint32_t data_size,
|
||||||
const struct intel_perf_query_info *query,
|
const struct intel_perf_query_info *query,
|
||||||
const struct intel_perf_query_result *result)
|
const struct intel_perf_query_result *result)
|
||||||
{
|
{
|
||||||
switch (devinfo->ver) {
|
switch (devinfo->verx10) {
|
||||||
case 7: {
|
case 70: {
|
||||||
struct gfx7_mdapi_metrics *mdapi_data = (struct gfx7_mdapi_metrics *) data;
|
struct gfx7_mdapi_metrics *mdapi_data = (struct gfx7_mdapi_metrics *) data;
|
||||||
|
|
||||||
if (data_size < sizeof(*mdapi_data))
|
if (data_size < sizeof(*mdapi_data))
|
||||||
|
|
@ -62,7 +62,7 @@ intel_perf_query_result_write_mdapi(void *data, uint32_t data_size,
|
||||||
mdapi_data->SplitOccured = result->query_disjoint;
|
mdapi_data->SplitOccured = result->query_disjoint;
|
||||||
return sizeof(*mdapi_data);
|
return sizeof(*mdapi_data);
|
||||||
}
|
}
|
||||||
case 8: {
|
case 80: {
|
||||||
struct gfx8_mdapi_metrics *mdapi_data = (struct gfx8_mdapi_metrics *) data;
|
struct gfx8_mdapi_metrics *mdapi_data = (struct gfx8_mdapi_metrics *) data;
|
||||||
|
|
||||||
if (data_size < sizeof(*mdapi_data))
|
if (data_size < sizeof(*mdapi_data))
|
||||||
|
|
@ -94,9 +94,9 @@ intel_perf_query_result_write_mdapi(void *data, uint32_t data_size,
|
||||||
mdapi_data->SplitOccured = result->query_disjoint;
|
mdapi_data->SplitOccured = result->query_disjoint;
|
||||||
return sizeof(*mdapi_data);
|
return sizeof(*mdapi_data);
|
||||||
}
|
}
|
||||||
case 9:
|
case 90:
|
||||||
case 11:
|
case 110:
|
||||||
case 12:{
|
case 120:{
|
||||||
struct gfx9_mdapi_metrics *mdapi_data = (struct gfx9_mdapi_metrics *) data;
|
struct gfx9_mdapi_metrics *mdapi_data = (struct gfx9_mdapi_metrics *) data;
|
||||||
|
|
||||||
if (data_size < sizeof(*mdapi_data))
|
if (data_size < sizeof(*mdapi_data))
|
||||||
|
|
@ -128,8 +128,8 @@ intel_perf_query_result_write_mdapi(void *data, uint32_t data_size,
|
||||||
mdapi_data->SplitOccured = result->query_disjoint;
|
mdapi_data->SplitOccured = result->query_disjoint;
|
||||||
return sizeof(*mdapi_data);
|
return sizeof(*mdapi_data);
|
||||||
}
|
}
|
||||||
case 20:
|
case 200:
|
||||||
case 30: {
|
case 300: {
|
||||||
struct gfx20_mdapi_metrics *mdapi_data = (struct gfx20_mdapi_metrics *) data;
|
struct gfx20_mdapi_metrics *mdapi_data = (struct gfx20_mdapi_metrics *) data;
|
||||||
|
|
||||||
if (data_size < sizeof(*mdapi_data))
|
if (data_size < sizeof(*mdapi_data))
|
||||||
|
|
@ -278,8 +278,8 @@ intel_perf_register_mdapi_oa_query(struct intel_perf_config *perf,
|
||||||
if (!(devinfo->ver >= 7 && devinfo->ver <= 30))
|
if (!(devinfo->ver >= 7 && devinfo->ver <= 30))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (devinfo->ver) {
|
switch (devinfo->verx10) {
|
||||||
case 7: {
|
case 70: {
|
||||||
query = intel_perf_append_query_info(perf, 1 + 45 + 16 + 7);
|
query = intel_perf_append_query_info(perf, 1 + 45 + 16 + 7);
|
||||||
|
|
||||||
struct gfx7_mdapi_metrics metric_data;
|
struct gfx7_mdapi_metrics metric_data;
|
||||||
|
|
@ -303,7 +303,7 @@ intel_perf_register_mdapi_oa_query(struct intel_perf_config *perf,
|
||||||
MDAPI_QUERY_ADD_COUNTER(query, metric_data, ReportsCount, UINT32);
|
MDAPI_QUERY_ADD_COUNTER(query, metric_data, ReportsCount, UINT32);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 8: {
|
case 80: {
|
||||||
query = intel_perf_append_query_info(perf, 2 + 36 + 16 + 16);
|
query = intel_perf_append_query_info(perf, 2 + 36 + 16 + 16);
|
||||||
|
|
||||||
struct gfx8_mdapi_metrics metric_data;
|
struct gfx8_mdapi_metrics metric_data;
|
||||||
|
|
@ -337,9 +337,9 @@ intel_perf_register_mdapi_oa_query(struct intel_perf_config *perf,
|
||||||
MDAPI_QUERY_ADD_COUNTER(query, metric_data, ReportsCount, UINT32);
|
MDAPI_QUERY_ADD_COUNTER(query, metric_data, ReportsCount, UINT32);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 9:
|
case 90:
|
||||||
case 11:
|
case 110:
|
||||||
case 12: {
|
case 120: {
|
||||||
query = intel_perf_append_query_info(perf, 2 + 36 + 16 + 16 + 16 + 2);
|
query = intel_perf_append_query_info(perf, 2 + 36 + 16 + 16 + 16 + 2);
|
||||||
|
|
||||||
struct gfx9_mdapi_metrics metric_data;
|
struct gfx9_mdapi_metrics metric_data;
|
||||||
|
|
@ -379,8 +379,8 @@ intel_perf_register_mdapi_oa_query(struct intel_perf_config *perf,
|
||||||
MDAPI_QUERY_ADD_COUNTER(query, metric_data, Reserved4, UINT32);
|
MDAPI_QUERY_ADD_COUNTER(query, metric_data, Reserved4, UINT32);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 20:
|
case 200:
|
||||||
case 30: {
|
case 300: {
|
||||||
query = intel_perf_append_query_info(perf, 2 + 64 + 16 + 14 + 16 + 2);
|
query = intel_perf_append_query_info(perf, 2 + 64 + 16 + 14 + 16 + 2);
|
||||||
|
|
||||||
struct gfx20_mdapi_metrics metric_data;
|
struct gfx20_mdapi_metrics metric_data;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue