summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau/nv50/nv50_query_hw_metric.h
blob: f8cfc04084f471699246afdba0eabeaba4f376dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef __NV50_QUERY_HW_METRIC_H__
#define __NV50_QUERY_HW_METRIC_H__

#include "nv50_query_hw.h"

struct nv50_hw_metric_query {
   struct nv50_hw_query base;
   struct nv50_hw_query *queries[4];
   unsigned num_queries;
};

static inline struct nv50_hw_metric_query *
nv50_hw_metric_query(struct nv50_hw_query *hq)
{
   return (struct nv50_hw_metric_query *)hq;
}

/*
 * Driver metrics queries:
 */
#define NV50_HW_METRIC_QUERY(i)   (PIPE_QUERY_DRIVER_SPECIFIC + 1024 + (i))
#define NV50_HW_METRIC_QUERY_LAST  NV50_HW_METRIC_QUERY(NV50_HW_METRIC_QUERY_COUNT - 1)
enum nv50_hw_metric_queries
{
    NV50_HW_METRIC_QUERY_BRANCH_EFFICIENCY = 0,
    NV50_HW_METRIC_QUERY_COUNT
};

struct nv50_hw_query *
nv50_hw_metric_create_query(struct nv50_context *, unsigned);
int
nv50_hw_metric_get_driver_query_info(struct nv50_screen *, unsigned,
                                     struct pipe_driver_query_info *);
#endif