iris/screen: add PIPE_CAP_TIMER_RESOLUTION
authornorablackcat <blackcatgames@protonmail.com>
Sat, 17 Jun 2023 20:52:09 +0000 (14:52 -0600)
committerMarge Bot <emma+marge@anholt.net>
Thu, 22 Jun 2023 09:08:33 +0000 (09:08 +0000)
Reviewed by Marek Olšák

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23703>

src/gallium/drivers/iris/iris_screen.c

index d761763..9b588c7 100644 (file)
@@ -431,6 +431,9 @@ iris_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_QUERY_TIMESTAMP_BITS:
       return TIMESTAMP_BITS;
 
+   case PIPE_CAP_TIMER_RESOLUTION:
+      return DIV_ROUND_UP(1000000000ull, devinfo->timestamp_frequency);
+
    case PIPE_CAP_DEVICE_PROTECTED_CONTEXT:
       return screen->kernel_features & KERNEL_HAS_PROTECTED_CONTEXT;