diff options
author | Niels Ole Salscheider <[email protected]> | 2013-08-09 11:59:29 +0200 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2013-08-23 16:59:55 -0700 |
commit | 04349541cd6fd635db786e00568357f0dbfd1aa0 (patch) | |
tree | bb0b5aee8b6112fbbb32a9850e793f36c8c63ddc /src/gallium/drivers/radeonsi | |
parent | db6f4165f4af89b8a963c5fd5ece4fc9a94c42d0 (diff) |
radeonsi: copy r600_get_timestamp
Signed-off-by: Niels Ole Salscheider <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/radeonsi_pipe.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/radeonsi_pipe.c b/src/gallium/drivers/radeonsi/radeonsi_pipe.c index 335176802a8..2258de9380d 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_pipe.c +++ b/src/gallium/drivers/radeonsi/radeonsi_pipe.c @@ -788,6 +788,14 @@ static int r600_init_tiling(struct r600_screen *rscreen) return evergreen_interpret_tiling(rscreen, tiling_config); } +static uint64_t r600_get_timestamp(struct pipe_screen *screen) +{ + struct r600_screen *rscreen = (struct r600_screen*)screen; + + return 1000000 * rscreen->ws->query_value(rscreen->ws, RADEON_TIMESTAMP) / + rscreen->info.r600_clock_crystal_freq; +} + static unsigned radeon_family_from_device(unsigned device) { switch (device) { @@ -839,6 +847,7 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws) rscreen->screen.get_shader_param = r600_get_shader_param; rscreen->screen.get_paramf = r600_get_paramf; rscreen->screen.get_compute_param = r600_get_compute_param; + rscreen->screen.get_timestamp = r600_get_timestamp; rscreen->screen.is_format_supported = si_is_format_supported; rscreen->screen.context_create = r600_create_context; rscreen->screen.fence_reference = r600_fence_reference; |