diff options
author | Rob Clark <[email protected]> | 2016-02-10 14:40:24 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-02-17 10:41:55 -0500 |
commit | 37d540ba709ae0128a6fb3e11a7124eb6e8c00a0 (patch) | |
tree | 20736b5bda02237e766891246dfd06e2d776d4a1 /src/gallium/drivers/freedreno | |
parent | ba194630cc89dc508aeac77a280ee5704ca48adf (diff) |
freedreno: expose time-elapsed query
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_query_hw.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_screen.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_query_hw.c b/src/gallium/drivers/freedreno/freedreno_query_hw.c index 433c678c6d9..2ac03f22b41 100644 --- a/src/gallium/drivers/freedreno/freedreno_query_hw.c +++ b/src/gallium/drivers/freedreno/freedreno_query_hw.c @@ -47,6 +47,8 @@ static int pidx(unsigned query_type) return 0; case PIPE_QUERY_OCCLUSION_PREDICATE: return 1; + case PIPE_QUERY_TIME_ELAPSED: + return 2; default: return -1; } diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index bd8373422b2..2b3ecfe664e 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -298,12 +298,14 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) return is_a3xx(screen) ? 1 : 0; /* Queries. */ - case PIPE_CAP_QUERY_TIME_ELAPSED: case PIPE_CAP_QUERY_TIMESTAMP: case PIPE_CAP_QUERY_BUFFER_OBJECT: return 0; case PIPE_CAP_OCCLUSION_QUERY: return is_a3xx(screen) || is_a4xx(screen); + case PIPE_CAP_QUERY_TIME_ELAPSED: + /* only a4xx, requires new enough kernel so we know max_freq: */ + return (screen->max_freq > 0) && is_a4xx(screen); case PIPE_CAP_MIN_TEXTURE_GATHER_OFFSET: case PIPE_CAP_MIN_TEXEL_OFFSET: |