diff options
author | Kenneth Graunke <[email protected]> | 2018-09-28 15:42:51 +0200 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:08 -0800 |
commit | 1d91eba7dcfb37151399b21b419b0bef26a4431a (patch) | |
tree | cad2591f8bc1b246df9f568641239c9b2208d0dc /src/gallium/drivers/iris/iris_screen.c | |
parent | 36fbcfb06c7e733a42fc8f9444faa81631ae2852 (diff) |
iris: glGet timestamps, more correct timestamps
Diffstat (limited to 'src/gallium/drivers/iris/iris_screen.c')
-rw-r--r-- | src/gallium/drivers/iris/iris_screen.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c index efc6a7045da..658ecc1f591 100644 --- a/src/gallium/drivers/iris/iris_screen.c +++ b/src/gallium/drivers/iris/iris_screen.c @@ -374,7 +374,16 @@ iris_get_compute_param(struct pipe_screen *pscreen, static uint64_t iris_get_timestamp(struct pipe_screen *pscreen) { - return 0; + struct iris_screen *screen = (struct iris_screen *) pscreen; + const unsigned TIMESTAMP = 0x2358; + uint64_t result; + + iris_reg_read(screen->bufmgr, TIMESTAMP, &result); + + result = iris_timebase_scale(&screen->devinfo, result); + result &= (1ull << 36) - 1; + + return result; } static void |